i think it is very neccesary to provide ability to create own code templates to save code writer's time.
it is very good to use Ctrl+Some_Button to place a small piece of regular used code in your code.
you can see how this feature (Ctrl+J) done in PHPEXPERTEDITOR at ankord.com
thanks.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
As Don says QuickText is what you are looking for.
It sits in the Plugins menu. How it works for PHP would be:
1. Go into the Options for QuickText.
2. Highlight PHP on the left hand side.
3. In the Tag Name field you place the name of the shortcut you want. I will use the example: php1
4. Type something like the following in the Substitution Text box:
5. Then click the Add/Modify button. (This is very important).
6. Now click OK to return to Notepad++.
7. Make sure you are working in PHP (in the menu Language > PHP).
8. Type php1 into your notepad++ and then press CTRL+Enter.
9. This should make the little code snippet appear that we typed above.
You will note that the $ symbol is used in QuickText to place the cursor where required so you can just start typing away if you always type in a certain place. You have to excape a $ symbol by usinbg \$ to get it to actually show int the text.
QuickText saves me so much time it is not funny! Common things like if..else or functions etc are easily programmed into QuickText.
Enjoy... :)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
hi!
i think it is very neccesary to provide ability to create own code templates to save code writer's time.
it is very good to use Ctrl+Some_Button to place a small piece of regular used code in your code.
you can see how this feature (Ctrl+J) done in PHPEXPERTEDITOR at ankord.com
thanks.
thank you.
Already available in the plugin QuickText which comes with Notepad++ release.
Don
As Don says QuickText is what you are looking for.
It sits in the Plugins menu. How it works for PHP would be:
1. Go into the Options for QuickText.
2. Highlight PHP on the left hand side.
3. In the Tag Name field you place the name of the shortcut you want. I will use the example: php1
4. Type something like the following in the Substitution Text box:
<?php
include(myincludefile.php);
\$myvar = '$';
?>
5. Then click the Add/Modify button. (This is very important).
6. Now click OK to return to Notepad++.
7. Make sure you are working in PHP (in the menu Language > PHP).
8. Type php1 into your notepad++ and then press CTRL+Enter.
9. This should make the little code snippet appear that we typed above.
You will note that the $ symbol is used in QuickText to place the cursor where required so you can just start typing away if you always type in a certain place. You have to excape a $ symbol by usinbg \$ to get it to actually show int the text.
QuickText saves me so much time it is not funny! Common things like if..else or functions etc are easily programmed into QuickText.
Enjoy... :)
Sorry I should have said that your cursor has to be sitting next to the tag you create when pressing CTRL+Enter. In my example it the tag is php1.
I just added a page to the Wiki (that for some reason I have just discovered!!!?!?!) that is a similar example to the one I gave before on this.
http://notepad-plus.wiki.sourceforge.net/QuickText+HowTo