rat icon indicating copy to clipboard operation
rat copied to clipboard

Allow specification of the horizontal/vertical layout

Open shalpin opened this issue 8 years ago • 3 comments

At present rat makes the decision for whether splits are horizontal or vertical. Could this be changed so that the user can decide, possibly via the .ratrc?

shalpin avatar Oct 11 '17 14:10 shalpin

What do folks think about having a keybinding to toggle between horizontal/vertical? So the default would be the current "responsive" behavior (dependent on terminal width), but a keybinding would toggle between forced horizontal and forced vertical.

ericfreese avatar Oct 11 '17 15:10 ericfreese

I would like that. It would be nice though if I could use an option to the rat command or in the rc so that I could set my default preference when I start rat. The way I had envisaged it working was that I could pass an option to a new mode to specify horizontal or vertical for each subsequent split.

shalpin avatar Oct 12 '17 01:10 shalpin

I'm imagining a new top-level keyword option (sibling to mode, bindkey, source) that could be used to configure global options. Maybe something like this?

option <option-name> <option-value>

e.g.

option split-direction horizontal

Could then define an action in action.go to be used like so:

bindkey | toggle-split-direction

ericfreese avatar Dec 03 '17 20:12 ericfreese