autocmd FileType c,cpp map <buffer> <leader><space> :w<cr>:make<cr>
nmap cn :cn<cr>
nmap cp :cp<cr>
nmap cw :cw 10<cr>
nmap tn :tabnext<CR>
nmap tp :tabpre<CR>
nmap <C-j> <C-w>j
nmap <C-l> <C-w>l
nmap <C-h> <C-w>h
nmap <C-k> <C-w>k
set foldmethod=syntax
nmap <space> @=((foldclosed(line('.')) < 0) ? 'zc' :'zo')<CR>
nmap zz @=((foldclosed(line('.')) < 0) ? 'zC' :'zO')<CR>
set foldlevelstart=99
set noswapfile
set autoindent
set nu
set smartindent
set tabstop=4
set softtabstop=4
set shiftwidth=4
set hls!
"color evening
filetype plugin on
set makeprg=make
nmap <F5> :call MyRun()<CR>
imap <F5> <ESC>:call MyRun()<CR>
func! MyRun()
if expand("%:e") == "pl"
exe ":!perl %"
elseif expand("%:e") == "py"
exe ":!python %"
else
exe "make"
endif
endfunc
":let Tlist_Auto_Open=1
:let Tlist_Exit_OnlyWindow = 1
"let g:winManagerWindowLayout = "BufExplorer|FileExplorer|TagList"
"let g:winManagerWindowLayout = "TagList|FileExplorer"
"let g:winManagerWindowLayout = "FileExplorer|TagList"
"let g:winManagerWindowLayout = "TagList|NERDTree"
"let g:winManagerWidth = 30
map <F1> :Tlist<cr>
nmap tb :TlistClose<CR>:TagbarToggle<CR>
let g:tagbar_width=30
let g:tagbar_left=1
nmap tl :TagbarClose<CR>:Tlist<CR>
let Tlist_Show_One_File=1
" let Tlist_Enable_Fold_Column=0
" let Tlist_Exit_OnlyWindow=1
" let Tlist_File_Fold_Auto_Close=1
" let Tlist_WinWidth=30
" "let Tlist_Use_Right_Window=1
filetype on
filetype plugin on
let g:miniBufExplMapCTabSwitchBufs = 1
autocmd BufRead,BufNew :call UMiniBufExplorer
set wildignore+=*/obj/*
set rtp+=~/.vim/bundle/vundle/
call vundle#rc()
Bundle 'gmarik/vundle'
Bundle 'a.vim'
Bundle 'Align'
Bundle 'jiangmiao/auto-pairs'
Bundle 'bufexplorer.zip'
Bundle 'ccvext.vim'
Bundle 'cSyntaxAfter'
Bundle 'ctrlpvim/ctrlp.vim'
"Bundle 'mattn/emmet-vim'
Bundle 'Yggdroot/indentLine'
"Bundle 'vim-javacompleteex'
Bundle 'Mark--Karkat'
"Bundle 'Shougo/neocomplcache.vim'
"Bundle 'scrooloose/nerdcommenter'
Bundle 'scrooloose/nerdtree'
"Bundle 'OmniCppComplete'
Bundle 'Lokaltog/vim-powerline'
Bundle 'repeat.vim'
"Bundle 'msanders/snipmate.vim'
"Bundle 'wesleyche/SrcExpl'
Bundle 'std_c.zip'
Bundle 'tpope/vim-surround'
Bundle 'scrooloose/syntastic'
Bundle 'majutsushi/tagbar'
Bundle 'taglist.vim'
Bundle 'TxtBrowser'
Bundle 'ZoomWin'
nmap <F3> :SrcExplToggle<CR>
let Tlist_Show_One_File=1
let Tlist_Exit_OnlyWindow=1
let Tlist_File_Fold_Auto_Close=1
let Tlist_WinWidth=30
au BufRead,BufNewFile *.txt setlocal ft=txt
nmap <F4> <Leader>sy
if has("cscope")
set cscopequickfix=s-,c-,d-,i-,t-,e-
set cscopetag
set csto=0
if filereadable("cscope.out")
cs add cscope.out
elseif $CSCOPE_DB != ""
cs add $CSCOPE_DB
endif
set cscopeverbose
nmap <C-g>s :cs find s <C-R>=expand("<cword>")<CR><CR>
nmap <C-g>g :cs find g <C-R>=expand("<cword>")<CR><CR>
nmap <C-g>c :cs find c <C-R>=expand("<cword>")<CR><CR>
nmap <C-g>t :cs find t <C-R>=expand("<cword>")<CR><CR>
nmap <C-g>e :cs find e <C-R>=expand("<cword>")<CR><CR>
nmap <C-g>f :cs find f <C-R>=expand("<cfile>")<CR><CR>
nmap <C-g>i :cs find i ^<C-R>=expand("<cfile>")<CR>$<CR>
nmap <C-g>d :cs find d <C-R>=expand("<cword>")<CR><CR>
endif
set guifont=PowerlineSymbols\ for\ Powerline
set nocompatible
set t_Co=256
let g:Powerline_symbols = 'fancy'
nmap m lbve\m
nmap M \n
我的vim配置文件
最新推荐文章于 2024-07-20 09:23:11 发布