Skip to content

Instantly share code, notes, and snippets.

@huskercane
Last active May 21, 2021 13:01
Show Gist options
  • Save huskercane/7c1bee0c8076ff78dba48383b215b45a to your computer and use it in GitHub Desktop.
Save huskercane/7c1bee0c8076ff78dba48383b215b45a to your computer and use it in GitHub Desktop.
set lines=100
set columns=133
" Enable debugging
" let g:ycm_keep_logfiles = 1
" let g:ycm_log_level = 'debug'
let g:tags_path = "/home/rohits/.ctags.d,/usr/lib/python3/dist-packages/Tags"
set tags=./tags,../tags,../inc/tags
function! BuildTagsFromDir()
python3 << EOF
import sys
import vim
from os import listdir
from os.path import isfile, join
tagsPath = vim.eval("g:tags_path")
pathsSplit = tagsPath.split(",")
tags = vim.eval("&tags")
for path in pathsSplit:
onlyfiles = [f for f in listdir(path) if isfile(join(path, f))]
for afile in onlyfiles:
if afile.endswith(".tags"):
tags += ",%s" % (join(path, afile))
cmdSetTags = "set tags=%s" % tags
vim.command(cmdSetTags)
EOF
endfunction
call BuildTagsFromDir()
" tagbar
nmap <F8> :TagbarToggle<CR>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment