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

Re: BOF Vim 8 - Suggestions

Expand Messages
  • A.J.Mechelynck
    Marcus Aurelius wrote: [...] ... [...] The following (among others) are set once and for all in my vimrc: set nojoinspaces set selection=inclusive
    Message 1 of 47 , Jan 26, 2007
    • 0 Attachment
      Marcus Aurelius wrote:
      [...]
      > If the user wants to edit long lines, (s)he cannot write a quick mapping
      > on-the-fly, because he needs something like this:
      >
      > map <buffer> <silent> <up> gk
      > imap <buffer> <silent> <up> <C-o>gk
      > map <buffer> <silent> <down> gj
      > imap <buffer> <silent> <down> <C-o>gj
      > map <buffer> <silent> <home> g<home>
      > imap <buffer> <silent> <home> <C-o>g<home>
      > map <buffer> <silent> <end> g<end>
      > imap <buffer> <silent> <end> <C-o>g<end>
      >
      > ***May i suggest a new command (or a standard plugin that is easy to find) that
      > would do all of the above in one easy step?***
      >
      >
      >
      > Optionally, the user could want this too:
      >
      > setlocal linebreak
      > setlocal nolist " Necessary for linebreak
      > setlocal display+=lastline
      >
      > I'm not sure if it's OK or if it's going too far :-)
      [...]
      The following (among others) are set once and for all in my vimrc:

      set nojoinspaces
      set selection=inclusive keymodel=startsel
      set mousemodel=popup selectmode=mouse,key
      set laststatus=2
      set display=lastline
      set list listchars=tab:\|_,eol:ΒΆ
      silent! set listchars+=nbsp:~
      " Up, Down move up/down by "screen lines"
      " j k (default) move down/up by "file lines"
      map <Down> gj
      imap <Down> <C-O>gj
      map <Up> gk
      imap <Up> <C-O>gk

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


      Best regards,
      Tony.
    • Alexei Alexandrov
      ... This really seems to be a good option. -- Alexei Alexandrov
      Message 47 of 47 , Jan 29, 2007
      • 0 Attachment
        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.