Vim: snipMate plug-in does not trigger snippet completion

别来无恙 提交于 2020-01-01 05:12:52

问题


Vim is installed at /usr/share/vim.

All snipMate's folders were added to this category in existing folders (after, autoload, plugin, snippets, etc.) accordingly.

From the documentation file:

For instance, to change the trigger
key to CTRL-J, just change this:

ino <tab> <c-r>=TriggerSnippet()<cr> 
snor <tab> <esc>i<right><c-r>=TriggerSnippet()<cr>

to this: 
ino <c-j> <c-r>=TriggerSnippet()<cr>  
snor <c-j> <esc>i<right><c-r>=TriggerSnippet()<cr>

I tried this as well - the same result. When I try to trigger snippet match it only adds a tab (4 spaces, accordingly to my .vimrc).

P.S. filetype plugin indent on.

Updated:

cat /etc/issue
Ubuntu 9.10

:inoremap

i  <C-B>       * <C-R>=TriggerSnippet()<CR>

:snoremap

s  <C-B>       * <Esc>i<Right><C-R>=TriggerSnippet()<CR>

How can I fix this?


回答1:


I had a problem with snipMate, it wasn't working, so I came across with Issue 66 in their Issue Tracker:

source ~/.vim/after/plugin/snipMate.vim



回答2:


I solved this problem by removing the 'set paste' entry on .vimrc




回答3:


In my case, I experienced the same thing. SnipMate autocomplete does not work. One of the reasons is the is used by other plugin. Typing :verbose imap <Tab> will show you which plugin that utilizes the key and cause the conflict. You can either comment out the plugin in .vimrc or you can change it to use another key.



来源:https://stackoverflow.com/questions/1899217/vim-snipmate-plug-in-does-not-trigger-snippet-completion

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!