vimrc

作者: fc82bb084ee7 | 来源:发表于2018-04-23 23:04 被阅读12次

    set ignorecase smartcase

    " 鎵撳紑涓嬮潰2涓彃浠剁殑绐楀彛
    autocmd vimenter * TlistOpen
    autocmd vimenter * TagbarOpen

    "璁剧疆tab=4
    set shiftwidth=4
    set sts=4
    set tabstop=4

    "tab->绌烘牸

    set expandtab
    "desert 棰滆壊涓婚, 淇濇姢鐪肩潧

    colorscheme desert

    "涓嶅浠?
    set nobackup
    set nowritebackup

    "杩欐牱灏卞彲浠ヤ娇鐢╟c娉ㄩ噴锛屼娇鐢╟x鍙栨秷娉ㄩ噴銆?
    :map cc v:s/^////g
    :map cx v:s/^////g
    :vmap cc :s/^////g
    :vmap cx :s/^////g

    set mouse=a
    set hlsearch
    set incsearch
    set showcmd

    set nu
    " show file name
    set laststatus=2

    set nowrapscan

    set gcr=a:block-blinkon0

    " set up the source insight now.

    " Open and close all the three plugins on the same time
    nmap <F8> :TrinityToggleAll<CR>

    " Open and close the srcexpl.vim separately
    nmap <F9> :TrinityToggleSourceExplorer<CR>

    " Open and close the taglist.vim separately
    nmap <F10> :TrinityToggleTagList<CR>

    " Open and close the NERD_tree.vim separately
    nmap <F11> :TrinityToggleNERDTree<CR>

    " set up SrcExpl now.
    " // The switch of the Source Explorer "
    " nmap <F8> :SrcExplToggle<CR>
    " "
    " // Set the height of Source Explorer window "
    " let g:SrcExpl_winHeight = 8
    " "
    " // Set 100 ms for refreshing the Source Explorer "
    " let g:SrcExpl_refreshTime = 100
    " "
    " // Set "Enter" key to jump into the exact definition context "
    " let g:SrcExpl_jumpKey = "<ENTER>"
    " "
    " // Set "Space" key for back from the definition context "
    " let g:SrcExpl_gobackKey = "<SPACE>"
    " "
    " // In order to avoid conflicts, the Source Explorer should know what plugins "
    " // except itself are using buffers. And you need add their buffer names into "
    " // below listaccording to the command ":buffers!" "
    " let g:SrcExpl_pluginList = [
    " \ "Tag_List",
    " \ "NERD_tree"
    " \ ]
    " "
    " // Enable/Disable the local definition searching, and note that this is not "
    " // guaranteed to work, the Source Explorer doesn't check the syntax for now. "
    " // It only searches for a match with the keyword according to command 'gd' "
    " let g:SrcExpl_searchLocalDef = 1
    " "
    " // Do not let the Source Explorer update the tags file when opening "
    " let g:SrcExpl_isUpdateTags = 0
    " "
    " // Use 'Exuberant Ctags' with '--sort=foldcase -R .' or '-L cscope.files' to "
    " // create/update a tags file "
    " let g:SrcExpl_updateTagsCmd = "ctags --sort=foldcase -R ."
    " "
    " // Set "<F12>" key for updating the tags file artificially "
    " let g:SrcExpl_updateTagsKey = "<F12>"
    " "
    " // Set "<F3>" key for displaying the previous definition in the jump list "
    let g:SrcExpl_prevDefKey = "<F3>"
    " "
    " // Set "<F4>" key for displaying the next definition in the jump list "
    let g:SrcExpl_nextDefKey = "<F4>"

    " ahking set cscope database.
    "cs add /home/wangxin/src/IdeaProjects/branch_androidbrowser_6.8.5_kernel/cscope.out
    cs add /home/wangxin/src/chromium_trunk/src/cscope.out

    command! -nargs=? Filter let @a='' | execute 'g/<args>/y A' | new | setlocal bt=nofile | put! a

    " set moving between windows to ctrl+arrows
    nnoremap <silent> <C-Right> <c-w>l
    nnoremap <silent> <C-Left> <c-w>h
    nnoremap <silent> <C-Up> <c-w>k
    nnoremap <silent> <C-Down> <c-w>j

    " set moving between windows to ctrl+hjkl
    noremap <silent> <C-l> <c-w>l
    noremap <silent> <C-h> <c-w>h
    noremap <silent> <C-k> <c-w>k
    noremap <silent> <C-j> <c-w>j

    相关文章

      网友评论

          本文标题:vimrc

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