0

Hi i installed the neocomplcache script and its great but i want to use a feature its called SuperTab, and the documentation on the site i think its wrong but i know that somebody with .vimrc experience can help me. The site is this

In the script's site there are a bunch of lines you can add to your .vimrc to get features, there is a line that i think its badly formated, and thats why it doesnt work when i add like it is, the line is this:

" SuperTab like snippets behavior. 
"imap <expr><TAB> neocomplcache#sources#snippets_complete#expandable() ? "\<Plug>neocomplcache_snippets_expand)" : pumvisible() ? "\<C-n>" : "\<TAB>" 

I'll add the line with the paragraphs below and above it for context.

" Plugin key-mappings. imap
(neocomplcache_snippets_expand) smap
(neocomplcache_snippets_expand) inoremap
neocomplcache#undo_completion() inoremap
neocomplcache#complete_common_string()

" SuperTab like snippets behavior. "imap neocomplcache#sources#snippets_complete#expandable() ? "\(neocomplcache_snippets_expand)" : pumvisible() ? "\" : "\"

" Recommended key-mappings. " : close popup and save indent. inoremap neocomplcache#smart_close_popup() . "\" " : completion. inoremap pumvisible() ? "\" : "\" " , : close popup and delete backword char. inoremap neocomplcache#smart_close_popup()."\" inoremap neocomplcache#smart_close_popup()."\" inoremap neocomplcache#close_popup() inoremap neocomplcache#cancel_popup()

How am i supposed to add it to enable that feature? Thanks.

1 Answer 1

2

I don't think I understand the problem, but I'd do this:

" SuperTab like snippets behavior. 
imap <expr><TAB> neocomplcache#sources#snippets_complete#expandable() ? "\<Plug>(neocomplcache_snippets_expand)" : pumvisible() ? "\<C-n>" : "\<TAB>"
2
  • Yeah my explanation of the problem was bad, i know how to paste text, i wanted to know how to add that line to my .vimrc file because if i add it as it is it doesn't work, and i don't know what " i have to remove or if maybe is not one line but 3 different ones and i have to remove the " in all of them, i tried many combinations and nothing works. Sep 9, 2011 at 18:42
  • I updated my answer. A quotation mark is a comment so you should remove it from the imap line.
    – gpojd
    Sep 9, 2011 at 18:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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