码迷,mamicode.com
首页 > 其他好文 > 详细

Vim 基本配置

时间:2014-07-16 18:33:25      阅读:186      评论:0      收藏:0      [点我收藏+]

标签:style   blog   color   使用   文件   os   

1、关闭vi的一致性模式

set nocompatible

2、配置backspace的工作方式

set backspace=indent,eol,start

3、显示行号

set number

4、设置在编辑过程中右下角显示光标的行列信息

set ruler

5、在状态栏显示正在输入的命令

set showcmd

6、设置历史记录条数

set history=1000

7、设置取消备份 禁止临时文件的生成

set nobackup
set noswapfile

8、设置匹配模式

set showmatch

9、设置C/C++方式自动对齐

set autoindent
set cindent

10、开启语法高亮功能

syntax enable
syntax on

11、指定配色方案为256色

set t_Co=256

12、设置搜索时忽略大小写

set ignorecase

13、设置在vim中可以使用鼠标

set mouse=a

14、设置tab宽度

set tabstop=4

15、设置自动对齐空格数

set shiftwidth=4

16、设置退格键时可以删除4个空格

set smarttab
set softtabstop=4

17、将tab键自动转换为空格

set expandtab

18、设置编码方式

set encoding=utf-8

19、自动判断编码时 依次尝试以下编码

set fileencodings=ucs-bom,utf-8,cp936,gb18030,big5,euc-jp,euc-kr,latin1

20、检测文件类型

filetype on

21、针对不同的文件采取不同的缩进方式

filetype indent on

22、允许插件

filetype plugin on

23、启动智能补全

filetype plugin indent on

24、开始使用vundle的必须配置

set nocompatible
filetype off
set rtp+=~/.vim/bundle/vundle/
call vundle#rc()

25、使用vundle来管理vundle

Bundle gmarik/vundle

26、powerline插件  状态栏增强显示

Bundle Lokaltog/vim-powerline

27、vim有一个状态栏 加上powerline 则两个状态栏

set laststatus=2
set t_Co=256
let g:Powline_symbols=fancy

28、vundle配置必须 开启插件

filetype plugin indent on



Vim 基本配置,布布扣,bubuko.com

Vim 基本配置

标签:style   blog   color   使用   文件   os   

原文地址:http://www.cnblogs.com/gaohongchen01/p/3845203.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!