vim配置

1、vim插件管理器——Vundle(详细介绍见:~/.vim/bundle/vundle/doc/vundle.txt)

(1)Vundle安装

git clone https://github.com/gmarik/vundle.git ~/.vim/bundle/vundle

(2)Vundle配置

Vundle的配置在~/.vimrc中,说明见下面的配置。

(3)Vundle使用

插件安装:

:BundleInstall

插件更新:

:BundleInstall! 

插件检索:

:BundleSearch foo

列出所有已安装插件:

:BundleList

插件卸载

:BundleClean

 

2.  ~/.vimrc配置备份

vim配置
"====================================
"    FileName: ~/.vimrc
"    Author:   
"    Version:  
"    Email:    
"    Date: 
"=============================================

"=============================================
"    Plugins Configuration
"=============================================
set nocompatible               " be iMproved
filetype off                   " required!

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

" let Vundle manage Vundle
Bundle gmarik/vundle

" My Bundles here:
"
" original repos on github (位于github上其他repo上的插件)

" vim-scripts repos (位于vim-scripts repo上的插件)
Bundle a.vim 
Bundle taglist.vim
Bundle c.vim
Bundle Pydiction

" non github repos (非github的repo上的插件)

" git repos on your local machine (ie. when working on your own plugin) (位于本地的插件)

" ...
" 
filetype plugin indent on     " required!
" or 
" filetype plugin on          " to not use the indentation settings set by plugins
let g:pydiction_location = ~/.vim/bundle/Pydiction/complete-dict " Pydiction used

"==================================
"    Vim基本配置
"===================================
" 显示行号
set nu

" 设置匹配模式,例如当选中左括号时,会自动定位右括号的位置
set showmatch

" 设置Tab键的宽度,以空格为单位
set tabstop=4
" 设置自动缩进的宽度,以空格为单位
set smartindent
set shiftwidth=4
set softtabstop=4
" 将Tab键自动转换成空格 真正需要Tab键时使用[Ctrl + V + Tab]
"set ts=4
"set expandtab

" 设置编码
let &termencoding=&encoding
set fileencodings=utf-8,gbk,big5

" 查找时高亮
" set hls

" 增加鼠标支持
"set mouse=a
vim配置

vim配置

上一篇:代码专栏——如何画黑体辐射能量密度随频率和温度的三维变化图


下一篇:一次排除异常的经历