我的常用Vim配置

编辑配置文件

vim ~/.vimrc
set nu
set number
set shortmess=atI
syntax on
filetype on
set nocompatible
set nobackup
set confirm

set mouse=a
set selection=exclusive
set selectmode=mouse,key

set autoindent
set tabstop=4
set shiftwidth=4
set expandtab
set smarttab
set cindent
set smartindent
set hlsearch
set showmatch

set ruler

nnoremap  @=((foldclosed(line('.')<0)?'zc':'zo'))

set novisualbell
set laststatus=2

autocmd InsertEnter * se cul

set fillchars=vert:/
set fillchars=stl:/
set fillchars=stlnc:/

set fileencodings=utf-8,ucs-bom,gb18030,gbk,gb2312,cp936
set termencoding=utf-8
set encoding=utf-8

set paste
set listchars=tab:>-,trail:-

set whichwrap=b,s,<,>,[,] 
set linebreak
set backspace=2
set previewwindow
set history=50
set showcmd
set showmode
set ignorecase
set cmdheight=1
set autoread
set noeb
set noswapfile


if version >= 603
    set helplang=cn
    set encoding=utf-8
endif



autocmd BufWritePost $MYVIMRC source $MYVIMRC

你可能感兴趣的:(我的常用Vim配置)