linux - How to set the root of git repository to vi/vim find path? -


i want set vim file search path include git repository root (which can found git rev-parse --show-toplevel). can't figure out how append output of git command "set path=.,,**" in .vimrc.

thanks!

you can use command:

let &path .= "," . system("git rev-parse --show-toplevel | tr -d '\\n'") 

that said, start vim top-level directory of project , never change working directory that's 1 less setting worry about.

see :help system() , :help :let


Comments

Popular posts from this blog

IF statement in MySQL trigger -

c++ - What does MSC in "// appease MSC" comments mean? -

javascript - Blogger related post gadget image Resize s72-c [ Need Expert Help ] -