hands-free-vim / talon.nvim

Neovim plugin to support Talon Voice and Cursorless
MIT License
4 stars 2 forks source link

Make the 'split move to tab' functions more robust #8

Open fidgetingbits opened 5 months ago

fidgetingbits commented 5 months ago

I ported the vimscript functions to lua and while testing it became apparent the functions behave fairly oddly give in edge cases (like when the tab being moved is on the right or left most edge)

Behaviors I think should exist

  1. If a lonely split is in a tab and you say "move to previous tab" it should NOT close the existing tab and create a new tab to move the split to. It should just return.
  2. If a lonely split is in the right most tab and you say "move to next tab" it should NOT close the existing tab and create a new tab. It should just return.
  3. The orientation of a split should be kept when moved to a different tab. For instance if TAB-A has two vertical splits, and TAB-B has one split, moving one split from TAB-A to TAB-B should try to vertically align them. This doesn't need to be super complicated, but basic orientation preservation for splits should be attempted.
saidelike commented 3 months ago

See https://github.com/hands-free-vim/talon.nvim/pull/9#issuecomment-2236587831 for additional tests/comments