5

A common pattern when I edit files in vim is to have two buffers open using :sb, and cycle between them using C-w C-w. I tend to avoid having more two windows open because then the cognitive (and number of keystrokes) overhead of switching becomes higher.

I recently started using the quickfix functionality provided by :make, and now I have a dilemma. You see, the quickfix window constitutes another window: so now if I am mashing C-w C-w I have to cycle through three buffers, one of which I don't actually want to cycle into (usually). So, is there a way to make the buffer cycling commands skip qf windows?

General suggestions on how to improve my vim workflow here would also be appreciated.

5

You need to override the command with a custom mapping in which you check for the quickfix window, and then just jump again:

:nnoremap <silent> <C-w><C-w> <C-w><C-w>:if &buftype ==# 'quickfix'<Bar>wincmd w<Bar>endif<CR>
| improve this answer | |
0

What you can do also is make a <c-w>l and <c-w>h and <c-w>k and <c-w>j to switch to the window in that direction

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.