Differences

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

Link to this comparison view

howtos:custom_autocomplete [2016/08/25 13:41]
thule.arch_gmail.com created
howtos:custom_autocomplete [2017/08/04 16:27] (current)
wballum Added in notes for this to be done on a Windows install of Geany
Line 8: Line 8:
 ====Step 1==== ====Step 1====
 First of all create a tags file as below and save it as <wrap hi>​filetype.filetype.tags</​wrap>​ - for eg: I saved mine as <wrap hi>​txt.txt.tags</​wrap>​ in <wrap em>​~/​.config/​geany/​tags/</​wrap>​ directory. ​ First of all create a tags file as below and save it as <wrap hi>​filetype.filetype.tags</​wrap>​ - for eg: I saved mine as <wrap hi>​txt.txt.tags</​wrap>​ in <wrap em>​~/​.config/​geany/​tags/</​wrap>​ directory. ​
 +  * **Note:** For Windows: "​%USERPROFILE%\AppData\Roaming\geany\tags\txt.txt.tags"​
  
 Format for the tags file is as below. Format for the tags file is as below.
Line 21: Line 22:
 Then modify the <wrap hi>​~/​.config/​geany/​filetype_extensions.conf</​wrap>​ as below and add the new extension as needed to [Extensions] and if you wish add the type of file to [Groups]. ​ Then modify the <wrap hi>​~/​.config/​geany/​filetype_extensions.conf</​wrap>​ as below and add the new extension as needed to [Extensions] and if you wish add the type of file to [Groups]. ​
 That is where it will show in the menu. That is where it will show in the menu.
 +  * **Note:** For Windows: "​C:​\Program Files (x86)\Geany\data\filetype_extensions.conf"​
  
 <​code>​ <​code>​
Line 36: Line 38:
 Copy a system file from global directory: For eg: Copy a system file from global directory: For eg:
 <wrap hi>cp /​usr/​share/​geany/​filetypes.css ~/​.config/​geany/​filedefs/​filetypes.txt.conf</​wrap>​ <wrap hi>cp /​usr/​share/​geany/​filetypes.css ~/​.config/​geany/​filedefs/​filetypes.txt.conf</​wrap>​
 +  * **Note:** For Windows(within admin cmd): <​code>​copy "​C:​\Program Files (x86)\Geany\data\filedefs\filetypes.css"​ "​C:​\Program Files (x86)\Geany\data\filedefs\filetypes.txt.conf"</​code>​
  
 Now we need to modify this to declare and setup new file type. In my case I created a simple <wrap hi>​text/​plain</​wrap>​ type. But you can choose your custom type.  Now we need to modify this to declare and setup new file type. In my case I created a simple <wrap hi>​text/​plain</​wrap>​ type. But you can choose your custom type. 
Line 59: Line 62:
 I was stumped here but thanks to the open source culture, Colomban on the Geany mailing list suggested to use any unused tag_parser to the [settings]. I was stumped here but thanks to the open source culture, Colomban on the Geany mailing list suggested to use any unused tag_parser to the [settings].
  
-Once all this is done, close the Geany and reopen. ​+Once all this is done, close the Geany and reopen
 +  * **Note:** For Windows: After restarting Geany if any *.txt were auto loaded from a previous session, you will need to close and reopen these files in order for the autocomplete to work.
  
 If you start Geany from command line as "geany -v", you should see the following or something similar. If you start Geany from command line as "geany -v", you should see the following or something similar.
Print/export