Ubuntu安装vim,vim配置文件
Ubuntu安装vim,Ubuntu安装vim,Ubuntu安装vim,Ubuntu安装vim,Ubuntu安装vim,Ubuntu安装vim,
使用命令:sudo apt-get install vim-gtk
使用:vim 即可编辑文件
使用gvim可以打开图形模式下的vim。
以下是我的vim配置文件,(感谢一位老师哥,这个文件还是他留给我的 )
--------------------------------------------------------------------------------------------------------------
set nocompatible
setnu
setlangmenu=zh_CN.UTF-8
setencoding=utf-8
languagemessagezh_CN.UTF-8
settabstop=2
setsofttabstop=2
setshiftwidth=2
colorscheme tortesource $VIMRUNTIME/vimrc_example.vim
source$VIMRUNTIME/mswin.vim
behave mswinset diffexpr=MyDiff()
functionMyDiff()
letopt='-a--binary'
if&diffopt=~'icase'|letopt=opt.'-i'|endif
if&diffopt=~'iwhite'|letopt=opt.'-b'|endif
letarg1=v:fname_in
ifarg1=~''|letarg1='"'.arg1.'"'|endif
letarg2=v:fname_new
ifarg2=~''|letarg2='"'.arg2.'"'|endif
letarg3=v:fname_out
ifarg3=~''|letarg3='"'.arg3.'"'|endif
leteq=''
if$VIMRUNTIME=~''
if&sh=~'\<cmd'
letcmd='""'.$VIMRUNTIME.'\diff"'
leteq='"'
else
letcmd=substitute($VIMRUNTIME,'','"','').'\diff"'
endif
else
letcmd=$VIMRUNTIME.'\diff'
endif
silentexecute'!'.cmd.''.opt.arg1.''.arg2.'>'.arg3.eq
endfunctionset nobackup
--------------------------------------------------------------------------------------------------------------