2009/8/30 Kevin <[email protected]>

>
> How would i set up vim to let me move through the completion menu
> popup using j and k, and selecting with enter?

You can do something like this:

inoremap j <C-r>=Jmap()<CR>
inoremap k <C-r>=Kmap()<CR>

function! Jmap()
    if pumvisible()
        return "\<C-n>"
    else
        return "j"
    endif
endfunction

function! Kmap()
    if pumvisible()
        return "\<C-p>"
    else
        return "k"
    endif
endfunction

This e-mail have an attach file with the code the source using :source
<path-to-file>/j_kmove.vim

-- 
----------------------------------------------
Roberto Miura Honji
LAS - Laboratório de Administração e Segurança de Sistemas
Engenharia de Computação - 2006
Instituto de Computação - UNICAMP

email: [email protected] (principal)
email: [email protected]
msn:   [email protected]
-------------------------------------------

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Attachment: j_kmove.vim
Description: Binary data

Reply via email to