搭建vim源码审计环境

搭建vim源码审计环境

经过我三天的尝试,vim源码审计环境初步搭建完成(摸鱼三天)

插件

代码补全

其实很少需要代码补全(又不是做开发),youcompleteme的tag生成挺麻烦。

https://github.com/Valloric/YouCompleteMe

uml

https://github.com/scrooloose/vim-slumlord

后台异步运行命令

https://github.com/skywind3000/asyncrun.vim

gtags官方配置(快速索引符号)

https://www.gnu.org/software/global/globaldoc_toc.html#Vim-editor

git

https://github.com/tpope/vim-fugitive

文件快速打开

https://github.com/Yggdroot/LeaderF

查找字符串

很少用到
https://github.com/dkprice/vim-easygrep
https://github.com/rking/ag.vim

高亮文本

https://www.vim.org/scripts/script.php?script_id=1599

书签制作

https://github.com/MattesGroeger/vim-bookmarks

c++开发环境搭建

https://zhuanlan.zhihu.com/p/33046090
https://zhuanlan.zhihu.com/p/36279445

使用技巧

剪切板相关

https://www.slothparadise.com/copy-system-clipboard-vim/
https://gist.github.com/hectorperez/1f6cbe9a55bfb34e577a

tab相关

http://vim.wikia.com/wiki/Using_tab_pages

我的配置

set nocompatible              " be iMproved, required
filetype off                  " required
set rtp+=~/.vim/bundle/Vundle.vim

call vundle#begin()
Plugin 'VundleVim/Vundle.vim'
Plugin 'tpope/vim-fugitive'
" Plugin 'Valloric/YouCompleteMe'
Plugin 'scrooloose/nerdtree'
Plugin 'majutsushi/tagbar'
Plugin 'skywind3000/asyncrun.vim'       " run shell in background
Plugin 'Yggdroot/LeaderF'               " quickfix faster
Plugin 'drewtempelmeyer/palenight.vim'  " theme
Plugin 'morhetz/gruvbox'                " theme
Plugin 'google/vim-colorscheme-primary' " theme google
Plugin 'NLKNguyen/papercolor-theme'
" Plugin 'bfrg/vim-cpp-modern'            " cpp highlight
Plugin 'octol/vim-cpp-enhanced-highlight'
Plugin 'skywind3000/vim-preview'
Plugin 'rking/ag.vim'
Plugin 'dkprice/vim-easygrep'
call vundle#end()

filetype plugin indent on    
set tabstop=2
set shiftwidth=2
set softtabstop=2
set expandtab
set background=dark
set clipboard=unnamedplus
" colorscheme gruvbox
set background=dark
colorscheme gruvbox

" file tree
let g:NERDTreeDirArrowExpandable = '+'
let g:NERDTreeDirArrowCollapsible = '-'
let g:asyncrun_open = 6
let g:asyncrun_bell = 1
let termwinsize = '10x0'

autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTree") && b:NERDTree.isTabTree()) | q | endif 
nmap  :NERDTreeToggle
nmap  :TagbarToggle

nmap   :call asyncrun#quickfix_toggle(6)
nmap   :below terminal
nmap w  :w
nmap q  :q
nmap a  :AsyncRun
nmap   :res +1
nmap   :res -1
nmap  :vertical resize -1
nmap  :vertical resize +1
nmap   :tabn
nmap   :tabp
nmap h  :split
nmap v  :vsplit
nmap   :source ~/.vimrc
nmap g  :Gtags
nmap gr :Gtags -r
nmap lm :Leaderf function
nmap lf :Leaderf file
nmap pc :PreviewClose
nmap pq :PreviewQuickfix 
" project in chrome
" let g:ycm_global_ycm_extra_conf = '~/chromium/chromium/src/tools/vim/chromium.ycm_extra_conf.py'
" let g:ycm_autoclose_preview_window_after_insertion = 1
" let g:ycm_autoclose_preview_window_after_completion = 1

你可能感兴趣的:(搭建vim源码审计环境)