博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
VIM配置记录
阅读量:4117 次
发布时间:2019-05-25

本文共 2194 字,大约阅读时间需要 7 分钟。

一步一步按这个文档搭好VIM环境

使用过程中一些心得记录下来:

1、Vim是ctrl o(字母)  是用来往回跳。不是什么CTRL + T

2、跳至某个函数则可以通过CTRL 键加MOUSE点击跳进去,也可以通过ctrl +]
3、的确可以做到上文所写的MINIBUF效果,此时切换不同的文件,可以直接用MOUSE双击。
4、这样打造之后,与SOURCE INSIGHT的差距已几乎没有了。
最主要的两个SI功能是:
1、跟进函数 - 与SI一样, 按住CTRL,再用MOUSE单击
2、回跳: ctrl o(字母)  
5、查一个函数被谁引用,就用”ctrl” + “-” + “e” ,

--------我的VIM ------

set tags=tags;/

set nocompatible
set history=400
set autoread
“set mouse=a
syntax enable
“colorscheme elflord
set so=7
set wildmenu
set ruler
set cmdheight=2
set nu
set backspace=eol,start,indent
set whichwrap+=<,>,h,l
set showmatch
set mat=2
set hlsearch
set is

set nofen

set fdl=0

set expandtab

set shiftwidth=2
set ambiwidth=double
set smarttab
set ts=4
set lbr
set tw=500
set selection=inclusive

set ai

set sw=4
set si
set cindent “usage: select codes, press ‘=’ key, the codes will autoindenting
set wrap

if has(“multi_byte”)

if getfsize(expand(“%”)) > 0
set fileencodings=ucs-bom,utf-8,cp936,big5,euc-jp,euc-kr,latin1
else
set fileencodings=cp936,big5,euc-jp,euc-kr,latin1
endif

if v:lang =~ “^zh_CN”

set encoding=cp936
set termencoding=cp936
set fileencoding=cp936
endif

if v:lang =~ “utf8 "||v:lang= "UTF8

set encoding=utf-8
set termencoding=utf-8
set fileencoding=utf-8
endif
else
echoerr “Sorry, this version of (g)vim was not compiled with multi_byte”
endif

if &diff

let Tlist_Auto_Open=0 “don’t auto pen when compare two files
else
let Tlist_Auto_Open=1 “auto pen Tlist when open a file
endif

nmap s :cs find s =expand(“”)

nmap g :cs find g =expand(“”)
nmap c :cs find c =expand(“”)
nmap t :cs find t =expand(“”)
nmap e :cs find e =expand(“”)
nmap f :cs find f =expand(“”)
nmap i :cs find i ^=expand(“”)$
nmap d :cs find d =expand(“”)
set cscopequickfix=s-,c-,d-,i-,t-,e-,g-
nmap :cnext
nmap :cprev

map :!ctags -R –c++-kinds=+p –fields=+iaS –extra=+q .

set nocp

filetype plugin on

set mouse=a ” Enable mouse usage (all modes) “使用鼠标

“使用SUPERTAB

let g:SuperTabDefaultCompletionType=”context”
” SuperTab使用很简单,只要在输入变量名或路径名等符号中途按Tab键,就能得到以前输入过的符号列表,并通过Tab键循环选择

“wnmanager

let g:miniBufExplMapWindowNavVim = 1
let g:miniBufExplMapWindowNavArrows = 1
let g:miniBufExplMapCTabSwitchBufs = 1
let g:miniBufExplModSelTarget = 1
let g:miniBufExplMoreThanOne=0

colo evening

转载地址:http://doypi.baihongyu.com/

你可能感兴趣的文章
过滤器及JSP九大隐式对象
查看>>
软件(项目)的分层
查看>>
菜单树
查看>>
MySQL-分布式架构-MyCAT
查看>>
设计模式六大原则(6):开闭原则
查看>>
阿里面试总结--JAVA
查看>>
Servlet的生命周期
查看>>
JAVA八大经典书籍,你看过几本?
查看>>
《读书笔记》—–书单推荐
查看>>
【设计模式】—-(2)工厂方法模式(创建型)
查看>>
有return的情况下try catch finally的执行顺序(最有说服力的总结)
查看>>
String s1 = new String("abc"); String s2 = ("abc");
查看>>
JAVA数据类型
查看>>
Xshell 4 入门
查看>>
SoapUI-入门
查看>>
Oracle -常用命令
查看>>
JAVA技术简称
查看>>
ORACLE模糊查询优化浅谈
查看>>
2016——个人年度总结
查看>>
2017——新的开始,加油!
查看>>