我正在尝试使用snipMate和 pydiction在 vim 中一起使用 - 然而,两者都使用 <tab>
实现他们的天才自动完成片段渲染良好性的关键。
安装 pydiction 后,snipMate 停止工作。我认为这是因为他们不能同时拥有 <tab>
key 。我怎样才能让他们一起工作?
我不介意将其中一个映射到不同的键,但我不太确定如何执行此操作...(也许 pydiction 到 <ctrl-n>
键,以便它模仿 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-remap*
snipMate does not come with a setting to customize the trigger key, but you
can remap it easily in the two lines it's defined in the 'after' directory
under 'plugin/snipMate.vim'. 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>
关于vim - 使用 VIM,同时使用 snipMate 和 pydiction (共享 <tab> 键?),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1687252/