What can I say? I have a gift.
Origami: Pane traversal, creation, and destruction
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!
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
Edit: Apparently Iām foolish, and was looking at the wrong repo
Awesome plugin I have a few requests;
- Carry and Create would be awesome
- Destroy and move current tabs to new panel
- GoTo support
- Save as layout? So you can go to a new project and just enable a certain layout?
Seriously though this is brill
[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
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
[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
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!
[quote=āPhunkyā]Awesome plugin I have a few requests;
- Carry and Create would be awesome
- Destroy and move current tabs to new panel
- GoTo support
- Save as layout? So you can go to a new project and just enable a certain layout?
Seriously though this is brill [/quote]
- 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.
- 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?
- Do you want the commands to show up in the command palette?
- Save as layout could be pretty awesome. It also would be really easyā¦ lemme see what I can do.
Didnāt know about chaining keybindings iāll take a look at that
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
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.
Sounds like he wants a command that will close the pane of the active view, rather than one in a specifiable direction from it.
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ā¦?
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.
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.
[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 or send a pull request!
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
I installed this plugin last night; I donāt see the preferences menu. Would be nice. On OSX, cmd+k is not invoking origami.