We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 77a365b + 603676b commit 1402c12Copy full SHA for 1402c12
1 file changed
scripts/Samples/CTags Based Autocompletion.py
@@ -0,0 +1,12 @@
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)))
0 commit comments