美文网首页
搭建vim源码审计环境

搭建vim源码审计环境

作者: 413x | 来源:发表于2019-01-17 18:46 被阅读0次

    搭建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 <f2> :NERDTreeToggle<cr>
    nmap <f8> :TagbarToggle<CR>
    
    nmap <C-a>  :call asyncrun#quickfix_toggle(6)<cr>
    nmap <C-b>  :below terminal<cr>
    nmap <leader>w  :w<CR>
    nmap <leader>q  :q<CR>
    nmap <leader>a  :AsyncRun
    nmap <C-Down>  :res +1<CR>
    nmap <C-Up>  :res -1<CR>
    nmap <C-Left> :vertical resize -1<CR>
    nmap <C-Right> :vertical resize +1<CR>
    nmap <C-n>  :tabn<CR>
    nmap <C-p>  :tabp<CR>
    nmap <leader>h  :split
    nmap <leader>v  :vsplit
    nmap <C-r>  :source ~/.vimrc<CR>
    nmap <leader>g  :Gtags
    nmap <leader>gr :Gtags -r
    nmap <leader>lm :Leaderf function<CR>
    nmap <leader>lf :Leaderf file<CR>
    nmap pc :PreviewClose<CR>
    nmap pq :PreviewQuickfix<CR> 
    " 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源码审计环境

          本文链接:https://www.haomeiwen.com/subject/fwqwdqtx.html