简体   繁体   中英

Vim: snipMate plug-in does not trigger snippet completion

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).

PS 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?

我通过删除.vimrc上的'set paste'条目解决了这个问题

我在使用snipMate时遇到问题,它无法正常工作,因此我在他们的Issue Tracker中遇到了Issue 66

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

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM