What is the correct way to change where UltiSnips searches for snippets? I tried the lines below with no success:
let g:UltiSnipsSnippetsDir = "/newfolder/snippets/"
let g:UltiSnipsSnippetDirectories=["UltiSnipsNewDir"]
Vi and Vim Stack Exchange is a question and answer site for people using the vi and Vim families of text editors. It only takes a minute to sign up.
Sign up to join this communityI don't know what setting g:UltiSnipsSnippetsDir
actually does either UltiSnip's documentation is misleading or this is a bug. However, adding your directory to rtp
by itself does what you want.
set rtp+=/newfolder/snippets
let g:UltiSnipsSnippetDirectories=["UltiSnipsNewDir"]
:h UltiSnips-snippet-search-path
? It precises that your directoryUltiSnipsNewDir
must be a sub directory of one of them defined inruntimepath
, is your new directory placed in the right place?