What is the correct way to change where UltiSnips searches for snippets. I tried this in my ~/.vimrc
with no success:
let g:UltiSnipsSnippetsDir = "/newfolder/snippets/"
let g:UltiSnipsSnippetDirectories=["UltiSnipsNewDir"]
What is the correct way to change where UltiSnips searches for snippets. I tried this in my ~/.vimrc
with no success:
let g:UltiSnipsSnippetsDir = "/newfolder/snippets/"
let g:UltiSnipsSnippetDirectories=["UltiSnipsNewDir"]
first one just use the full path like ex:
let g:UltiSnipsSnippetsDir = "~/.vim/bundle/ultisnips/UltiSnips"
This works for me:
First add this line to .vimrc
file:
leg g:UltiSnipsSnippetDirectories=["FolderA","FolderB"]
Then put your snips under folder:
~/vim/bundle/vim-snippets/FolderA
Notice: the middle path should be "vim-snippets" not "ultisnips" if relative path is used, because the snippets are separated from the engine, it's another plugin 'honza/vim-snippets'.
BTW, UltiSnipsSnippetDirectories
is where ultisnips searchs snips, UltiSnipsSnippetsDir
is where to save snips when you type :UltiSnipsEdit
to create a snip.