gvim使用总结


我的gvim配置

" 显示相关
set nocompatible
set number 
set cursorline  
set nowrap 
set nofixendofline
set hlsearch
set wildmenu
" 主题相关
syn on
colorscheme desert
" 编码相关
set fencs=utf-8,gbk,gb2312
set encoding=utf-8
set fileencoding=utf-8 
" 关闭临时文件
set nobackup
set noundofile
set noswapfile 
" 缩进相关
set autoindent 
set tabstop=4
set softtabstop=4
set shiftwidth=4
set expandtab
set smarttab 
" 状态栏相关
set laststatus=2
set statusline=Name:\'%t\'%m%r\ \ Type:%Y\ \ Enc:%{&fenc}\ \ Fmt:%{&ff}\ \ Pos:(%l,%c)\ \ Total:%L\ lines
filetype plugin indent on
" 按键相关
set keymodel=startsel,stopsel
set backspace=indent,eol,start
nmap j gj
nmap k gk
imap <C-R>+ <C-R><C-P>+
set pastetoggle=<F9>
nmap <C-p> :tabp<CR>
nmap <C-n> :tabn<CR>
nmap <C-c> :tabc<CR>
" GUI相关
set go=
set guifont=Consolas:h16
set guifontwide=楷体:h16
" netrw相关
let g:netrw_banner = 0
let g:netrw_liststyle = 3
let g:netrw_winsize = 25
autocmd VimEnter * :Le
autocmd TabNew * call feedkeys(":Le\<CR>")    

一些总结