Similar to this question, I want to be able to resize my splits in a repeatable manner, but without having to use a plugin. I currently use the mapping:

nnoremap <Leader>q <C-w>10<
nnoremap <Leader>w <C-w>10>

which works just fine. But I have to press and release the whole combination multiple times to get it to work.

Is there a simple way to make this repeatable without adding a plugin like the mentioned solution? I also use the common mapping for tabbing visually selected code:

vnoremap < <gv
vnoremap > >gv

which works by re-entering visual mode to avoid having to select again, but I'm not sure how this might be transferable to what I want to do as they aren't similar other than that I'm trying to achieve repeatability.

  • 1
    I'm fairly sure that if nobody came up with a built-in solution for the question you linked it's because there is no plugin-less solution to do it.
    – statox
    Oct 30 '19 at 18:51
  • 1
    You can use another count, like 5<leader>q which will become equivalent of <c-w>50<.
    – Matt
    Oct 30 '19 at 18:56
  • 1
    Have a look at the various submode plugins: Tom Links tinykeymap, Kanas submode, and Andy Wokulas tinymode Oct 30 '19 at 19:54
  • 1
    I'm gonna go answer that question with a favorite plugin of mine, thanks!
    – D. Ben Knoble
    Oct 30 '19 at 22:59

Your Answer

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

Browse other questions tagged or ask your own question.