add ctags config
This commit is contained in:
parent
908952c231
commit
b80698be39
1
.gitignore
vendored
1
.gitignore
vendored
@ -3,3 +3,4 @@ procmailrc
|
|||||||
*~
|
*~
|
||||||
*.pyc
|
*.pyc
|
||||||
gitconfig
|
gitconfig
|
||||||
|
ctags
|
||||||
|
6
Makefile
6
Makefile
@ -1,5 +1,5 @@
|
|||||||
FILES = bashrc vimrc zshrc emacs.el gitconfig screenrc commonshrc \
|
FILES = bashrc vimrc zshrc emacs.el gitconfig screenrc commonshrc \
|
||||||
gnomerc gvimrc muttrc pentadactylrc mailcap latexmkrc
|
gnomerc gvimrc muttrc pentadactylrc mailcap latexmkrc ctags
|
||||||
FILES2 = msmtprc
|
FILES2 = msmtprc
|
||||||
|
|
||||||
.PHONY: install clean check
|
.PHONY: install clean check
|
||||||
@ -41,6 +41,10 @@ install-vim-plug:
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
|
$(RM) gitconfig ctags
|
||||||
|
|
||||||
|
ctags: ctags.in
|
||||||
|
grep '^-' $< >$@
|
||||||
|
|
||||||
%: %.m4
|
%: %.m4
|
||||||
m4 $< >$@
|
m4 $< >$@
|
||||||
|
29
ctags.in
Normal file
29
ctags.in
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
--recurse=yes
|
||||||
|
--tag-relative=yes
|
||||||
|
--exclude=.git
|
||||||
|
--exclude=build
|
||||||
|
|
||||||
|
# latex config from https://github.com/vim-scripts/latex-support.vim/blob/master/latex-support/rc/customization.ctags
|
||||||
|
--langdef=latex
|
||||||
|
--langmap=latex:.tex
|
||||||
|
--regex-latex=/^\\part[[:space:]]*(\[[^]]*\])?[[:space:]]*\{([^}]+)\}/PART \2/s,section/
|
||||||
|
--regex-latex=/^\\part[[:space:]]*\*[[:space:]]*\{([^}]+)\}/PART \1/s,section/
|
||||||
|
--regex-latex=/^\\chapter[[:space:]]*(\[[^]]*\])?[[:space:]]*\{([^}]+)\}/CHAP \2/s,section/
|
||||||
|
--regex-latex=/^\\chapter[[:space:]]*\*[[:space:]]*\{([^}]+)\}/CHAP \1/s,section/
|
||||||
|
--regex-latex=/^\\section[[:space:]]*(\[[^]]*\])?[[:space:]]*\{([^}]+)\}/. \2/s,section/
|
||||||
|
--regex-latex=/^\\section[[:space:]]*\*[[:space:]]*\{([^}]+)\}/. \1/s,section/
|
||||||
|
--regex-latex=/^\\subsection[[:space:]]*(\[[^]]*\])?[[:space:]]*\{([^}]+)\}/.. \2/s,section/
|
||||||
|
--regex-latex=/^\\subsection[[:space:]]*\*[[:space:]]*\{([^}]+)\}/.. \1/s,section/
|
||||||
|
--regex-latex=/^\\subsubsection[[:space:]]*(\[[^]]*\])?[[:space:]]*\{([^}]+)\}/... \2/s,section/
|
||||||
|
--regex-latex=/^\\subsubsection[[:space:]]*\*[[:space:]]*\{([^}]+)\}/... \1/s,section/
|
||||||
|
--regex-latex=/^\\includegraphics[[:space:]]*(\[[^]]*\])?[[:space:]]*(\[[^]]*\])?[[:space:]]*\{[[:space:]]*([^}]+)[[:space:]]*\}/\3/g,graphics/
|
||||||
|
--regex-latex=/^\\lstinputlisting[[:space:]]*(\[[^]]*\])?[[:space:]]*(\[[^]]*\])?[[:space:]]*\{[[:space:]]*([^}]+)[[:space:]]*\}/\3/i,listings/
|
||||||
|
--regex-latex=/\\frametitle[[:space:]]*\{([^}]+)\}/ # \1/s,section/
|
||||||
|
--regex-latex=/\\label[[:space:]]*\{([^}]+)\}/\1/l,label/
|
||||||
|
--regex-latex=/\\bibitem[[:space:]]*\[([^]]*)\]\{([^}]+)\}/\1 \2/b,bibitem/
|
||||||
|
--langdef=bibtex
|
||||||
|
--langmap=bibtex:.bib
|
||||||
|
--regex-bibtex=/@string\{([^ "#%')(,=}{]+)/\1/s,BibTeX-Strings/i
|
||||||
|
--regex-bibtex=/@(article|book|booklet|inbook|incollection|inproceedings|manual|masterthesis|misc|phdthesis|proceedings|techreport|unpublished)\{([^,]+),/\2 [\1]/e,BibTeX-Entries/i
|
||||||
|
--regex-bibtex=/[[:space:]]*author[[:space:]]*=[[:space:]]*("([^"]+)"|\{([^\}]+)\})[[:space:]]*,?[[:space:]]*$/\2\3/a,BibTeX-Authors/i
|
||||||
|
--regex-bibtex=/[[:space:]]*title[[:space:]]*=[[:space:]]*["\{](\{[:word:]+\}.+|.+)(["}][[:space:]]*,[[:space:]]*$|$)/\1/t,BibTeX-Titles/i
|
Loading…
Reference in New Issue
Block a user