Redhat9의 .vimrc 설정

    The Tip / / 2008. 11. 11. 01:14

    "woos vimrc map <F1> K                    "man
    map <F2> :w!<CR>                "save
    map <F3> v]}zf                    "folding
    map <F4> zo                    "free folding
    map <F5> :25vs ./<CR>:set nunumber<CR>w    "explorer window
    map <F6> w                     "window change
    map <F7> O                     "file open
    map <F8> [i                    "function prototype
    map <F9> gd                     "local variable
    map <F10> ''                    "comeback
    map <F11>                     "global variable and function
    map <F12>                     "global comeback
    map <PageUp> <C-U><C-U>
    map <PageDown> <C-D><C-D>
    map <C-A> :w!<cr>:!g++ % -o %< -DDEBUG -W -Wall && ./%<<cr>    "compil and execmap ,1 :b!1<CR>
    map ,2 :b!2<CR>
    map ,3 :b!3<CR>
    map ,4 :b!4<CR>
    map ,5 :b!5<CR>
    map ,6 :b!6<CR>
    map ,w :bw<CR>
    map ,noi :set noai<CR>:set nocindent<CR>:set nosmartindent<CR>
    map ,sei :set ai<CR>:set cindent<CR>:set smartindent<CR>set number
    "set exrc
    set cindent
    "set smartindent
    "set autoindent
    set ff=unix
    set bg=dark
    "============= tab size =================
    set ts=4
    "set sw=4
    "set sts=4
    "============= ctag config ==============
    set tags=./tags,/usr/src/linux-2.4/tags,/usr/include/tags,/Xhyper/Kernel/armlinux/tags"set tags=./tags,/temp/21x/tags,/temp/21x/drivers/tags,/temp/21x/uApp/tags

    if version >= 500func! Sts()
    let st = expand("<cword>")
    exe "sts ".st
    endfuncnmap ,st :call Sts()<cr>
    func! Tj()
    let st = expand("<cword>")
    exe "tj ".st
    endfuncnmap ,tj :call Tj()<cr>

    "============ cscope config ============
    set csprg=/usr/local/bin/cscope
    set csto=0
    set cst
    set nocsverb
    " add any database in current directory
    if filereadable("./cscope.out")
        cs add cscope.out
        "set path=./,../
    " else add database pointed to by environment
    else
        cs add /usr/src/linux/cscope.out
        "set path=/usr/src/linux
    endif
    set csverb
    func! Css()
    let css = expand("<cword>")
    new
    exe "cs find s ".css
    if getline(1) == ""
    exe "q!"
    endif
    endfuncnmap ,css :call Css()<cr>
    func! Csc()
    let csc = expand("<cword>")
    new
    exe "cs find c ".csc
    if getline(1) == ""
    exe "q!"
    endif
    endfuncnmap ,csc :call Csc()<cr>
    func! Csd()
    let csd = expand("<cword>")
    new
    exe "cs find d ".csd
    if getline(1) == ""
    exe "q!"
    endif
    endfuncnmap ,csd :call Csd()<cr>
    func! Csg()
    let csg = expand("<cword>")
    new
    exe "cs find g ".csg
    if getline(1) == ""
    exe "q!"
    endif
    endfuncnmap ,csg :call Csg()<cr>
    func! Cst()
    let cst = expand("<cword>")
    new
    exe "cs find t ".cst
    if getline(1) == ""
    exe "q!"
    endif
    endfuncnmap ,cst :call Cst()<cr>

    "============ dic config =============
    func! Edic_yahoo()
    let sed = expand("<cword>")
    new
    exec "r! eedic ".sed
    set nomod wrap
    endfuncnmap ,ed :call Edic_yahoo()<cr>gg
    func! KEdic()
    let ske = expand("<cword>")
    new
    exec "r! engdic ".ske
    set nomod wrap
    noremap <buffer> q :bd<cr>:echo ''<cr>
    endfuncnmap ,ke :call KEdic()<cr>gg

    "============ man config ==============
    func! Man()
    let sm = expand("<cword>")
    exe "!man -S 2:3:4:5:6:7:8:9:tcl:n:l:p:o ".sm
    endfuncnmap ,ma :call Man()<cr><cr>
    endif

    반응형
    • 네이버 블러그 공유하기
    • 네이버 밴드에 공유하기
    • 페이스북 공유하기
    • 카카오스토리 공유하기