I know that doing :UltiSnipsAddFiletypes javascript-node in vim console works. But I need this load automatically whenever I open a javascript file. Regardless documentation, I understood that I should create a ftplugin/javascript.vim file and put :UltiSnipsAddFiletypes javascript-node in first line. The thing is those snippets are not loaded.
So, how can make this works please?
You can use an autocmd in your .vimrc:
autocmd FileType javascript UltiSnipsAddFiletypes javascript-node
Just to add on to @tckmn 's answer, I used this for multiple filetypes, keeping in mind that UltiSnipsAddFiletypes uses . as a delimiter:
autocmd FileType javascript,javascriptreact,typescript,typescriptreact
\ UltiSnipsAddFiletypes javascript.javascriptreact.typescript.typescriptreact
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