Vim配置

来源:互联网 发布:mac vi 命令大全 编辑:程序博客网 时间:2024/04/30 08:32

http://cicikasa.blog.163.com/blog/static/1375753552010246521570/


  1 """"""""""""""""""""""""""""""""""""""""""""""""""""

  2 " vim 常用配置

  3 """"""""""""""""""""""""""""""""""""""""""""""""""""

  4 " 不兼容vi

  5 set nocompatible

  6 

  7 "语法和关键字高亮

  8 syntax on

  9 syntax enable

 10 

 11 "历史记录条数

 12 set history=100

 13 

 14 " 不需要备份

 15 set nobackup

 16 

 17 "启动自动缩进,并设置自动缩进的宽度为4

 18 set autoindentshiftwidth=4

 19 

 20 "让深色的字体高亮显示

 21 set background=dark

 22 

 23 "搜索时,输入的词句逐字高亮

 24 set incsearch

 25 

 26 "让查找到的字符串高亮显示

 27 set hlsearch

 28 

 29 "tab 变为4个字符宽度

 30 set tabstop=4

 31 

 32 "使用>>或<<时,依shiftwidth调整宽度

 33 set shiftround

 34 

 35 "显示行号

 36 set number


 38 "显示所用编码

 39 set encoding=utf-8

 40 set fileencodings=utf-8,gbk,gb2312,gb18030

 41 

 42 "输出到客户终端采用的编码

 43 set termencoding=utf-8

 44 

 45 "让汉字以2个宽度显示

 46 set ambiwidth=double

 47 

 48 "侦测文件类型

 49 filetype on

 50 

 51 "载入文件类型插件

 52 filetype pluginon

 53 

 54 "为特定文件载入相关缩进

 55 filetype indenton

 56 

 57 "总是显示状态栏

 58 set laststatus=2

 59 

 60 "为c程序提供自动缩进

 61 set smartindent

 62 

 63 "使用c风格的缩进方案

 64 set cindent

 65 

 66 "搜索时忽略大小写

 67 set ignorecase


0 0
原创粉丝点击