"keep 50 lines of command line history
set history=50
"show the cursor position all the time
set ruler
"display incomplete commands
set showcmd
" do incremental searching
set incsearch
"显示行号
set number
"设置gvim启动窗口的位置,以及大小
winpos 100 50
set lines=480 columns=320
"设置字体(空格的使用转义字符)或冒号隔开或使用双引号扩起来
set guifont=Bitstream\ Vera\ Sans\ Mono:h12
"设置配色
colorscheme torte
"colorscheme freya
"colorscheme lucius
"colorscheme blackdust
"colorscheme rainbow_neon
"为光标所在的行添加表示
setlocal cursorline
" 状态栏
set laststatus=2
"状态栏信息
if has("statusline")
set statusline=%F%m%r%h%w\ %=[FORMAT=%{&ff}]\ %{\"[\".(&fenc==\"\"?&enc:&fenc).((exists(\"+bomb\")\ &&\ &bomb)?\",B\":\"\").\"]\"}\ [TYPE=%Y]\ [POS=%l,%v][%p%%]\ %{strftime(\"%d/%m/%y\ -\ %H:%M\")}
endif
vmap <C-c> "yy "复制模拟 CTRL + C
vmap <C-x> "yd
nmap <C-v> "yp
vmap <C-v> "yp
nmap <C-a> ggvG$
nmap <C-s> :wa<cr> "模拟WIN 保存 CTRL + S
imap <C-s> <Esc>:wa<cr>a
![](https://img-blog.csdn.net/20130822101214390?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvZGwwOTE0NzkxMDEx/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/SouthEast)
http://download.csdn.net/detail/dl0914791011/5991347
设置C文件函数名高亮,编辑vim72/syntax/c.vim
"highlight Functions,这可以高亮函数
syn match cFunction /\<\w\+\%(\s*(\)\@=/
hi default link cFunction Include
1. 多行注释
在通常模式下,按 v 进入可视模式,Shift键加向下或向上移动光标,选择需要注释的行,然后按ctrl+q,将行头标记起来,接着按大写的I(shift+i),再插入注释符,比如"%",再按Esc,就会全部注释了。
2. 多行去掉注释
在通常模式下,按 v 进入可视模式,Shift键加向下或向上移动光标,选择需要去掉注释的行,然后按ctrl+q,将行头标记起来,接着按d,就会删除全部注释了。
3. 块缩进
选中块,>或<
4. 单行缩进
>>或<<