Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

VIM: turn off autocomplete but keep hint

Tags:

vim

I am new to VIM, and I come from Eclipse/VS world.

It seems that when I use Ctrl + N, it auto completes the function, and when I type sys (I intend to get syslog), it automatically auto completes the name to sysSync (the first item in the hint list is sysSync).

The problem is that the sys is auto completed to sysSync. When i continue to type l, it becomes sysSyncl, instead of sysl. I found it is too annoying.

My question is how can I turn off the auto complete but get the hint window open, like when I type sys, it leaves the sys untouched, but gives me the hint list to choose from?

What should I put in my .vimrc file?

Thanks very much for your time.

like image 695
Grey Avatar asked May 15 '12 14:05

Grey


1 Answers

Have a look at http://vim.wikia.com/wiki/Make_Vim_completion_popup_menu_work_just_like_in_an_IDE. It describes a setup where the first entry of the popup menu is only selected (so you can accept it quickly via CTRL-Y), but not yet inserted into the text (so you can continue typing).

like image 158
Ingo Karkat Avatar answered Sep 19 '22 22:09

Ingo Karkat