vim个性化配置

"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Quickly Run
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""

map <F5> :call CompileRunGcc()<CR>

func! CompileRunGcc()
    exec "w" 
    if &filetype == 'c' 
        exec '!gcc % -o %<'
    elseif &filetype == 'cpp'
        exec '!clang++ % -o %<'
    elseif &filetype == 'python'
        exec '!python %'
    elseif &filetype == 'sh'
        :!bash %
    endif
endfunc 

"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" make cursor to the middle
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""

imap () ()<Left>

imap [] []<Left>

imap {} {}<Left>

imap <> <><Left>

imap "" ""<Left>

imap '' ''<Left>

"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" taglist
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""

map <F3> :TlistToggle<CR>

"let Tlist_Auto_Open = 1
let Tlist_Ctags_Cmd = '/usr/bin/ctags'
"let Tlist_Show_One_File = 1
let Tlist_Exit_OnlyWindow = 1
let Tlist_File_Fold_Auto_Close = 1

猜你喜欢

转载自www.cnblogs.com/Anthony-ling/p/10894478.html