vim配置文件

来源:互联网 发布:java代码解析json数据 编辑:程序博客网 时间:2024/06/16 22:35

笔者同时在ubuntu16.04中安装了 vim和gvim,gvim的配置文件主要还是根据.vimrc走的,我新建了一个.gvimrc,改动里面的参数并没有什么卵用。Consolas字体在gvim中没有找到,出现的是一种奇怪的字体。所以我使用了:set guifont=*在gvim中直接配置字体。

set backspace=indent,eol,start set history=50 // keep 50 lines of command line history set ruler  // show the cursor position all the time set showcmd // display incomplete commands set incsearch // do incremental searching set number syntax on “打开语法高亮 set autoindent “自动缩进 set smartindent “使用c形式自动缩进 set cindent set tabstop=4TAB键的宽度 set shiftwidth=4 “统一缩进为4 set showmatch “高亮显示匹配括号 set incsearch set nu “显示行号 color darkblue ”颜色方案 set ruler set ignorecase “搜索忽略大小写 set smartcase set hlsearch ”设置搜索字符高亮 set report=0 set mouse=a set nobackup set noeb set history=1000 set nobackup set noswapfile set enc=utf-8 ”语言编码设置 set fencs=utf-8,ucs-bom,shift-jis,gb18030,gbk,gb2312,cp936 set langmenu=ZH_CN.UTF-8 set helplang=cn set laststatus=2 set ruler “显示光标位置状态行 set cmdheight=1 ”设置命令行的高度 filetype on “侦测文件类型 filetype plugin on ”载入文件类型插件 filetype indent on set viminfo+=! “保存全局变量 set iskeyword+=_,$,@,%,#,- ”带有这些字符的单词不要被换行分割 set linespace=0 “字符间插入像素行数目 set wildmenu ”命令行自动完成操作 set backspace=2 “使用回格键 set whichwrap+=<,>,h,l ”允许backspace和光标跨越行 set selection=exclusive set selectmode=mouse,key