Sublime Forum

Origami: Pane traversal, creation, and destruction

#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

#27

You can see the options under View > Origami.

Super+K does not invoke anything by itself. Itā€™s the first step in a chain:
github.com/SublimeText/Origami# ā€¦ -shortcuts

E.g., to create a pane on the right you would do: Super+K, Super+Right

0 Likes

#28

[quote=ā€œquodlibetā€]You can see the options under View > Origami.

Super+K does not invoke anything by itself. Itā€™s the first step in a chain:
github.com/SublimeText/Origami# ā€¦ -shortcuts

E.g., to create a pane on the right you would do: Super+K, Super+Right[/quote]

hitting super+k twice causes the current line to be deleted. Are you sure super+K isnt mapped to something?

How would I move the current file to the pane on the right or left?

0 Likes

#29

Then donā€™t press it twice :smile:

Super+k is bound as the first part in several chains in the default Sublime keybindings. Look in Packages/Default/Default (OSX).sublime-keymap to see what they are. For example, super+k, super+k deletes to the end of line (as youā€™ve discovered).

Now, moving on to Origamiā€™s keybindingsā€¦

Super+k, super+right to create an empty pane on the right
Super+k, shift+right to move the current file to the pane on the right

Similarly, for the left. I hope this makes sense.

Incidentally, I find Origamiā€™s bindings to be too complex for my infrequent use of them. You may want to use the menu until stuff starts to make sense. Iā€™ve also put together a set of commands (four posts up) that can be accessed from the palette. To use these, copy & paste them in a file called, say, Origami.sublime-commands and put in your Packages/User directory. This is much slower than using the keybindings, but more reliable (for my weary brain, at least).

0 Likes

#30

Iā€™ve added a sublime-commands file to the plugin (thanks quodlibet!) so you should see this show up if you update through the package manager.

Incidentally, my mnemonic is something like this:
ā€¢ arrows move
ā€¢ shift + arrows move, but bring the file with (ā€œshiftā€ holds on to the file)
ā€¢ cmd+arrows make a pane
ā€¢ shift+cmd+arrows destroy a pane (ā€œshiftā€ swaps it up)
ā€¢ option+arrows clones (ā€œoptionā€ is the standard for copying, like in an option-drag)

0 Likes

#31

it was right in front of me in that menu and i missed it. sorry and thanx.

0 Likes

#32

Iā€™ve added code to grey out inactive panes:
github.com/SublimeText/Origami/ ā€¦ ctive_pane

So question: should I push this out to everyone who has Origami, and auto-dim their inactive panes for them? Iā€™m pretty certain everyone would like the new unexpected change, but maybe they wouldnā€™t all.

It does this, automatically (active on the left, inactive on the right):


0 Likes

#33

After a bit of discussion on other venues, Iā€™ve pushed this. Use ā€œfade_inactive_panesā€:false to stop it.

0 Likes

#34

Damnā€¦ That auto-dimming is such a clever idea. Great job adzenith.

0 Likes

#35

Spoke too soon. Found a bug. Very easy to reproduce and it crashes ST. Focus the sidebar. Then try to use the mouse to drag a tab from one pane to another. CRASH.

0 Likes

#36

Inactive pans not working for me, constantly receive such error:
dropbox.com/s/1ln7camjw8klg ā€¦ 100315.png

Also something strange happening after origami upgrade in color themes menu:
dropbox.com/s/qj9k2y4r49kqo ā€¦ 100555.png

0 Likes

#37

I have the very same issue as Sinled. I also removed Origami completely but i still have that alert on almost every action (including file change, file save and so on). Any ideas on how to fix this?

Edit:
i edited session.sublime_session and removed any entry related to origami. Now is okā€¦

0 Likes

#38

But at least itā€™s consistent and cross platform (in other words it crashes sublime on both windows and linux) :smile:

0 Likes