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
时间: 2024-11-06 18:10:15