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 using spf13-vim in Fedora. When I try to use a snippet, I get options that pop up but when I don't know how to actually insert the snippet. For example, if I type for in a .cpp file, I get four options. I'm assuming I'm supposed to either hit tab or enter to insert them but neither works. I'm not even sure which vim plugin it is that the snippets come from (snipmate? neocomplcache?).Screenshot. The same problem happens in vim and gvim.

share|improve this question

2 Answers 2

up vote 4 down vote accepted

You can read about neocomplcache in :h neocomplcache.

You commited one big mistake: you installed a pre-backed package without looking at what it does, how it does it or why. Now you end up with things you don't understand that happen against your will and outside of your control and you are lost.

Take my advice: drop this stupid distribution, write your own ~/.vimrc as you go and install your plugins yourself, as you need them. Being completely in control of your environment is unvaluable.

share|improve this answer
2  
+1 for the rant against pre-packaged distributions. It may be right for some people (e.g. a local dev community), but this issue perfectly illustrates the pitfalls. –  Ingo Karkat Dec 13 '12 at 8:11
    
This isn't the only problem I've run into related to not knowing which plugin was controlling what. I think I'll take your advice, and thanks for letting me find the answer in :h neocomplache. I found the lines in my .vimrc file for snippet expansions - imap <C-k> <Plug> and smap <C-k> <Plug>. –  raoulcousins Dec 13 '12 at 16:54
    
@raoulcousins, please note that I'm not playing smartass by not giving you the correct mapping: the documentation is really the first place to look for answers which are there 90% of the time. Most questions here could be answered with a dry :help whatever. And I don't use neocomplcache. –  romainl Dec 13 '12 at 17:53
    
@romainl I agree that documentation is useful, but for answering my specific question the most important part of your answer was saying it was neocomplcache. It's hard to use :help x when you don't know x (another argument against prepackaged vim). –  raoulcousins Dec 13 '12 at 18:40

What you search is CTRL+K

NeoComplCache not only uses it to choose position from the list but also to jump between positions in the snippets (${1:some_text}).

Beginners make many mistakes in the configuration file which makes the VIM unusable.
Good books and proved configurations are OK.

share|improve this answer

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.