Useful things for those that use Notepad++
If you haven't heard of Notepad++, its a free file editor aimed at coding/scripting that is chock full of features that make life alot easier.
Ok, a few useful things that I have found that makes life a bit easier for the Lua scripter in N++...
1) Toribash function syntax highlighting
--------------------------------------
Go to Settings > Styler Configurator...
In language box, scroll down and click on Lua.
In style box, click on FUNC2.
There is a box near the right bottom corner that is titled User Define Keywords. In this box, copy and paste all this in:
add_hook dismember_joint draw_centered_text draw_disk draw_quad draw_text echo edit_game fracture_joint freeze_game get_body_angular_vel get_body_info get_body_linear_vel get_bouts get_camera_info get_color_info get_game_rules get_grip_info get_head_info get_joint_dismember get_joint_fracture get_joint_info get_joint_pos get_joint_pos2 get_joint_radius get_joint_screen_pos get_option get_player_info get_screen_pos get_shift_key_state get_spectators get_window_size get_world_state list.txtopen_url rewind_replay run_cmd screenshot sdk_standard select_player set_body_force set_body_pos set_body_sides set_body_texture set_body_torque set_camera_lookat set_camera_pos set_default_rules set_ghost set_grip_info set_joint_pos set_joint_radius set_joint_state set_option start_new_game unfreeze_game
and then click apply, then save and close. Now, the toribash-specific functions will be highlighted just like the standard lua functions ( e.g. string.byte )
2) Toribash Lua Auto-complete
------------------------------
There is an attachment at then end of this post. Extract this file to:
[Notepad++ directory]\plugins\APIs\
Now restart Notepad++. To use the auto-complete function, make sure you have the language for that window set to lua, then start typing a function, then press Ctrl-Space. A box will pop up you can scroll through with the arrow keys, and press enter when the function you would like to have entered is selected.
3) Automatically setting new files created to Lua language
-------------------------------------------------------
Go to Settings>Preferences..., and then click on the new document tab.
Near the bottom of the window, there is a drop-down with the title Default Language: Set it to lua, then click on close.
This may not be for everyone, depending on what else you use N++ for. More often then not, the new documents i make in N++ will be lua, so I find it easier to change it to whatever I need if I'm not working with lua.
I hope this stuff helps you N++ people out there
Last edited by NewbLuck; Aug 22, 2007 at 05:29 AM.
Reason: fixed engrish