Install VIM and GDB

来源:互联网 发布:赛尔网络 编辑:程序博客网 时间:2024/06/04 16:57

http://easwy.com/blog/archives/advanced-vim-skills-vim-gdb-vimgdb/

http://zqwt.012.blog.163.com/blog/static/1204468420113625353505/
http://www.cnblogs.com/JohnShao/archive/2011/10/27/2226294.html
http://blog.csdn.net/donglin425/article/details/7990564
http://www.letuknowit.com/topics/20120519/compile-and-install-vim-on-ubuntu-12-04.html
http://hi.baidu.com/selfwinning/item/078d87ed9eff7d3d86d9ded7

1 Download

Download vim-7.2.tar.bz2 from ftp://ftp.vim.org/pub/vim/unix

Download patch vim gdb from http://sourceforge.net/projects/clewn/files/vimGdb/

 tar xjf vim-7.2.tar.bz2 tar xzf vimgdb72-1.14.tar.gz patch -d vim72 --backup -p0 < vimgdb/vim72.diff

2 Configure Makefile (optional)
cd  vim 72/srcnano Makefile
# CSCOPE                                                                                                                     # Uncomment this when you want to include the Cscope interface.                                                               # xiao                                                     CONF_OPT_CSCOPE = --enable-cscope 
### Installation directories.  The defaults come from configure.                                                                                                                            ### prefix  the top directory for the data (default "/usr/local")                                                                                                                                           # Uncomment the next line to install Vim in your home directory.                                                              # xiao                                                                                                                    prefix = $(HOME)


3 Install

sudo apt-get install libncurses5-dev   (http://www.letuknowit.com/topics/20120516/no-terminal-library-found.html) make CFLAGS="-O3 -D_FORTIFY_SOURCE=1"  (http://zqwt.012.blog.163.com/blog/static/1204468420113625353505/)make install

4 Configure environment (The new vim is installed in ~/bin)

sudo vim ~/.bashrc
PATH=$HOME/bin:$PATHexport PATH

5 Install runtime file of vimgdb

cd ~/install/vimgdb/tar zxf vimgdb_runtime.tgz -C ~/.vim/ 

6 Test gdbvim

~/bin/vim:helptags ~/.vim/doc :help vimgdb:run macros/gdb_mappings.vim use space key to change the mode to dgb

http://easwy.com/blog/archives/advanced-vim-skills-vim-gdb-vimgdb/




原创粉丝点击