On Thu, 21 Jul 2011, Carlo Trimarchi wrote:
On 21 July 2011 17:51, Benjamin R. Haskell wrote:
If the key notation isn't working, you might have the 'k' or '<'
option(s) set in 'cpo'. Or you might be in 'compatible' mode. (Just
FYI, since that can cause hard-to-diagnose problems later.)
I have this on top of .vimrc:
set nocompatible "Don't be compatible with vi
(Technically, that's the default if you have a .vimrc at all. But it
doesn't hurt to set it explicitly.)
Then with ":set cpo" I have this output:
cpoptions=aABceFs
Hmm. Okay, not the problem. That matches my output.
Anyway I followed the instructions reported here:
http://vim.wikia.com/wiki/Omni_completion_popup_menu#Using_SuperTab
I assume you don't mean the first suggestion (since it's what you
reported didn't work before):
let g:SuperTabDefaultCompletionType = "<C-X><C-O>"
well, I linked this just to show where I got the tip.
Ah. Sorry. I thought you meant that you followed the instructions
there *and then it worked*.
Personally, I use the second suggestion (which is different from
using "<c-x><c-o>" by default):
let g:SuperTabDefaultCompletionType = 'context'
well, I put this line in .vimrc and now the tab key still does nothing
(no completion), but if I press ctrl-p it outputs the word "context"
Hmm. Well, both of those work for me.
What version of Vim are you using and on what O/S?
Try only enabling filetype detection and SuperTab (all on one line):
vim -u NONE -i NONE -N --noplugin
-c 'let g:SuperTabDefaultCompletionType="<c-x><c-o>"'
-c 'filetype plugin on'
-c 'runtime plugin/supertab.vim'
Then edit a filetype that defines its own omnicompletion and try it with
tab.
E.g.
:e test.php " edit a PHP file
i<?php " insert a PHP start tag
str<tab> " should complete to str_ireplace( or some other fn
If that works, then it's an interaction with another plugin that's
causing the problem. Otherwise, maybe supertab.vim isn't installed into
the right place. Are you using any kind of plugin manager?
--
Best,
Ben
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php