使用VIM时,同时使用snipMate和pydiction(共享<;tab>;键?)

使用VIM时,同时使用snipMate和pydiction(共享<;tab>;键?),vim,autocomplete,code-snippets,Vim,Autocomplete,Code Snippets,我试图在vim中同时使用和-但是,两者都使用键来执行他们的genius-auto-completion-snippet-rendering-goodness-that-I-so-desire 安装pydiction后,snipMate停止工作。我认为这是因为他们不能同时拥有键。我怎样才能让他们一起工作 我不介意将其中一个映射到另一个键,但我真的不知道如何做到这一点。。。(可能是对键的选择,以便模仿vim的自动完成?) 以下是相关的。vimrc: filetype indent plugin on

我试图在vim中同时使用和-但是,两者都使用
键来执行他们的genius-auto-completion-snippet-rendering-goodness-that-I-so-desire

安装pydiction后,snipMate停止工作。我认为这是因为他们不能同时拥有
键。我怎样才能让他们一起工作

我不介意将其中一个映射到另一个键,但我真的不知道如何做到这一点。。。(可能是对
键的选择,以便模仿vim的自动完成?)

以下是相关的。vimrc:

filetype indent plugin on 

autocmd FileType python set ft=python.django 
autocmd FileType html set ft=html.django_template 

let g:pydiction_location = '~/.vim/ftplugin/pydiction-1.2/complete-dict'

这是Snipmate帮助文件中的内容:)

*snipMate重新映射*
snipMate没有自定义触发键的设置,但是
可以在“after”目录中定义的两行中轻松地重新映射它
在“plugin/snipMate.vim”下。例如,更改触发键
要按CTRL-J键,只需更改以下内容:>
ino=TriggerSnippet()
snor i=TriggerSnippet()
对此:>
ino=TriggerSnippet()
snor i=TriggerSnippet()

或者,您可以编辑
~/.vim/after/ftplugin/python\u pydiction.vim
并将
选项卡
更改为其他内容:

" Make the Tab key do python code completion:
inoremap <silent> <buffer> <Tab> 
         \<C-R>=<SID>SetVals()<CR>
         \<C-R>=<SID>TabComplete('down')<CR>
         \<C-R>=<SID>RestoreVals()<CR>

" Make Shift+Tab do python code completion in the reverse direction:
inoremap <silent> <buffer> <S-Tab> 
         \<C-R>=<SID>SetVals()<CR>
         \<C-R>=<SID>TabComplete('up')<CR>
         \<C-R>=<SID>RestoreVals()<CR>
“使Tab键完成python代码:
inoremap
\=SetVals()
\=TabComplete('down')
\=RestoreVals()
“makeshift+Tab按相反方向完成python代码:
inoremap
\=SetVals()
\=TabComplete('up'))
\=RestoreVals()

我相信自2009年卡雷尔给出答案以来,更改触发键的方式可能已经改变,但它位于同一个目录中,即“after/plugin/snipMate.vim”。我在帮助文件中也找到了它:

 *snipMate-trigger*
snipMate comes with a setting to configure the key that is used to trigger
snipMate. To configure the key set g:snips_trigger_key to something other than
<tab>,e.g. <c-space> use:

 let g:snips_trigger_key='<c-space>'
*snipMate触发器*
snipMate附带一个设置,用于配置用于触发的密钥
斯尼普马特。要配置密钥集,请将g:snips\u trigger\u密钥设置为
,例如使用:
让g:snips\u trigger\u key=''

完美-谢谢!也许在我所有的搜索中,我应该更仔细地查看帮助文档。Heh.不再正确,现在文档指定可以使用
imap snipMateNextOrTrigger
smap snipMateNextOrTrigger
+1@TKrugg使用重映射提交我的点文件。
 *snipMate-trigger*
snipMate comes with a setting to configure the key that is used to trigger
snipMate. To configure the key set g:snips_trigger_key to something other than
<tab>,e.g. <c-space> use:

 let g:snips_trigger_key='<c-space>'