File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed
Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change 1+ # You can for example bound this script to CTRL+SHIFT+C in Settings > Shortcut Mapper > Plugins Commands > Run Previous Script
2+ # It will show a typical Notepad++/Scintilla autocompletion list, but based on the content of the `tags` file in the current file directory
3+
4+ # The CTags format is described there: http://ctags.sourceforge.net/FORMAT
5+ # But this script will also work if the `tags` file simply contains one word per line
6+
7+ import os
8+ ctags_filepath = os .path .join (os .path .dirname (notepad .getCurrentFilename ()), 'tags' )
9+ if os .path .exists (ctags_filepath ):
10+ with open (ctags_filepath ) as ctags_file :
11+ ctags = set (line .split ('\t ' )[0 ] for line in ctags_file .readlines () if not line .startswith ('!' ))
12+ editor .autoCShow (0 , ' ' .join (sorted (ctags )))
You can’t perform that action at this time.
0 commit comments