[zsh] tags + vimlatex
This commit is contained in:
parent
beabe7e08f
commit
932a4353a7
36
.vimrc
36
.vimrc
@ -280,7 +280,9 @@ if has("cscope")
|
||||
if filereadable("cscope.out")
|
||||
cscope add cscope.out
|
||||
endif
|
||||
" add the database pointed by environment variable
|
||||
" 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
|
||||
@ -330,7 +332,7 @@ if has("cscope")
|
||||
nmap <C-@><C-@>d :vertical scscope find d <C-R>=expand("<cword>")<CR><CR>
|
||||
" 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 <S-F8> :CtagsBuild<CR><CR>:CscopeBuild<CR><CR>:cscope reset<CR><CR>
|
||||
map <M-F8> :CtagsKernelBuild<CR><CR>:CscopeKernelBuild<CR><CR>:cscope reset<CR><CR>
|
||||
map <S-F8> :CtagsBuild<CR><CR>:CscopeBuild<CR><CR>:cscope reset<CR><CR>:cscope add cscope.out<CR><CR>
|
||||
map <M-F8> :CtagsKernelBuild<CR><CR>:CscopeKernelBuild<CR><CR>:cscope reset<CR><CR>:cscope add cscope.out<CR><CR>
|
||||
else
|
||||
map <S-F8> :CtagsBuild<CR><CR>
|
||||
map <M-F8> :CtagsKernelBuild<CR><CR>
|
||||
@ -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 <silent> <Leader>t :call Translate()<cr>
|
||||
" 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 <buffer> <leader>it <Plug>Tex_InsertItemOnThisLine
|
||||
" compile with \ll
|
||||
set grepprg=grep\ -nH\ $*
|
||||
let g:tex_flavor = "pdflatex"
|
||||
imap <buffer> <leader>it <Plug>Tex_InsertItemOnThisLine
|
||||
let g:Tex_DefaultTargetFormat="pdf"
|
||||
|
Loading…
Reference in New Issue
Block a user