ci_edit icon indicating copy to clipboard operation
ci_edit copied to clipboard

Add a command to split the editor horizontally

Open gennad opened this issue 6 years ago • 2 comments

It is convenient to work on multiple files with a split, especially when browsing the function usage in one file and the function definition in another, I'm proposing to add the horizontal (side by side) split.

gennad avatar Apr 13 '19 19:04 gennad

I'd done some work on that previously, but it turned out that I (and others I was aware of) tended to use a terminal or mux that would already split the terminal window. So there was less need to split the window within the editor.

One of the tricky bits in doing split screen is working out a clean way for the user to interact with the split windows.

Here's some questions to consider:

  • how does the user initially split the window?
  • how do they split it the other way (vertical or horizontal)?
  • how does the user change the sizes of the windows?
  • what does the user do to close a split?
  • how do they move focus, to another window pane - can it be done with the keyboard?
  • can there be two or more views into the same file (I hope so), but how is that shown/updated?
  • should the window layout be saved and restored?
  • should the find and command input be global for all the panes (so there is only one of them) or should each window pane have it's own find and command input?

There's more, that's just to give some flavor for the concerns. The hard part is the user experience.

dschuyler avatar Apr 16 '19 02:04 dschuyler

Oh, all that is not to turn you away or say that "it's too hard" or something.

I'm trying to say it has some tricky challenges and I'd like to talk through those issues and hopefully find an elegant solution - please do help with that.

dschuyler avatar Apr 16 '19 02:04 dschuyler