On Tue, Apr 17, 2007 at 08:09:06AM +0000, Eric Leenman wrote: > Hi, > > I'm using gvim 7.0 the word-completion function activated by CTRL-N. > When selecting the right word by pressing CTRL-N to step trough the list I > select the wanted word with pressing enter. > This results in the right word, but also an extra carriage return. > > Is it possible to select the right word with another key then the > enter-key, and thus staying on the same line before CTRL-N was pressed at > all? > > Rgds, > Eric
Hi! You may want to check vim tip 1386 i found it very useful. >From there you can get the following map :inoremap <expr> <cr> pumvisible() ? "\<c-y>" : "\<c-g>u\<cr>" which lets you keep using enter to select the word you want staying in the same line . RuiH