Sublime Forum

Origami: Pane traversal, creation, and destruction

#7

What can I say? I have a gift. :smiling_imp:

0 Likes

#8

Looks cool. I will have to give this a try. Thanks!

0 Likes

#9

I tweeted this hard. Nice one!

0 Likes

#10

Thanks! Iā€™d been thinking about making this for a while because I really wanted it, and then one day things just reached that point where I had to do it and couldnā€™t sleep until I got it done. Glad you like it!

0 Likes

#11

Very nice! If you made it a WindowCommand, rather than a TextCommand, then itā€™d work in panes that donā€™t have any files. Currently, if you create a pane, and then focus it immediately, you arenā€™t able to move back.
On the nitpicky side of things, thereā€™s a few print statements still in the code, and your readme still mentions the old name :slight_smile:

Edit: Apparently Iā€™m foolish, and was looking at the wrong repo

0 Likes

#12

Awesome plugin :smile: I have a few requests;

  1. Carry and Create would be awesome
  2. Destroy and move current tabs to new panel
  3. GoTo support
  4. Save as layout? So you can go to a new project and just enable a certain layout?

Seriously though this is brill :smile:

0 Likes

#13

[quote=ā€œjpsā€]Very nice! If you made it a WindowCommand, rather than a TextCommand, then itā€™d work in panes that donā€™t have any files. Currently, if you create a pane, and then focus it immediately, you arenā€™t able to move back.
On the nitpicky side of things, thereā€™s a few print statements still in the code, and your readme still mentions the old name :smile:

Edit: Apparently Iā€™m foolish, and was looking at the wrong repo[/quote]

Not so foolish, except for the readme, it looks youā€™re right :wink:

0 Likes

#14

[quote=ā€œjpsā€]Very nice! If you made it a WindowCommand, rather than a TextCommand, then itā€™d work in panes that donā€™t have any files. Currently, if you create a pane, and then focus it immediately, you arenā€™t able to move back.
On the nitpicky side of things, thereā€™s a few print statements still in the code, and your readme still mentions the old name :smile:

Edit: Apparently Iā€™m foolish, and was looking at the wrong repo[/quote]

Luckily those two things have just been fixed! (by a pull request from someone else!) And I think Iā€™m just gonna delete the old repo.
Thanks!

0 Likes

#15

[quote=ā€œPhunkyā€]Awesome plugin :smile: I have a few requests;

  1. Carry and Create would be awesome
  2. Destroy and move current tabs to new panel
  3. GoTo support
  4. Save as layout? So you can go to a new project and just enable a certain layout?

Seriously though this is brill :smile:[/quote]

  1. Iā€™m pretty certain you can chain commands in keybindings (or was that only in Sublime Text 1?). If not, a carry+create could be added.
  2. Can you describe this in more detail? Are you saying when you destroy a pane you want all the tabs in it to go to the newly-focussed pane?
  3. Do you want the commands to show up in the command palette?
  4. Save as layout could be pretty awesome. It also would be really easyā€¦ lemme see what I can do.
0 Likes

#16

Didnā€™t know about chaining keybindings iā€™ll take a look at that :smile:

Lets says you have one pane open with two tabs (HTML & CSS), we then create a new pane and move the CSS file over to it so we can compare HTML & CSS. I then wish to go back to a single pane but keep all files open, so I would like to destroy the selected pane while moving its files to the last active one.

Yep!

[quote=ā€œadzenithā€]
4. Save as layout could be pretty awesome. It also would be really easyā€¦ lemme see what I can do.[/quote]

Awesome :smiley:

0 Likes

#17

Isnā€™t it how it works currently ?
Closing a pane never close the files it contains, ST2 move it to another pane. I donā€™t know if it is the last active one or the previous one.

0 Likes

#18

Sounds like he wants a command that will close the pane of the active view, rather than one in a specifiable direction from it.

0 Likes

#19

Oh, I see. This is actually more difficult because if you have more than two panes, where do you and your files end up? Thatā€™s why you can only destroy a different pane. If youā€™ve got two panes, just destroy the other one and everything should workā€¦?

0 Likes

#20

where do you and your files end up?

I think youā€™d still key in a direction, it would just mean destroy current pane, move in the direction specified, drag the views, making the currently active view active in the group dragged to.

0 Likes

#21

adzenith, I donā€™t know if itā€™s wanted or needed, but Iā€™ve made a sublime-menu file for Origami for personal use for those times I forget the shortcuts. Let me know if you want to take a look at it.


0 Likes

#22

[quote=ā€œnizurā€]adzenith, I donā€™t know if itā€™s wanted or needed, but Iā€™ve made a sublime-menu file for Origami for personal use for those times I forget the shortcuts. Let me know if you want to take a look at it.

[attachment=0]Screenshot-2012-07-03-5.png[/attachment][/quote]

Awww please share this :smile: or send a pull request!

0 Likes

#23

Accepted the pull request! Thanks!

0 Likes

#24

Great! Glad I could contribute. :smile:

0 Likes

#25

I see your menu items and I raise you one a full set of commands:


	{ "command": "create_pane", "args": {"direction": "up"}, "caption": "Origami: Create Pane Above" },
	{ "command": "create_pane", "args": {"direction": "down"}, "caption": "Origami: Create Pane Below" },
	{ "command": "create_pane", "args": {"direction": "right"}, "caption": "Origami: Create Pane Right" },
	{ "command": "create_pane", "args": {"direction": "left"}, "caption": "Origami: Create Pane Left" },
	{ "command": "travel_to_pane", "args": {"direction": "up"}, "caption": "Origami: Focus on Pane Above" },
	{ "command": "travel_to_pane", "args": {"direction": "down"}, "caption": "Origami: Focus on Pane Below" },
	{ "command": "travel_to_pane", "args": {"direction": "right"}, "caption": "Origami: Focus on Pane Right" },
	{ "command": "travel_to_pane", "args": {"direction": "left"}, "caption": "Origami: Focus on Pane Left" },
	{ "command": "destroy_pane", "args": {"direction": "up"}, "caption": "Origami: Destroy Pane Above" },
	{ "command": "destroy_pane", "args": {"direction": "down"}, "caption": "Origami: Destroy Pane Below" },
	{ "command": "destroy_pane", "args": {"direction": "right"}, "caption": "Origami: Destroy Pane Right" },
	{ "command": "destroy_pane", "args": {"direction": "left"}, "caption": "Origami: Destroy Pane Left" },
	{ "command": "carry_file_to_pane", "args": {"direction": "up"}, "caption": "Origami: Move File Above" },
	{ "command": "carry_file_to_pane", "args": {"direction": "down"}, "caption": "Origami: Move File Below" },
	{ "command": "carry_file_to_pane", "args": {"direction": "right"}, "caption": "Origami: Move File Right" },
	{ "command": "carry_file_to_pane", "args": {"direction": "left"}, "caption": "Origami: Move File Left" },
	{ "command": "clone_file_to_pane", "args": {"direction": "up"}, "caption": "Origami: Clone File Above" },
	{ "command": "clone_file_to_pane", "args": {"direction": "down"}, "caption": "Origami: Clone File Below" },
	{ "command": "clone_file_to_pane", "args": {"direction": "right"}, "caption": "Origami: Clone File Right" },
	{ "command": "clone_file_to_pane", "args": {"direction": "left"}, "caption": "Origami: Clone File Left" }
]

Origami is a great plugin but I thought (correctly, as it turned out) that they keybindings were too convoluted for me to remember. I liked the idea of putting them in a menu, but I prefer leveraging ST2ā€™s command palette where possible, hence the above.

Iā€™ve been using this for a couple hours now and I find myself in a bit of a UX muddle. I have incorporated @nizurā€™s idea of above/below instead of @adzenithā€™s up/down (which made more sense when using the keybindings), although I do sometimes mix them up. For example, it may make more sense to say ā€œmove file upā€ while also saying ā€œclone file aboveā€ (the first refers to the movement of the file, while the other refers to the position of the pane).

I think ā€œmoveā€ is better than ā€œcarryā€ and most anything is better than ā€œtravelā€, although my current ā€œfocusā€ doesnā€™t work very well with STā€™s fuzzy search (because of the plethora of ā€œfileā€ commands).

Apologies if the above couple paragraphs made no sense. If you do use the commands, please let me/us/someone know if you have any suggestions on how to improve them.

Thanks,
Alex

0 Likes

#26

I installed this plugin last night; I donā€™t see the preferences menu. Would be nice. On OSX, cmd+k is not invoking origami.

0 Likes