hari_vim at yahoo dot com,
May 11, 2006 12:48
|
You can also use the new <expr> to make these slightly more simpler:
inoremap <expr> <Esc> pumvisible()?"\<C-E>":"\<Esc>"
inoremap <expr> <CR> pumvisible()?"\<C-Y>":"\<CR>"
inoremap <expr> <Down> pumvisible()?"\<C-N>":"\<Down>"
inoremap <expr> <Up> pumvisible()?"\<C-P>":"\<Up>"
inoremap <expr> <PageDown> pumvisible()?"\<PageDown>\<C-P>\<C-N>":"\<PageDown>"
inoremap <expr> <PageUp> pumvisible()?"\<PageUp>\<C-P>\<C-N>":"\<PageUp>"
|
Anonymous,
May 11, 2006 13:22
|
Up/Down/PgUp/PgDn should all work fine out of the box
|
[email protected],
May 11, 2006 14:10
|
Cool!
But how stop completion by first right variant. I wana like in other IDEs just see popup with variants and complete only after chose and <enter> (popup content filtered-as-type).
|
Suresh Govindachar,
May 11, 2006 18:03
|
veged,
Map however you get into completion into something that
gets you to completion in the state you want to be in.
For example, use the following map to adjust the state
you get into when looking for spelling suggestions using
i_CTRL-X s:
inoremap <C-X>s <C-X>s<C-P><Down>
|
Anonymous,
May 11, 2006 19:38
|
Perhaps you will find the following option useful
set completeopt+=longest
|
[email protected],
May 11, 2006 22:06
|
For scrolling page up and page down, I also find this useful:
inoremap <expr> <C-D> pumvisible()?"\<PageDown>\<C-P>\<C-N>":"\<C-D>"
inoremap <expr> <C-U> pumvisible()?"\<PageUp>\<C-P>\<C-N>":"\<C-U>"
|
Gerald Lai,
May 12, 2006 12:29
|
Thanks Hari :) It'll take a little while for me to adjust from the Vim 6 way of doing things.
|
Anonymous,
May 13, 2006 16:28
|
I just want to be able to use j and k to browse through the suggestion list. Unbelievable that they made it so I have to take my hands off the home row to use the autocompletion...
|
Anonymous,
May 13, 2006 17:48
|
You still can, but will be restricted from typing those letters once the popup menu is up.
inoremap <expr> j pumvisible()?"\<C-N>":"j"
inoremap <expr> k pumvisible()?"\<C-P>":"k"
|
Anonymous,
June 5, 2006 16:07
|
you can also choose the highlighted word with just <space> to select this word and append space after it
|
[email protected],
June 10, 2006 7:16
|
Hi, you know how change the color of this pop up ?
|
[email protected],
June 29, 2006 17:25
|
For color:
highlight Pmenu term=NONE cterm=NONE ctermfg=7 ctermbg=5 gui=NONE guifg=White guibg=Magenta
highlight PmenuSel term=NONE cterm=NONE ctermfg=0 ctermbg=7 gui=NONE guifg=Black guibg=White
highlight PmenuSbar term=NONE cterm=NONE ctermfg=7 ctermbg=0 gui=NONE guifg=White guibg=Black
highlight PmenuThumb term=NONE cterm=NONE ctermfg=0 ctermbg=7 gui=NONE guifg=Black guibg=White
|