bogon:~ # vim .bash_profile
!
!
!
!
!
请按 ENTER 或其它命令继续
以下是/etc/vimrc的全文是系统自带的:
" /etc/vimrc (configuration file for vim only)
" author: Klaus Franken <kfr@suse.de>
" author: Werner Fink <werner@suse.de>
" author: Florian La Roche <florian@suse.de>
" version: 06/11/2011
" commented lines start with `"'
function! SKEL_spec()
0r /usr/share/vim/current/skeletons/skeleton.spec
language time en_US
if $USER != ''
let login = $USER
elseif $LOGNAE != ''
let login = $LOGNAE
else
let login = 'unknown'
endif
let newline = stridx(login, "\n")
if newline != -1
let login = strpart(login, 0, newline)
endif
if $HOSTNAE != ''
let hostname = $HOSTNAE
else
let hostname = system('hostname -f')
if v:shell_error
let hostname = 'localhost'
endif
endif
let newline = stridx(hostname, "\n")
if newline != -1
let hostname = strpart(hostname, 0, newline)
endif
exe "%s/specCURRENT_YEAR/" . strftime("%Y") . "/ge"
exe "%s/specRP_CREATION_DATE/" . strftime("%a\ %b\ %d\ %Y") . "/ge"
exe "%s/specRP_CREATION_AUTHOR_AIL/" . login . "@" . hostname . "/ge"
exe "%s/specRP_CREATION_NAE/" . expand("%:t:r") . "/ge"
setf spec
endfunction
" 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
" allow backspacing over everything in insert mode
set backspace=indent,eol,start
" Complete longest common string, then each full match
" enable this for bash compatible behaviour
" set wildmode=longest,full
" Try to get the correct main terminal type
if &term =~ "xterm"
let myterm = "xterm"
elseif &term =~ "screen"
let myterm = "screen"
else
let myterm = &term
endif
let myterm = substitute(myterm, "cons[0-9][0-9].*$", "linux", "")
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 odifiers. 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!
map!
map!
map!
map!
map!
map!
map!
map!
map!
map!
map!
map!
map!
map!
map!
map!
" keys in normal mode
map
map
map
map
map
map
map
map
map
map
map
map
map
map
map
map
map
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!
map!
" Home/End: older xterms do not fit termcap/terminfo.
map!
map!
" Up/Down/Right/Left
map!
map!
map!
map!
" KP_5 (NumLock off)
map!
" keys in normal mode
map
map
" Home/End: older xterms do not fit termcap/terminfo.
map
map
" Up/Down/Right/Left
map
map
map
map
" KP_5 (NumLock off)
map
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!
map!
map!
map!
map!
map!
" Cursor keys which works mostly
" map!
" map!
" map!
" map!
map!
map!
map!
map!
map!
map!
map!
map!
map!
map!
map!
map!
" KP_5 (NumLock off)
map!
" keys in normal mode
map
map
map
map
map
map
" Cursor keys which works mostly
" map
" map
" map
" map
map
map
map
map
map
map
map
map
map
map
map
map
" KP_5 (NumLock off)
map
endif
if myterm == "linux"
" keys in insert/command mode.
map!
" KP_5 (NumLock off)
" keys in normal mode
" KP_5 (NumLock off)
map
endif
if myterm == "screen"
map!
map!
map!
map!
map!
map!
map!
map!
map!
map!
map!
map!
map!
map!
map!
map!
map!
map!
map!
map!
map!
map!
map!
map!
map!
map!
map!
map!
map!
map!
endif
" This escape sequence is the well known ANSI sequence for
" Remove Character Under The Cursor (RCUTC[tm])
map!
map
" Only do this part when compiled with support for autocommands.
if has("autocmd")
" When editing a file, always jump to the last known cursor position.
" Don't do it when the position is invalid or when inside an event handler
" (happens when dropping a file on gvim).
autocmd BufReadPost *
\ if line("'\"") > 0 && line("'\"") <= line("$") |
\ exe "normal g`\"" |
\ endif
endif " has("autocmd")
" Changed default required by SuSE security team--be aware if enabling this
" that it potentially can open for malicious users to do harmful things.
set nomodeline
" Skeleton for spec files
autocmd BufNewFile *.spec call SKEL_spec()
" get easier to use and more user friendly vim defaults
" /etc/vimrc ends here
set nobackup
set nu
set bg=dark
不知是怎么回事,向各位大侠请教,先谢谢了。
DrearsCma 于 2013-01-28 08:45:46发表:
帮顶