vim通过函数

1. 开关quickfix窗口

function ToggleQuickfix()
    let winList = getwininfo()
    for window in winList
        if window.quickfix == 1 | :ccl | return | endif
    endfor
    :copen | :exec "normal! \<c-w>J"
endfunction

2. 开关拆行

function ToggleWrap()
    if getwinvar(0, '&wrap') == 1 | exe "set nowrap"
    else | exe "set wrap" | endif
endfunction

 

posted on 2017-06-14 12:00  哥斯达黎加  阅读(219)  评论(0编辑  收藏  举报

导航