Home Download Buy Blog Forum Support

Origami: Pane traversal, creation, and destruction

Re: Origami: Pane traversal, creation, and destruction

Postby nizur on Wed Jul 04, 2012 4:42 am

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.

Screenshot-2012-07-03-5.png
Screenshot-2012-07-03-5.png (33.66 KiB) Viewed 2910 times
nizur
 
Posts: 43
Joined: Thu Jan 12, 2012 11:40 pm

Re: Origami: Pane traversal, creation, and destruction

Postby Phunky on Thu Jul 05, 2012 1:54 pm

nizur wrote: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.

Screenshot-2012-07-03-5.png


Awww please share this :) or send a pull request!
Phunky
 
Posts: 35
Joined: Mon Feb 07, 2011 5:02 pm

Re: Origami: Pane traversal, creation, and destruction

Postby adzenith on Thu Jul 05, 2012 6:29 pm

Accepted the pull request! Thanks!
adzenith
 
Posts: 1214
Joined: Mon Oct 19, 2009 9:12 pm

Re: Origami: Pane traversal, creation, and destruction

Postby nizur on Thu Jul 05, 2012 6:39 pm

Great! Glad I could contribute. :)
nizur
 
Posts: 43
Joined: Thu Jan 12, 2012 11:40 pm

Re: Origami: Pane traversal, creation, and destruction

Postby quodlibet on Thu Jul 05, 2012 8:40 pm

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

Code: Select all
[
   { "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
quodlibet
 
Posts: 500
Joined: Sat Jun 18, 2011 5:53 pm

Re: Origami: Pane traversal, creation, and destruction

Postby hvgotcodes on Wed Jul 18, 2012 8:42 pm

I installed this plugin last night; I don't see the preferences menu. Would be nice. On OSX, cmd+k is not invoking origami.
hvgotcodes
 
Posts: 5
Joined: Tue Jul 17, 2012 11:44 pm

Re: Origami: Pane traversal, creation, and destruction

Postby quodlibet on Wed Jul 18, 2012 9:23 pm

You can see the options under View > Origami.

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

E.g., to create a pane on the right you would do: Super+K, Super+Right
quodlibet
 
Posts: 500
Joined: Sat Jun 18, 2011 5:53 pm

Re: Origami: Pane traversal, creation, and destruction

Postby hvgotcodes on Wed Jul 18, 2012 9:54 pm

quodlibet wrote:You can see the options under View > Origami.

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

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


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?
hvgotcodes
 
Posts: 5
Joined: Tue Jul 17, 2012 11:44 pm

Re: Origami: Pane traversal, creation, and destruction

Postby quodlibet on Wed Jul 18, 2012 10:31 pm

hvgotcodes wrote:hitting super+k twice causes the current line to be deleted.


Then don't press it twice :)

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...

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


`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).
quodlibet
 
Posts: 500
Joined: Sat Jun 18, 2011 5:53 pm

Re: Origami: Pane traversal, creation, and destruction

Postby adzenith on Wed Jul 18, 2012 11:54 pm

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)
adzenith
 
Posts: 1214
Joined: Mon Oct 19, 2009 9:12 pm

PreviousNext

Return to Plugin Announcements

Who is online

Users browsing this forum: No registered users and 7 guests