set python tag files

This commit is contained in:
Stefan Liebl 2017-01-10 12:55:12 +01:00
parent e2b9a3ba4a
commit 31d186ddf9

View File

@ -6,7 +6,20 @@ setlocal tabstop=4
setlocal shiftwidth=4
setlocal formatoptions=croq
setlocal tags+=/usr/lib/python/tags
function! Set_python_tag_files()
python << endpython
import vim
import sys
import os
for p in sys.path:
tags = os.path.join(p, 'tags')
if os.path.exists(tags):
cmd = "setlocal tags+=%s" % tags
vim.command(cmd)
endpython
endfunction
call Set_python_tag_files()
nnoremap <TAB> :YcmCompleter GoTo<CR>
" commenting
let b:commentstring = '#'