Re: BOF Vim 8 - Suggestions
- 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 selection=inclusive keymodel=startsel
set mousemodel=popup selectmode=mouse,key
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.
- Hi Stefano Zacchiroli, you wrote:
>This really seems to be a good option.
> 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
> FWIW we also set a lot of other default values when not invoked as 'vi'.