Sunday, July 26, 2015

AutoComplete Geany Snippets

Do you give keywords for snippets and often end up forgetting the keywords itself. Instead of improving your coding speed, it just slows you down ! I will show you a cool method to auto-complete the parts of snippets. Once the keyword complete, you can press tab to get a snippet magic code appear on the editor.

You snippets.conf might look like this :

 Copy the code required to a new file and select the code
Format -> Send Selection to "file with the command". Here it is "convert_snippets_to_tag.bat"


This is actually the command to do the conversion which will be written in "convert_snippets_to_tags.bat"
Now the output will look like this.
 Copy this and paste it into the local copy of Geany tags folder.
It would be in C:\Users\<yourname>\AppData\Roaming\
geany\tags
Give the name of the file as, say,
<yourname>.html.tags

Reload the geany editor. Well, you will have the autocomplete for geany snippets working.

Now open any htm file and start typing for tags and you will get this


Now hit enter on the keyword required. Now the cursor at the end of keyword, press tab and the result is magic snippet code getting pasted on to the editor.

Enjoy. Happy coding fast using geany.

No comments:

Post a Comment