diff --git a/.vimrc b/.vimrc index ed3912a..1756870 100644 --- a/.vimrc +++ b/.vimrc @@ -280,8 +280,10 @@ if has("cscope") if filereadable("cscope.out") cscope add cscope.out endif - " add the database pointed by environment variable - if $CSCOPE_DB != "" + " add the database pointed by environment variable. + " Cscope file added from db should contains full path to file. Otherwise they + " should be added with cscope add PATH_TO_CSCOPE_FILE PATH_TO_SRC_ROOT + if $CSCOPE_DB != "" if filereadable($CSCOPE_DB) cscope add $CSCOPE_DB endif @@ -330,7 +332,7 @@ if has("cscope") nmap d :vertical scscope find d =expand("") " s symbol find all references to the token under cursor " //find this C symbol - " g global find global definition of the token under cursori + " g global find global definition of the token under cursor " //find this definition " c calls find all calls to the function name under cursor " //find function calling this function @@ -348,9 +350,15 @@ endif " cat Makefile | grep '\-I\/' | tr '[:space:]' '\n' | grep '\-I/' | sort -u | tr '\n' ' ' " build tags database with shift+F8 or alt+F8 to ignore /usr/include +" --c++-kinds=+p : Adds prototypes in the database for C/C++ files. +" --fields=+iaS : Adds inheritance (i), access (a) and function +" signatures (S) information. +" --extra=+q : Adds context to the tag name. Note: Without this +" option, the script cannot get class members. + command! CtagsBuild \ :!echo 'building ctags database...' ; - \ ctags --fields=+iaS --extra=+q --totals -R && + \ ctags --fields=+iaS --extra=+q --totals -R --c++-kinds=+p && \ echo 'adding system headers...' ; \ find -exec gcc -M '{}' \; 2>&- | tr '[:space:]' '\n' | grep '^/.*' | sort -u | \ ctags --c-kinds=+px --c++-kinds=+px --fields=+iaS --extra=+q -aL- @@ -364,8 +372,8 @@ command! CscopeKernelBuild \ :!echo 'building cscope database in kernel mode...' ; \ cscope -bkR if has("cscope") - map :CtagsBuild:CscopeBuild:cscope reset - map :CtagsKernelBuild:CscopeKernelBuild:cscope reset + map :CtagsBuild:CscopeBuild:cscope reset:cscope add cscope.out + map :CtagsKernelBuild:CscopeKernelBuild:cscope reset:cscope add cscope.out else map :CtagsBuild map :CtagsKernelBuild @@ -510,13 +518,15 @@ let OmniCpp_MayCompleteDot = 1 " autocomplete after . let OmniCpp_MayCompleteArrow = 1 " autocomplete after -> let OmniCpp_MayCompleteScope = 1 " autocomplete after :: set path=.,..,/usr/local/include,/usr/include -" :set tags+=~/.vim/wxwidgetstags -set tags=tags + +set tags=./tags " in file directory +set tags+=tags " in current directory "for when programming in build dir set tags+=../tags set tags+=~/.vim/qttags set tags+=~/.vim/qtembedded +set tags+=~/.vim/tags/linux-sh4-ST-2.6.23.17 " Affichage du prototype d'une fonction sur le " plugin echofunc @@ -631,3 +641,15 @@ nnoremap t :call Translate() " trad files should be under /usr/share/vim/vimfiles/spell set spell spelllang=en set nospell + +""""""""""""" +" Latex " +""""""""""""" +" package vim-latexsuite +" Insert the following line in your ~/.vim/ftplugin/tex.vim file: +" imap it Tex_InsertItemOnThisLine +" compile with \ll +set grepprg=grep\ -nH\ $* +let g:tex_flavor = "pdflatex" +imap it Tex_InsertItemOnThisLine +let g:Tex_DefaultTargetFormat="pdf"