I want to create some snippets when writting c++.
for example:
create a file, cpp.snippets.
priority -1
snippet exam
This is an example!
endsnippet
and put it in ~/.vim/my-snippets/snippets/.
then, add following statement in ~/.vimrc:
set runtimepath+=~/.vim/my-snippets/
let g:UltiSnipsSnippetsDir='~/.vim/my-snippets/'
let g:UltiSnipsSnippetDirectories=["snippets"]
But it not work, how can i fix it ?
If you are using the sirver/ultisnips
plugin (UltiSnips) the correct way to do this is simply run the :UltiSnipsEdit
command which opens up a custom snippets file for the current language / filetype.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With