实用的VIM配置文件

VIM配置文件名为.vimrc,默认在用户根目录下,或者在命令模式下输入:version可以获取配置文件路径。

在VIM命令行下输入options,然后回车,可以查看VIM所有的参数选项。

双引号"为注释。

 

这里贴上我自己的VIM配置文件内容:

" VIM配置文件

" begin
" 插件配置

set nocompatible              " be iMproved, required
filetype off                  " required

" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim

call vundle#begin()

" alternatively, pass a path where Vundle should install plugins
" call vundle#begin('~/some/path/here')

" let Vundle manage Vundle, required
Plugin 'gmarik/Vundle.vim'

" plugin on GitHub repo
" Plugin 'Valloric/YouCompleteMe'
Plugin 'taglist.vim'
Plugin 'scrooloose/nerdtree'
Plugin 'scrooloose/syntastic'

" All of your Plugins must be added before the following line
call vundle#end()            " required
filetype plugin indent on    " required

" end


" begin
" 常规配置

" 显示行号
set number

" 设置tab缩进
set softtabstop=8
set tabstop=8
set shiftwidth=8

" 高亮显示关键字
syntax on
syntax enable

" 高亮显示搜索
set hlsearch
set incsearch

" 显示光标位置
set ruler

" 状态栏行数,2表示显示文件名
set laststatus=2

" 编码设置
set enc=utf-8
set fencs=utf-8,ucs-bom,shift-jis,gb18030,gbk,gb2312,cp936

" 语言设置
set helplang=en

" 命令行(在状态行下)的高度
set cmdheight=1

set paste

" 自动缩进
set autoindent
set cindent

" 历史记录数
set history=1000

" 输入的命令显示出来,看的清楚些
set showcmd

" 在处理未保存或只读文件的时候,弹出确认
set confirm

" end




 

以后持续完善。

你可能感兴趣的:(配置文件)