我的VIM编辑器配置文件 _vrimrc
2014-02-19 16:54
344 查看
source $VIMRUNTIME/vimrc_example.vim
source $VIMRUNTIME/mswin.vim
behave mswin
set nocompatible "use vim defaults = set nocp
set ls=2 "always show status line
set tabstop=4 "numbers of spaces of tab character
set shiftwidth=4 "numbers of spaces to (auto)indent
set scrolloff=3 "keep 3 lines when scrolling
set showcmd "display incomplete commands
set hlsearch "higlight searches
set incsearch "do incremental searching
set ruler "show the cursor position all the time
set nobackup "do not keep a backup file
set number "show line numbers
set ignorecase "ignore case when searching
"set noignorecase "don't ignore case
set title "show title in console titile bar
set ttyfast "smoother changes
"set ttyscroll=0 "tun off scrolling didn't work well with PuTTY
set modeline "last lines in document sets vim mode
set modelines=3 "number lines checked for modelines
"set autoindent "always set autoindenting on
"set smartindent "smart indent
"set cindent "cindent
set noautoindent "noautoindent
set nosmartindent "nosmartindent
set nocindent "nocindent
"set autowrite "auto savas changes when quitting and swiching
"set expandtab "tabs are converted to spaces,use only when rq
"set sm "show matching braces,somewhat annoying...
"set nowrap "don't wrap line
syntax on "syntax higlighing
set encoding=utf-8 "enable utf-8 encode,this is refer to charset encoding,not files.
set tw=78
set lbr
set fo+=mB
colo torte "default color
"set guifont=
set guifont=Source\ Code\ Pro:h12
set diffexpr=MyDiff()
function MyDiff()
let opt = '-a --binary '
if &diffopt =~ 'icase' | let opt = opt . '-i ' | endif
if &diffopt =~ 'iwhite' | let opt = opt . '-b ' | endif
let arg1 = v:fname_in
if arg1 =~ ' ' | let arg1 = '"' . arg1 . '"' | endif
let arg2 = v:fname_new
if arg2 =~ ' ' | let arg2 = '"' . arg2 . '"' | endif
let arg3 = v:fname_out
if arg3 =~ ' ' | let arg3 = '"' . arg3 . '"' | endif
let eq = ''
if $VIMRUNTIME =~ ' '
if &sh =~ '\<cmd'
let cmd = '""' . $VIMRUNTIME . '\diff"'
let eq = '"'
else
let cmd = substitute($VIMRUNTIME, ' ', '" ', '') . '\diff"'
endif
else
let cmd = $VIMRUNTIME . '\diff'
endif
silent execute '!' . cmd . ' ' . opt . arg1 . ' ' . arg2 . ' > ' . arg3 . eq
endfunction
source $VIMRUNTIME/mswin.vim
behave mswin
set nocompatible "use vim defaults = set nocp
set ls=2 "always show status line
set tabstop=4 "numbers of spaces of tab character
set shiftwidth=4 "numbers of spaces to (auto)indent
set scrolloff=3 "keep 3 lines when scrolling
set showcmd "display incomplete commands
set hlsearch "higlight searches
set incsearch "do incremental searching
set ruler "show the cursor position all the time
set nobackup "do not keep a backup file
set number "show line numbers
set ignorecase "ignore case when searching
"set noignorecase "don't ignore case
set title "show title in console titile bar
set ttyfast "smoother changes
"set ttyscroll=0 "tun off scrolling didn't work well with PuTTY
set modeline "last lines in document sets vim mode
set modelines=3 "number lines checked for modelines
"set autoindent "always set autoindenting on
"set smartindent "smart indent
"set cindent "cindent
set noautoindent "noautoindent
set nosmartindent "nosmartindent
set nocindent "nocindent
"set autowrite "auto savas changes when quitting and swiching
"set expandtab "tabs are converted to spaces,use only when rq
"set sm "show matching braces,somewhat annoying...
"set nowrap "don't wrap line
syntax on "syntax higlighing
set encoding=utf-8 "enable utf-8 encode,this is refer to charset encoding,not files.
set tw=78
set lbr
set fo+=mB
colo torte "default color
"set guifont=
set guifont=Source\ Code\ Pro:h12
set diffexpr=MyDiff()
function MyDiff()
let opt = '-a --binary '
if &diffopt =~ 'icase' | let opt = opt . '-i ' | endif
if &diffopt =~ 'iwhite' | let opt = opt . '-b ' | endif
let arg1 = v:fname_in
if arg1 =~ ' ' | let arg1 = '"' . arg1 . '"' | endif
let arg2 = v:fname_new
if arg2 =~ ' ' | let arg2 = '"' . arg2 . '"' | endif
let arg3 = v:fname_out
if arg3 =~ ' ' | let arg3 = '"' . arg3 . '"' | endif
let eq = ''
if $VIMRUNTIME =~ ' '
if &sh =~ '\<cmd'
let cmd = '""' . $VIMRUNTIME . '\diff"'
let eq = '"'
else
let cmd = substitute($VIMRUNTIME, ' ', '" ', '') . '\diff"'
endif
else
let cmd = $VIMRUNTIME . '\diff'
endif
silent execute '!' . cmd . ' ' . opt . arg1 . ' ' . arg2 . ' > ' . arg3 . eq
endfunction
相关文章推荐
- 20_Shell语言―――VIM编辑器基础知识三之窗口属性定制、配置文件及查找替换功能
- 配置Linux下vim编辑器(.vimrc文件)
- 关于Linux系统下vim编辑器配置文件vimrc摘选
- Shell开发环境vim编辑器的配置文件vimrc的参数优化
- VIM编辑器配置文件
- VIM编辑器配置文件修改
- python vim编辑器配置文件
- vim编辑器配置文件
- 使刚编辑的vim编辑器配置文件立即生效(实为自动生效)
- vim编辑器配置文件
- vim编辑器配置文件 .vimrc
- 高效编辑器vim之配置文件
- 修改home目录下的.vimrc文件,vim配置php高亮显示
- vim配置文件 .vimrc 。按照那篇将vim打造成IDE来的,成功加入各项功能,另外改善了书签不能保存的情况
- Mac Vim IDE开发环境配置(Ctags, Taglist, Cscope, Omni, Supertab, 文件布局)
- Linux下配置属于自己的vim编辑器
- vim配置文件解析
- Ubuntu&红帽的vim通用配置(文件头+一键编译执行C/C++/Java单文件)
- Vim配置文件
- Linux下vim的配置文件