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

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

1 新增如下配置

所有用户生效的路径:/etc/vim/vimrc

当前用户生效:$HOME/.vimrc

"-------------------- key map
--------------------"inoremap [ []
iinoremap ] []
iinoremap ( ()
iinoremap ) ()
iinoremap { {
}
Oinoremap } {
}
Oinoremap < <>
iinoremap " ""
iinoremap ' ''
"-------------- ctag configuration
------------------"set tags=tags;set autochdir"--------------- taglist configuration
---------------"nmap tl :Tlist
let Tlist_Show_One_File = 1let Tlist_Exit_OnlyWindow = 1let Tlist_File_Fold_Auto_Close = 1let Tlist_Auto_Open = 1let Tlist_Process_File_Always=1"------------- winmanager configuration
--------------"nmap wm :WMToggle
let g:winManagerWindowLayout='FileExplorer|TagList'nmap lu :FirstExplorerWindow
nmap lb :BottomExplorerWindow
"-------------- cscope configuration
-----------------"set cscopequickfix=s-,c-,d-,i-,t-,e-

2 下载ctags安装包

路径:

3 解压并编译ctags

tar -zxvf ctags-xx.tar.gz./configure make make installsudo make installctags --version

4 ctags配置

所有用户生效的路径:/etc/vim/vimrc,如上,步骤1已经添加

set tags=tags;set autochdir

5 taglist配置

路径:

unzip taglist_46.zip

拷贝解压后的taglist.txt到目录:/usr/share/vim/vim74/doc

拷贝解压后的taglist.vim到目录:/usr/share/vim/vim74/plugin

/etc/vim/vimrc添加如下内容,步骤1已经添加

nmap tl :Tlist
let Tlist_Show_One_File = 1let Tlist_Exit_OnlyWindow = 1let Tlist_File_Fold_Auto_Close = 1let Tlist_Auto_Open = 1let Tlist_Process_File_Always=1

5 winmanager配置

路径:

和taglist配置一样的操作,将winmanager解压以后,加压后的文件参考taglist拷贝到对应目录,/etc/vim/vimrc添加内容参考步骤1

6 cscope安装配置,和ctags一样,完全参照ctags

路径:

./configuremakemake install

ctrl+d 退出cscope

报错解决:

gcc -DHAVE_CONFIG_H -I. -I..     -g -O2 -MT build.o -MD -MP -MF .deps/build.Tpo -c -o build.o build.cbuild.c:52:20: fatal error: curses.h: No such file or directory #include 
^compilation terminated.make[2]: *** [build.o] Error 1make[2]: Leaving directory `/home/guang/develop/plugin/cscope-15.8b/src'make[1]: *** [all-recursive] Error 1make[1]: Leaving directory `/home/guang/develop/plugin/cscope-15.8b'make: *** [all] Error 2

解决:

$ sudo apt-get install libncurses5-dev libncursesw5-dev

报错解决:

/home/guang/develop/plugin/cscope-15.8b/src/input.c:260: undefined reference to `wredrawln'collect2: error: ld returned 1 exit statusmake[2]: *** [cscope] Error 1make[2]: Leaving directory `/home/guang/develop/plugin/cscope-15.8b/src'make[1]: *** [all-recursive] Error 1make[1]: Leaving directory `/home/guang/develop/plugin/cscope-15.8b'make: *** [all] Error 2

解决:安装完成libncurses5-dev后,再执行一遍如下步骤:

./configuremakemake install

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

你可能感兴趣的文章
Java编程基础:static的用法
查看>>
Java编程基础:抽象类和接口
查看>>
Java编程基础:异常处理
查看>>
Spring MVC中使用Thymeleaf模板引擎
查看>>
Spring处理表单提交
查看>>
Spring MVC异常处理
查看>>
PHP 7 的五大新特性
查看>>
PHP底层的运行机制与原理
查看>>
深入了解php底层机制
查看>>
PHP中的stdClass 【转】
查看>>
XHProf-php轻量级的性能分析工具
查看>>
PHP7新特性 What will be in PHP 7/PHPNG
查看>>
比较strtr, str_replace和preg_replace三个函数的效率
查看>>
PHP编译configure时常见错误 debian centos
查看>>
configure: error: Please reinstall the BZip2 distribution
查看>>
OpenCV gpu模块样例注释:video_reader.cpp
查看>>
【增强学习在无人驾驶中的应用】
查看>>
OpenCV meanshift目标跟踪总结
查看>>
都无代码了,还要程序员吗?
查看>>
面试想拿 10K,HR 说我只配7k?
查看>>