Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm picking up vim and found 2 plugins that work great - snipMate, that mimics the textmate's snippet behavior and supertab, that toggles and completes words using the tab key based on exiting words in current/other buffers. I've turned all plugins on in my .vimrc file using :filetype plugin on, but I can only get supertab to work. I suspect that since the TAB key is used for both, they are overriding each other. Has anyone encountered this and found a fix? I'm not an expert yet on editing my .vimrc file, mapping keys, etc. Thanks.

EDIT

When I try to force load snipMate.vim alone, I get the following errors:

Error detected while processing /home/sa125/.vim/plugin/snipMate.vim:
line   15:
E122: Function <SNR>18_RemoveSnippet already exists, add ! to replace it
line   73:
E122: Function snipMate#expandSnip already exists, add ! to replace it
line  112:
E122: Function <SNR>18_ProcessSnippet already exists, add ! to replace it
line  123:
E122: Function <SNR>18_Count already exists, add ! to replace it
line  169:
E122: Function <SNR>18_BuildTabStops already exists, add ! to replace it
line  211:
E122: Function snipMate#jumpTabStop already exists, add ! to replace it
line  258:
E122: Function <SNR>18_UpdatePlaceholderTabStops already exists, add ! to replace it
line  302:
E122: Function <SNR>18_UpdateTabStops already exists, add ! to replace it
line  321:
E122: Function <SNR>18_SelectWord already exists, add ! to replace it
line  385:
E122: Function <SNR>18_UpdateChangedSnip already exists, add ! to replace it
line  434:
E122: Function <SNR>18_UpdateVars already exists, add ! to replace it  

Am I doing it wrong?...

share|improve this question
    
i have the same problem but the other way round. i only get snipmate to work but not supertab. both work standalone –  matthias krull Aug 10 '10 at 13:49
    
what version of vim are you using? what OS? What other plugins do you use? –  matthias krull Aug 10 '10 at 14:49
add comment

2 Answers

up vote 4 down vote accepted

Ok i got it working with the scripts linked in the original question.

It turned out that i used supersnipmate, a snipmate fork, that unfortunately removed the builtin supertab support of snipmate.

Also i did use the original supertab hosted on vim.org that did not work with snipmate as well. The linked script on github turned out to be the successor (or continued version) of the old supertab.

share|improve this answer
add comment

I have both working well together.

The only relevant line in my .vimrc is:

let g:SuperTabDefaultCompletionType = "context"
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.