我的vim配置文件

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

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值