How to disable 'vi compatible' mode for Vim in Cygwin on Windows 8? -
i using cygwin 1.7.22 (32-bit) on windows 8 (64-bit). within cygwin, using vim 7.3.1152, default version.
behavior seem bugs:
when press i enter insert mode, not
-- insert --
in bottom left. in fact, doesn't anything. behave correctly, though.when delete letters using backspace in insert mode, letters not disappear cursor move left.
when use arrow keys in insert mode, enters letters a, b, c, , d, rather moving cursor. arrow keys work outside of insert mode.
how make vim behave expect?
create ~/.vimrc
file following contents put vim in nocompatible mode (actually mere presence of file sufficient.)
set nocompatible
the behavior seeing how vi
used behave. these not bugs.
take @ :h nocompatible
in vim compatible mode tries emulate vi closely possible.
--insert--
not part of vi not shown in compatible mode.- i believe vi did lazy redraw of screen , didn't update until exited normal mode. backspace usable works on stuff entered in current insert mode. overall not user friendly.
- the arrow keys sent vim escape sequences (escape followed coupled of letters). let
^[
escape.^[oa
on computer similar on yours. vim sees escape (goes normal mode), , o (add line above current) , see entered onto screen. means vim in compatible mode not interpret escape characters properly. because vi did not interpret them (nor designed use them).
set nocompatible
fixes problems 1 , 3.
i think set backspace=indent,eol,start
should fix problem 2.
Comments
Post a Comment