On 26/12/08 11:54, Robert Mark Bram wrote:
> Hi All,
>
> I have these mappings in my .vimrc so that when I go up and down, I
> move one screen line at a time, rather than one paragraph at a time.
>
> imap<silent>  <Down>  <C-o>gj
> imap<silent>  <Up>  <C-o>gk
> nmap<silent>  <Down>  gj
> nmap<silent>  <Up>  gk
>
> However, I found that these settings break going up and down the auto-
> fill lists (control n/p). Does anyone know how to modify these
> mappings to avoid this issue?
>
> Thank you for any assistance!
>
> Rob
> :)

I notice the following commented-out in my vimrc, which leads me to 
believe that I tried it in the past and didn't find it completely 
satisfactory. Maybe you can make it better:

" Up, Down      move up/down by "screen lines"
" j k           (default) move down/up by "file lines"
" map   <Down>  gj
" map   <Up>    gk
" if exists("*pumvisible")
"       inoremap <expr> <Down>  pumvisible() ? "\<lt>Down>" : "\<lt>C-O>gj"
"       inoremap <expr> <Up>    pumvisible() ? "\<lt>Up>"   : "\<lt>C-O>gk"
" else
"       inoremap        <Down>  <C-O>gj
"       inoremap        <Up>    <C-O>gk
"endif


Best regards,
Tony.
-- 
Blood flows down one leg and up the other.

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

Reply via email to