I have configured UltiSnips for vim as described in the documentation of UltiSnips
" Track the engine. Plugin 'SirVer/ultisnips' " Snippets are separated from the engine. Add this if you want them: Plugin 'honza/vim-snippets' " Trigger configuration. Do not use <tab> if you use https://github.com/Valloric/YouCompleteMe. let g:UltiSnipsExpandTrigger="<tab>" let g:UltiSnipsJumpForwardTrigger="<c-b>" let g:UltiSnipsJumpBackwardTrigger="<c-z>" " If you want :UltiSnipsEdit to split your window. let g:UltiSnipsEditSplit="vertical"
Except that I am using vim-plug and the directory for the plugins is
My problem is that it seems as if my snippets won't get triggered every time. I have a test snippet in my
all.snippets which I can't execute. But I have added another trigger in my
html.snippets which I can execute in html files.
I then tried to save a snippet in the
vim.snippets which again cannot get executed or triggered. Is there another thing I have to configure?
Although I have added
let g:UltiSnipsEditSplit="vertical" to my
.vimrc, it just does not want to start my
/ultisnips/<filetype>.snippets in a vertical window it always starts in a seperate vim buffer.^
Here is my real .vimrc
call plug#begin('~/.vim/bundle') Plug 'honza/vim-snippets' Plug 'lervag/vimtex' let g:tex_flavor='latex' let g:vimtex_view_method='zathura' let g:vimtex_quickfix_mode=0 set conceallevel=1 let g:tex_conceal='abdmg' Plug 'SirVer/ultisnips' let g:UltiSnipsExpandTrigger='<tab>' let g:UltiSnipsJumpForwardTrigger='<tab>' let g:UltiSnipsJumpBackwardTrigger='<s-tab>' let g:UltiSnipsEditSplit='vertical' call plug#end()
I have created an html file and added some snippets for html files. These snippets work. Then when I try to add some snippets to my
all.snippets file which should be executed no matter in what kind of file I am, if I get that correctly. But this is not the case. Only one snippet file seems to work.
I have found out something about this problem:
My test html file is in
~/Projects/learn_vim/testing.html. When I use the
:UltiSnipsEdit command, it does not place the
html.snippets file where it is usually placing my snippet files: it placed it at this location:
~/Projects/learn_vim/UltiSnips/. And this file seems to work.
So I checked it further and it actually seems like it always creates an folder in the directory I am in with the snippet files. Could I just define one place for all my snippets?
Also I have found out what my "vertical" problem was, see my
Thank you for the patience