Hallo,
ich benutze ctags in nVim unter Windows10.
Bei der Konfiguration habe ich jedoch einige Probleme
1 | function! UpdateTags()
|
2 | if ('' == g:pr1)
|
3 | echo "No project root to update tags defined"
|
4 | return
|
5 | endif
|
6 | let $ProRoot = g:pr2
|
7 | silent !find $ProRoot -type f -print | grep -E '\.(c(pp)?|h)$' > $ProRoot/scope.files
|
8 | echo g:pr2
|
9 | execute("cd " . g:pr2)
|
10 | "silent exec ':!start ctags -R --langmap=c:.c.h+.inc --c-kinds=+cdefglmnstuv --exclude=@C:/Users/XXXX/.ctagsignore -f C:/Users/XXXX/ctags 'g:pr2''
|
11 | silent exec ':!start ctags -R --langmap=c++:+.inc --c-kinds=+cdefglmnpstuv --fields=+ia --extra=+q --exclude=@C:/Users/XXXX/.ctagsignore -f C:/Users/XXXX/ctags 'g:pr2''
|
12 | " --c-kinds:
|
13 | " c: classes
|
14 | " d: macro definitions
|
15 | " e: enumerators
|
16 | " f: function definitions
|
17 | " g: enumeration names
|
18 | " l: local variables [off]
|
19 | " m: class, struct and union members
|
20 | " n: namespaces
|
21 | " p: function prototypes [off]
|
22 | " s: structure names
|
23 | " t: typedefs
|
24 | " u: union names
|
25 | " v: variable definitions
|
26 | " x: external and forward variable declarations [off]
|
27 | "cs add csope.out
|
28 | endfunction
|
g:pr2 ist der Pfad von dem geparst werden soll
meine .ctagsignore:
1 | .git
|
2 | .vs
|
3 | _build
|
4 | Doc
|
5 | Docs
|
6 | Html
|
7 | ExternalLinks/Parts_Store/GoogleTest
|
8 | CompilerProjects
|
9 | .gitattributes
|
10 | .gitignore
|
11 | build.bat
|
12 | editorconfig
|
13 | README.md
|
14 | *.exe
|
15 | *.bat
|
Wie muss ich unterliegende Ordner angeben, dass diese nicht mitgeparst
werden sollen?
.git, Doc... wird alles ignoriert, aber z.B.
ExternalLinks/Parts_Store/GoogleTest finde ich trotzdem noch in der
ctags-Datei.
Ist irgendwo beschrieben, wie die ctags datei generell aufgebaut ist?
in den ersten zeilen finde ich code-wörter wie
* $CASE
* $DEBUG
* §EXTEND
* §NOLOCALS
* $NOMOD166
dann fängt irgendeine Durchzählung an beginnend mit ein paar A, dann ein
paar A0, ein paar A1, A10, A11.. A15, A2... ...