Loading ...
Sorry, an error occurred while loading the content.
 

Re: BOF Vim 8 - Suggestions

Expand Messages
  • Georg Dahn
    Hi! ... IMHO these mappings are a better choice: noremap gj noremap gk inoremap pumvisible() ? Down : C-O gj inoremap
    Message 1 of 47 , Jan 26, 2007
      Hi!

      --- "A.J.Mechelynck" <antoine.mechelynck@...> wrote:
      > map <Down> gj
      > imap <Down> <C-O>gj
      > map <Up> gk
      > imap <Up> <C-O>gk

      IMHO these mappings are a better choice:

      noremap <Down> gj
      noremap <Up> gk
      inoremap <expr> <Down> pumvisible() ? "\<lt>Down>" : "\<lt>C-O>gj"
      inoremap <expr> <Up> pumvisible() ? "\<lt>Up>" : "\<lt>C-O>gk"

      With this the cursor keys still work with the popup menu.

      In addition I define the following mappings:

      noremap <S-Down> gj
      noremap <S-Up> gk
      inoremap <S-Down> <C-O>gh<C-O>gj
      inoremap <S-Up> <C-O>gh<C-O>gk
      nnoremap <S-Down> gh<C-O>gj
      nnoremap <S-Up> gh<C-O>gk

      With these mappings invoking the selection mode works more consistently with
      above mappings.

      > No problem for me, and no need to change them from file to file.

      I fully agree with this.

      Best wishes,
      Georg







      ___________________________________________________________
      To help you stay safe and secure online, we've developed the all new Yahoo! Security Centre. http://uk.security.yahoo.com
    • Alexei Alexandrov
      ... This really seems to be a good option. -- Alexei Alexandrov
      Message 47 of 47 , Jan 29, 2007
        Hi Stefano Zacchiroli, you wrote:

        >
        > The solution of being compatible when invoked as 'vi' and being
        > nocompatible when invoked in a different way made everybody happy. The
        > (trivial) patch we are using to implement this behaviour is available
        > at:
        >
        > http://svn.debian.org/wsvn/pkg-vim/trunk/packages/vim/debian/tiny/vimrc.tiny.diff?op=file&rev=0&sc=0
        >
        > FWIW we also set a lot of other default values when not invoked as 'vi'.
        >

        This really seems to be a good option.

        --
        Alexei Alexandrov
      Your message has been successfully submitted and would be delivered to recipients shortly.