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 can't use snipmate on my vim. I installed it as explained

filetype plugin on in .vimrc

and unzipped all the content of snipMate.zip to my .vim folder...

Normally I have autocomplete too (mapped to TAB) after unzipping all the files, then my tab autocompletion doesn't work neither.

Maybe the cause that snipmate doesn't work is because my source files extensions are *.v. Maybe it is because of that, it doesn't work??

Can anyone help me with this, because this plugin together with autocompletion will help me a lot

share|improve this question

1 Answer 1

up vote 2 down vote accepted

You can't have both snipMate and your auto-complete mapping on <Tab>; the last one wins. Check with

:verbose imap <Tab>

The file extension is not essential to snipMate; what matters is that the filetype is properly detected. Check with

:setl filetype?

You can manually :setl filetype=... to correct this, buy you probably want to tweak the filetype-detection if you use those file extensions frequently.

A good way to check what snippets snipMate has loaded is the auto-completion in insert mode via <C-R><Tab>.

If you continue to have problems, I recommend to disable other plugins and customizations first, and then try to add them back once snipMate is working.

share|improve this answer
    
Can I change the tab to another key for snippet completion? because I want to stay using tab for autocompletion of variable names etc –  Ozkan Feb 22 '13 at 9:52
    
Yes, you have to edit ~/.vim/after/plugin/snipMate.vim; it'll still return <Tab> when there's no snippet, though. –  Ingo Karkat Feb 22 '13 at 9:57
    
Everything works fine, I first disabled all plugins and now it works. But for syntax highlighting I add following: au BufRead,BufNewFile *.* set filetype=newhorizon <br/> au! Syntax newhorizon source $HOME/.vim/syntax/newhorizon.vim And this changes the filetype which leads to snipmate not working @Ingo Karkat –  Ozkan Feb 22 '13 at 10:22
    
If you just want different syntax, use :setl syntax=newhorizon instead :set filetype=. If it's indeed a different filetype, you have to define / copy / symlink the snippets there. –  Ingo Karkat Feb 22 '13 at 10:36
    
If I paste setl syntax=newhorizonin my vimrc it doesnt work, but if I open a file and write :setl syntax=newhorizon there, then I have highlighting, autocompletion and snippets. Why is syntax not set in vimrc? And what do you mean with 'you have to define / copy / symlink the snippets there.' –  Ozkan Feb 22 '13 at 10:51

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.