vimrc

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 :TrinityToggleAll

" Open and close the srcexpl.vim separately
nmap :TrinityToggleSourceExplorer

" Open and close the taglist.vim separately
nmap :TrinityToggleTagList

" Open and close the NERD_tree.vim separately
nmap :TrinityToggleNERDTree

" set up SrcExpl now.
" // The switch of the Source Explorer "
" nmap :SrcExplToggle
" "
" // 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 = ""
" "
" // Set "Space" key for back from the definition context "
" let g:SrcExpl_gobackKey = ""
" "
" // 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 "" key for updating the tags file artificially "
" let g:SrcExpl_updateTagsKey = ""
" "
" // Set "" key for displaying the previous definition in the jump list "
let g:SrcExpl_prevDefKey = ""
" "
" // Set "" key for displaying the next definition in the jump list "
let g:SrcExpl_nextDefKey = ""

" 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//y A' | new | setlocal bt=nofile | put! a

" set moving between windows to ctrl+arrows
nnoremap l
nnoremap h
nnoremap k
nnoremap j

" set moving between windows to ctrl+hjkl
noremap l
noremap h
noremap k
noremap j

你可能感兴趣的:(vimrc)