add ctags config

This commit is contained in:
Gabriel Ebner 2015-02-09 14:00:14 +01:00
parent 908952c231
commit b80698be39
3 changed files with 35 additions and 1 deletions

1
.gitignore vendored
View File

@ -3,3 +3,4 @@ procmailrc
*~
*.pyc
gitconfig
ctags

View File

@ -1,5 +1,5 @@
FILES = bashrc vimrc zshrc emacs.el gitconfig screenrc commonshrc \
gnomerc gvimrc muttrc pentadactylrc mailcap latexmkrc
gnomerc gvimrc muttrc pentadactylrc mailcap latexmkrc ctags
FILES2 = msmtprc
.PHONY: install clean check
@ -41,6 +41,10 @@ install-vim-plug:
endif
clean:
$(RM) gitconfig ctags
ctags: ctags.in
grep '^-' $< >$@
%: %.m4
m4 $< >$@

29
ctags.in Normal file
View 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