I am trying to add for the cuda (.cu) files. The basic objective is to first make all c,cpp snippets available for the cu files and then add additional support. The first thing I did to test is to set the filetype inside vim
set ft:cpp.c
and this works. Then I tried to go to the vim-snippets/snippets
and vim-snippets/UltiSnips
and tried to copy the cpp.snippets file to cu.snippets. But this is not working (not working as in --the snippets are not detected--) . I have also added
au BufNewFile,BufRead *.cu set ft=cuda
au BufNewFile,BufRead *.cuh set ft=cuda
in my .vimrc. Even after this it is not working.
I also checked the UltiSnipsSnippetDirectories
. It is pointing to Ultisnips
.
I also tried creating a cu.snippets which just tries to extend cpp (nothing else). This is also not working.
As a side question: As far I understand https://github.com/honza/vim-snippets has two folders with snippets. snippets/*
for the snipmate based ones and UltiSnips/*
for the ultisnips based ones. However the inc
snippet is only provided on the c.snippets in snippets directory (not in ultisnips). But strangely inc
works on c
files for me. I am positive that I am not using snipmate. How could this happen? Am I missing something. or is it that ultisnips can understand both formats?