" /etc/vimrc (configuration file for vim only) " author: Klaus Franken " author: Werner Fink " author: Florian La Roche " version: 00/01/20 " commented lines start with `"' " enable syntax highlighting so ${VIMRUNTIME}/syntax/syntax.vim " automatically indent lines (default) " set noautoindent " select case-insenitiv search (not default) " set ignorecase " show cursor line and column in the status line set ruler " show matching brackets set showmatch " display mode INSERT/REPLACE/... set showmode " changes special characters in search patterns (default) " set magic " Required to be able to use keypad keys and map missed escape sequences set nocompatible " Try to get the correct main terminal type if &term =~ "xterm" let myterm = "xterm" else let myterm = &term endif let myterm = substitute(myterm, "cons[0-9][0-9].*$", "linux", "") let myterm = substitute(myterm, "vt1[0-9][0-9].*$", "vt100", "") let myterm = substitute(myterm, "vt2[0-9][0-9].*$", "vt220", "") let myterm = substitute(myterm, "\\([^-]*\\)[_-].*$", "\\1", "") " Here we define the keys of the NumLock in keyboard transmit mode of xterm " which misses or hasn't activated Alt/NumLock Modifiers. Often not defined " within termcap/terminfo and we should map the character printed on the keys. if myterm == "xterm" || myterm == "kvt" || myterm == "gnome" " keys in insert/command mode. map! Oo : map! Oj * map! Om - map! Ok + map! Ol , map! OM map! Ow 7 map! Ox 8 map! Oy 9 map! Ot 4 map! Ou 5 map! Ov 6 map! Oq 1 map! Or 2 map! Os 3 map! Op 0 map! On . " keys in normal mode map Oo : map Oj * map Om - map Ok + map Ol , map OM map Ow 7 map Ox 8 map Oy 9 map Ot 4 map Ou 5 map Ov 6 map Oq 1 map Or 2 map Os 3 map Op 0 map On . endif " xterm but without activated keyboard transmit mode " and therefore not defined in termcap/terminfo. if myterm == "xterm" || myterm == "kvt" || myterm == "gnome" " keys in insert/command mode. map! [H map! [F " Home/End: older xterms do not fit termcap/terminfo. map! [1~ map! [4~ " Up/Down/Right/Left map! [A map! [B map! [C map! [D " KP_5 (NumLock off) map! [E " PageUp/PageDown map [5~ map [6~ " Cursor keys of (oldFunctionKeys) map [5;5~ map [6;5~ " keys in normal mode map [H 0 map [F $ " Home/End: older xterms do not fit termcap/terminfo. map [1~ 0 map [4~ $ " Up/Down/Right/Left map [A k map [B j map [C l map [D h " KP_5 (NumLock off) map [E i " PageUp/PageDown map [5~  map [6~  " Cursor keys of (oldFunctionKeys) map [5;5~  map [6;5~  endif " xterm/kvt but with activated keyboard transmit mode. " Sometimes not or wrong defined within termcap/terminfo. if myterm == "xterm" || myterm == "kvt" || myterm == "gnome" " keys in insert/command mode. map! OH map! OF " Cursor keys which works mostly " map! OA " map! OB " map! OC " map! OD " Cursor keys of (oldFunctionKeys) map! [2;5~ map! [3;5~ map! O5A map! O5B map! O5C map! O5D " KP_5 (NumLock off) map! OE " keys in normal mode map OH 0 map OF $ " Cursor keys of (oldFunctionKeys) map O5H 0 map O5F $ " Cursor keys which works mostly " map OA k " map OB j " map OD h " map OC l " Cursor keys of (oldFunctionKeys) map [2;5~ i map [3;5~ x map O5A k map O5B j map O5D h map O5C l " KP_5 (NumLock off) map OE i endif if myterm == "linux" " keys in insert/command mode. map! [G " KP_5 (NumLock off) " keys in normal mode " KP_5 (NumLock off) map [G i endif " This escape sequence is the well known ANSI sequence for " Remove Character Under The Cursor (RCUTC[tm]) map! [3~ map [3~ x " /etc/vimrc ends here