Monday, November 17, 2014

Setup the ctags path in file .vimrc autometically

" set ctags path
let TAGS_PATH=substitute(system("pwd | cut -d '/' -f 2"),"\n","","")
"echo MYPATH
if TAGS_PATH == "1"
        set tags=/home/1/tags
elseif TAGS_PATH == "2"
        set tags=/home/2/tags
elseif TAGS_PATH == "3"
        set tags=/home/3/tags
elseif TAGS_PATH == "4"
        set tags=/home/4/tags
elseif TAGS_PATH == "5"
        set tags=/home/5/tags
elseif TAGS_PATH == "6"
        set tags=/home/6/tags
endif

No comments:

Post a Comment