User Tools

Site Tools


hpl2:third_party_tools:text:notepad

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
hpl2:third_party_tools:text:notepad [2010/11/04 14:36]
jens created
hpl2:third_party_tools:text:notepad [2015/08/03 10:56] (current)
lazzer The new version of notepad seems to lack the user defined feature in view settings, however there is another way to add the userdefinelang, updated it
Line 1: Line 1:
 ====== Notepad++ ====== ====== Notepad++ ======
 +
 [[http://​notepad-plus.sourceforge.net|Notepad++]] is a text editor with a ton of features useful when writing scripts for the HPL2 engine. Syntax colouring, auto-complete,​ call tips and so on and on. While it supports many different languages it does not, for obvious reasons, know much about our script functions. Here is a quick how-to for setting up Notepad++ so that it can auto-complete,​ give tips and give code snippets for .hps files. [[http://​notepad-plus.sourceforge.net|Notepad++]] is a text editor with a ton of features useful when writing scripts for the HPL2 engine. Syntax colouring, auto-complete,​ call tips and so on and on. While it supports many different languages it does not, for obvious reasons, know much about our script functions. Here is a quick how-to for setting up Notepad++ so that it can auto-complete,​ give tips and give code snippets for .hps files.
  
 ===== Notepad++ Setup ===== ===== Notepad++ Setup =====
-  ​- Download [[http://​sourceforge.net/​projects/​notepad-plus/files/​|Notepad++]] + 
-  - Settings menu - Preferences - File Association -> customize add a .hps to registered exts +    ​- Download [[http://​notepad-plus-plus.org/​|Notepad++]] 
-  - Settings menu - Preferences - Backup/​AutoCompletion -> Enable Function Completion and Function Parameters Hint on input. +    - Settings menu - Preferences - File Association -> customize add a .hps to registered exts 
-  - Download {{userdefinelang.zip}},​ unzip and in View menu -> User-defined dialogue... Click import and import the file. +    - Settings menu - Preferences - Backup/​AutoCompletion -> Enable Function Completion and Function Parameters Hint on input. 
-  - Download {{hps.zip}},​ unzip and go to Program Files\Notepad++\plugins\APIs and put hps.xml here.+    - Download {{:​hpl2:​third_party_tools:​text:​userdefinelang.zip|userdefinelang.zip}},​ unzip and go to Language - Define your dialogue ​-> Import unzipped ​file "​userDefineLang.XML" 
 +    - Download {{:​hpl2:​third_party_tools:​text:​hps.zip|hps.zip}}, unzip and go to Program Files<​nowiki>​\</​nowiki>​Notepad++<​nowiki>​\</​nowiki>​plugins<​nowiki>​\</​nowiki>​APIs and put hps.xml here. 
 + 
 +<​code>​ 
 +      (Fix: If the notepad++ still isnt showing you colors for syntaxes and similar things. Then you want to go ahead and hit __LANGUAGE__and select at the bottom HPS) 
 +</​code>​
  
 ==== Notepad++ will now be able to ==== ==== Notepad++ will now be able to ====
-  * .hps script files should have the text colourized properly when you open them. 
-  * Suggest functions, callbacks and other specific words when you begin to type, **pressing enter** completes the word. The suggestion window can be shown manually using **ctrl-space**. 
-  * When re-typing a custom word, say "​bMyBool",​ pressing **ctrl-return** will suggest auto-completions for words found in the current .hps file you are editing. 
-  * Give a description of variables needed for functions and what type of variable it returns, if any. For example, type "​AddTimer("​ and it will show the variables needed. This can also be brought up if pressing **ctrl-shift-space** when in a function. 
  
 +    * .hps script files should have the text colourized properly when you open them.
 +    * Suggest functions, callbacks and other specific words when you begin to type, **pressing enter** ​ completes the word. The suggestion window can be shown manually using **ctrl-space**.
 +    * When re-typing a custom word, say "​bMyBool",​ pressing **ctrl-return** ​ will suggest auto-completions for words found in the current .hps file you are editing.
 +    * Give a description of variables needed for functions and what type of variable it returns, if any. For example, type "​AddTimer("​ and it will show the variables needed. This can also be brought up if pressing **ctrl-shift-space** ​ when in a function.
  
 ===== QuickText ===== ===== QuickText =====
-With this plugin you can extend functionality further. If you write a function then press **ctrl-shift-return** and it will auto-write a whole code snippet. 
  
-  ​- Using the Plugins menu in Notepad++, start Plugin Manager, in the available tab, select QuickText and install. Might have to [[http://​sourceforge.net/​tracker/​download.php?​group_id=183263&​atid=904542&​file_id=375790&​aid=3009773|download manually]] instead. +With this plugin you can extend functionality further. If you write a function then press **ctrl-shift-return** ​ and it will auto-write a whole code snippet. 
-  - By default QuickText uses **ctrl-return**,​ this collides with a Notepad++ shortcut and does not work. Use Settings ​-> Shortcut Mapper ​... -> Plugin Commands and change this to **ctrl-shift-return**,​ on line 202. + 
-  - Download {{quicktext.zip}},​ unzip and open in Notepad++, copy its content. +    ​- Using the Plugins menu in Notepad++, start Plugin Manager, in the available tab, select QuickText and install. Might have to [[http://​sourceforge.net/​tracker/​download.php?​group_id=183263&​atid=904542&​file_id=375790&​aid=3009773|download manually]] instead. 
-  - Open the file Notepad++/​plugins/​Config/​QuickText.ini in Notepad++ and locate the row with [15], select it and paste the content from the previous step to replace and insert our HPL defined quicktext settings. +    - By default QuickText uses **ctrl-return**,​ this collides with a Notepad++ shortcut and does not work. Use Settings ​→ Shortcut Mapper ​… → Plugin Commands and change this to **ctrl-shift-return**,​ on line 202. 
-  - Close and start Notepad++ to activate it's functionality.+    - Download {{:​hpl2:​third_party_tools:​text:​quicktext.zip|quicktext.zip}},​ unzip and open in Notepad++, copy its content. 
 +    - Open the file Notepad++/​plugins/​Config/​QuickText.ini in Notepad++ and locate the row with [15], select it and paste the content from the previous step to replace and insert our HPL defined quicktext settings. 
 +    - Close and start Notepad++ to activate it's functionality.
  
 ==== With QuickText Notepad++ will now be able to ==== ==== With QuickText Notepad++ will now be able to ====
-  ​* Write a function name and press **ctrl-shift-return** and the rest of the function should auto-complete,​ for each following **ctrl-shift-return** you should move through the different places. For example type "for" ​then press **ctrl-shift-return**,​ it should do: + 
 +    ​* Write a function name and press **ctrl-shift-return** ​ and the rest of the function should auto-complete,​ for each following **ctrl-shift-return** ​ you should move through the different places. For example type for” then press **ctrl-shift-return**,​ it should do: 
 <​code>​ <​code>​
 for(X;X;X){ for(X;X;X){
Line 33: Line 42:
 X X
 </​code>​ </​code>​
-Then for each **ctrl-shift-return** the cursor should jump to the X positions (they are not visible, only to show locations in example). There are also extra function auto-completes,​ for example add an s after for or if to make it a single line without the {}.+ 
 +Then for each **ctrl-shift-return** ​ the cursor should jump to the X positions (they are not visible, only to show locations in example). There are also extra function auto-completes,​ for example add an s after for or if to make it a single line without the {}.
  
 That's it, code snippets and function lists can be extended further of course by the user if wanted! **Take note that QuickText can be a little buggy, for example the ctrl-shift-return to jump inside a function does not work reliable with all functions.** That's it, code snippets and function lists can be extended further of course by the user if wanted! **Take note that QuickText can be a little buggy, for example the ctrl-shift-return to jump inside a function does not work reliable with all functions.**
  
hpl2/third_party_tools/text/notepad.1288881392.txt.gz · Last modified: 2010/11/04 14:36 by jens