OT: vim
OldFrog
oldfrog na volny.cz
Pátek Září 13 18:04:25 CEST 2002
>
>
>>Mezi dvema podtrzitky mi to zvetsi pismena a podtrzitka zmizi.
>>Napisu-li treba "blba_funkce_test", vim se zamysli a odpovi mi
>>"blbaFUNKCEtest". Docela brutus, ze?
>>
>>
> Pokud nepošlete minimální údaje, tj. distribuci, verzi vim,
>vlastní úpravy, těžko vám někdo poradí. Zřejmě nahráváte nějaký škodlivý
>soubor, v takovém případě pomůže strace.
>
Ano, chapu. Nicmene jsem se domnival, ze se jedna o zname feature
vimu v novejsich verzich a ze staci neco jako ":set noblabla" a fce
se tim vypne.
Takze jeste jednou SuSE8.0cz a v nem obsazeny vim6.0.164.
Chovani je stejne pro vsechny uzivatele. Obsah konfiguraku:
================~/.vimrc=============================
:set mouse=a
:set tabstop=2
:set nowrap
:set autoindent
:syntax on
:hi Comment ctermfg=darkcyan
:set nocompatible
================~/.vimrc=============================
================/etc/.vimrc===========================
" /etc/vimrc (configuration file for vim only)
" author: Klaus Franken <kfr na suse.de>
" author: Werner Fink <werner na suse.de>
" author: Florian La Roche <florian na suse.de>
" version: 00/01/20
" commented lines start with `"'
" enable syntax highlighting
" syntax on
" 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 esckeys
" get easier to use and more user friendly vim defaults
" CAUTION: This option breaks some vi compatibility.
" Switch it off if you prefer real vi compatibility
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! <ESC>Oo :
map! <ESC>Oj *
map! <ESC>Om -
map! <ESC>Ok +
map! <ESC>Ol ,
map! <ESC>OM
map! <ESC>Ow 7
map! <ESC>Ox 8
map! <ESC>Oy 9
map! <ESC>Ot 4
map! <ESC>Ou 5
map! <ESC>Ov 6
map! <ESC>Oq 1
map! <ESC>Or 2
map! <ESC>Os 3
map! <ESC>Op 0
map! <ESC>On .
" keys in normal mode
map <ESC>Oo :
map <ESC>Oj *
map <ESC>Om -
map <ESC>Ok +
map <ESC>Ol ,
map <ESC>OM
map <ESC>Ow 7
map <ESC>Ox 8
map <ESC>Oy 9
map <ESC>Ot 4
map <ESC>Ou 5
map <ESC>Ov 6
map <ESC>Oq 1
map <ESC>Or 2
map <ESC>Os 3
map <ESC>Op 0
map <ESC>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! <Esc>[H <Home>
map! <Esc>[F <End>
" Home/End: older xterms do not fit termcap/terminfo.
map! <Esc>[1~ <Home>
map! <Esc>[4~ <End>
" Up/Down/Right/Left
map! <Esc>[A <Up>
map! <Esc>[B <Down>
map! <Esc>[C <Right>
map! <Esc>[D <Left>
" KP_5 (NumLock off)
map! <Esc>[E <Insert>
" PageUp/PageDown
map <ESC>[5~ <PageUp>
map <ESC>[6~ <PageDown>
" Cursor keys of (oldFunctionKeys)
map <ESC>[5;5~ <PageUp>
map <ESC>[6;5~ <PageDown>
" keys in normal mode
map <ESC>[H 0
map <ESC>[F $
" Home/End: older xterms do not fit termcap/terminfo.
map <ESC>[1~ 0
map <ESC>[4~ $
" Up/Down/Right/Left
map <ESC>[A k
map <ESC>[B j
map <ESC>[C l
map <ESC>[D h
" KP_5 (NumLock off)
map <ESC>[E i
" PageUp/PageDown
map <ESC>[5~
map <ESC>[6~
" Cursor keys of (oldFunctionKeys)
map <ESC>[5;5~
map <ESC>[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! <Esc>OH <Home>
map! <Esc>OF <End>
" Cursor keys which works mostly
" map! <Esc>OA <Up>
" map! <Esc>OB <Down>
" map! <Esc>OC <Right>
" map! <Esc>OD <Left>
" Cursor keys of (oldFunctionKeys)
map! <Esc>[2;5~ <Insert>
map! <Esc>[3;5~ <Delete>
map! <Esc>O5A <Up>
map! <Esc>O5B <Down>
map! <Esc>O5C <Right>
map! <Esc>O5D <Left>
" KP_5 (NumLock off)
map! <Esc>OE <Insert>
" keys in normal mode
map <ESC>OH 0
map <ESC>OF $
" Cursor keys of (oldFunctionKeys)
map <ESC>O5H 0
map <ESC>O5F $
" Cursor keys which works mostly
" map <ESC>OA k
" map <ESC>OB j
" map <ESC>OD h
" map <ESC>OC l
" Cursor keys of (oldFunctionKeys)
map <Esc>[2;5~ i
map <Esc>[3;5~ x
map <ESC>O5A k
map <ESC>O5B j
map <ESC>O5D h
map <ESC>O5C l
" KP_5 (NumLock off)
map <ESC>OE i
endif
if myterm == "linux"
" keys in insert/command mode.
map! <Esc>[G <Insert>
" KP_5 (NumLock off)
" keys in normal mode
" KP_5 (NumLock off)
map <ESC>[G i
endif
" This escape sequence is the well known ANSI sequence for
" Remove Character Under The Cursor (RCUTC[tm])
map! <Esc>[3~ <Delete>
map <ESC>[3~ x
" /etc/vimrc ends here
================/etc/.vimrc===========================
Dekuji
OldFrog.
Další informace o konferenci Linux