mrjones2014 / smart-splits.nvim

🧠 Smart, seamless, directional navigation and resizing of Neovim + terminal multiplexer splits. Supports tmux, Wezterm, and Kitty. Think about splits in terms of "up/down/left/right".
MIT License
831 stars 33 forks source link

[Feature]: move_cursor commands should accept count #184

Closed sarmong closed 3 months ago

sarmong commented 3 months ago

Similar Issues

Description

Regular window navigation commands like <C-w>l can be prefixed with a count - 2<C-w>l to move to the left skipping one window.

It would be nice to have it supported by this plugin's move functions.

sarmong commented 3 months ago

There is also the questions:

How this should be have when at_edge = wrap? If you have 3 vsplits and you are on the rightmost and you move right with the count 2 - should it jump to the middle one or to the leftmost anyways?

Also maybe it should disregard wrap if the count > 1? If you are on a middle split and move 2 right - I don't think the user intended to go to the leftmost split?

mrjones2014 commented 3 months ago

Also maybe it should disregard wrap if the count > 1? If you are on a middle split and move 2 right - I don't think the user intended to go to the leftmost split?

I think your instinct is right there, we should just not wrap if a count > 1 is given.

I'd love to see a PR for this if you're willing!

sarmong commented 3 months ago

That makes it easier. I already patched it for myself, but will test in various conditions and will open a PR.

mrjones2014 commented 3 months ago

Fixed by #185