Is there a way to change the behavior of the vim omnicomplete menu?

vim completeopt
vim omnicomplete while typing
vim omnicomplete c++
autocomplpop
vim supertab
vim autocomplete
vim omnicomplete tab
vim omnicomplete install

Omnicompletion is working, but it automatically inserts the first result.

What I'd like to do is open the omnicomplete menu, then be able to type to narrow down the results, then hit enter or tab or space or something to insert the selected menu item.

Is this possible?

The command you are looking for is:

:set completeopt+=longest

It will insert the longest common prefix of all the suggestions, then you can type and delete to narrow down or expand results.

Make Vim completion popup menu work just like in an IDE, With Vim's initial popup menu settings, the behavior of the popup menu is a little less will change the 'completeopt' option so that Vim's popup menu doesn't select the In the above mappings, the first will make <C-N> work the way it normally It would be really nice if the above functionality for omni-complete would fall� 15 Is there a way to change the behavior of the vim omnicomplete menu? Nov 21 '08 9 Is there any way to get python omnicomplete to work with non-system modules in vim?

set wildmenu
set wildmode=list:longest,full

Found here. There is also a great plugin for all of your completion needs called SuperTab continued.

Omni completion | Vim Tips Wiki, A popup menu offers word completion choices that may include struct and class filetype plugin on set omnifunc=syntaxcomplete#Complete scripts can be written to support other languages, and to customize behavior. This is to be an overview of omnicompletion, with links to more detailed tips Any word completion. I am trying to customize my vim popup completion menu as per this guide: Vim Wiki: "Omni completion popup menu". It notes. add to your vimrc if you always want this choice. However, with the following settings in my .vimrc file. colo desert filetype plugin on set ofu=syntaxcomplete#Complete highlight Pmenu guibg=brown gui=bold I get the following:

This plugin might do what you are after: autocomplpop

Or you can try and make Vim completion popup menu work just like in an IDE.

insert, Special keys *ins-special-keys* In Insert and Replace mode, the following If you want to do it in a different way set the 'formatexpr' option to an When the popup menu is displayed there are a few more special keys, see |popupmenu- keys|. The behavior of the <Enter> key depends on the state you are in: first state: Use� Vim is great, but Vim is ultimately just a powerful text editor. BG is correct in that the anti-IDE stance is alluring for junior devs, providing false machismo in the absence of experience and well-honed skills. We really need to change the way we talk about Vim. Here are my suggestions: Stop comparing it to emacs. They are vastly different

This is the general Vim completion behaviour. For a complete overview, you can do

:he compl-current

But for your specific case (which you require the completion to be in state 2 or 3 (described in the document above). You can simply use Backspace, or Control-H to jump from state one to state two. In state 2 you can narrow the search by typing regular characters. So to complete completion with narrowing:

compl<C-X><C-P><BS>letion

It is totally backwards, I know, but that's how it works.

Edit: You can use the Down arrow key too isntead of Control-H or Backspace, and it has the benefit of not deleting a character.

my vimrc � GitHub, endif " }}} " [[ Vim Settings ]] {{{ " vimrc set options howto " :help options.txt, first one, will affect other options " set cpoptions= " flags for Vi compatible behavior. completion. set report=0 " always report changed lines " [ omni ] " complete with let cursor line in middle will make popup menu have enough space to display. Note: type :colorscheme and hit Tab in order to find available colorsschemes installed for your Vim . To use vim as default editor, use this. export EDITOR=/path/to/vim or simply export EDITOR=vim. or you can save this in your rc file

switching `<Down>` and `<Cn>` in popup menu, I'd like to switch the behaviour of the <Down> and <C-n> keys when the popup menu (like from omnicompletion) is visible (and <Up> / <C-p>� Now Vim expects that the right-hand is some (valid) VimScript expression. This expression is evaluated every time the key is pressed and the result is used as the action. Here we use the pumvisible() function (short for "pop-up menu visible") to check if the popup menu is visible. If it is, just go up/down.

Omnicomplete shows strange behavior when preview window is , Omnicomplete shows strange behavior when preview window is enabled I'm currently investing some time learning vim and setting my .vimrc up. Doing so I've come across popup completion menu closes quickly when there is a fold in the buffer. (Jan So, I expect some autocmd or mapping is interfering in some way. There are also some great books and articles that tell you that there is a philosophy behind the way Vim works and that the commands in VI/Vim are meant to be combined. Absolutely true and I’m sure you will appreciate it once you get used to the editor and the power it provides.

Let Vim do the typing, This presentation will explore a few ways to avoid typing by getting behaviour is modified by pressing modifier keys instead of changing mode. Vim commands, but they are useful, and have their place in the Vim editing philosophy. When the completion menu appears, you can use ctrl + p and ctrl + n� There are good chances that you've checked stackoverflow looking for the easiest way to clear last unless there’s this special case where you need the recursive behavior. Vim has commands

Comments
  • After doing that, pressing tab again completes fully instead of completing the next longest common prefix. Is there a way to do that?
  • @AlexanderDuchene You might have another plugin that's doing this to you.