diff --git a/vimfiles.stefan/after/ftplugin/python.vim b/vimfiles.stefan/after/ftplugin/python.vim index 08c56e7..e168db0 100644 --- a/vimfiles.stefan/after/ftplugin/python.vim +++ b/vimfiles.stefan/after/ftplugin/python.vim @@ -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 :YcmCompleter GoTo " commenting let b:commentstring = '#'