Permalink
Browse files

Added a create pane with file move method

  • Loading branch information...
1 parent 4dd6580 commit 2cd66fd5d060f8e4dc8aceb39fcdccc5c09f317f DMS committed Sep 22, 2012
@@ -22,5 +22,10 @@
{ "keys": ["ctrl+k", "ctrl+shift+up"], "command": "destroy_pane", "args": {"direction": "up"} },
{ "keys": ["ctrl+k", "ctrl+shift+right"], "command": "destroy_pane", "args": {"direction": "right"} },
{ "keys": ["ctrl+k", "ctrl+shift+down"], "command": "destroy_pane", "args": {"direction": "down"} },
- { "keys": ["ctrl+k", "ctrl+shift+left"], "command": "destroy_pane", "args": {"direction": "left"} }
+ { "keys": ["ctrl+k", "ctrl+shift+left"], "command": "destroy_pane", "args": {"direction": "left"} },
+
+ { "keys": ["ctrl+k", "ctrl+alt+up"], "command": "create_pane_with_file", "args": {"direction": "up"} },
+ { "keys": ["ctrl+k", "ctrl+alt+right"], "command": "create_pane_with_file", "args": {"direction": "right"} },
+ { "keys": ["ctrl+k", "ctrl+alt+down"], "command": "create_pane_with_file", "args": {"direction": "down"} },
+ { "keys": ["ctrl+k", "ctrl+alt+left"], "command": "create_pane_with_file", "args": {"direction": "left"} }
]
@@ -22,5 +22,11 @@
{ "keys": ["super+k", "super+shift+up"], "command": "destroy_pane", "args": {"direction": "up"} },
{ "keys": ["super+k", "super+shift+right"], "command": "destroy_pane", "args": {"direction": "right"} },
{ "keys": ["super+k", "super+shift+down"], "command": "destroy_pane", "args": {"direction": "down"} },
- { "keys": ["super+k", "super+shift+left"], "command": "destroy_pane", "args": {"direction": "left"} }
+ { "keys": ["super+k", "super+shift+left"], "command": "destroy_pane", "args": {"direction": "left"} },
+
+ { "keys": ["super+k", "super+alt+up"], "command": "create_pane_with_file", "args": {"direction": "up"} },
+ { "keys": ["super+k", "super+alt+right"], "command": "create_pane_with_file", "args": {"direction": "right"} },
+ { "keys": ["super+k", "super+alt+down"], "command": "create_pane_with_file", "args": {"direction": "down"} },
+ { "keys": ["super+k", "super+alt+left"], "command": "create_pane_with_file", "args": {"direction": "left"} }
+
]
@@ -22,5 +22,10 @@
{ "keys": ["ctrl+k", "ctrl+shift+up"], "command": "destroy_pane", "args": {"direction": "up"} },
{ "keys": ["ctrl+k", "ctrl+shift+right"], "command": "destroy_pane", "args": {"direction": "right"} },
{ "keys": ["ctrl+k", "ctrl+shift+down"], "command": "destroy_pane", "args": {"direction": "down"} },
- { "keys": ["ctrl+k", "ctrl+shift+left"], "command": "destroy_pane", "args": {"direction": "left"} }
+ { "keys": ["ctrl+k", "ctrl+shift+left"], "command": "destroy_pane", "args": {"direction": "left"} },
+
+ { "keys": ["ctrl+k", "ctrl+alt+up"], "command": "create_pane_with_file", "args": {"direction": "up"} },
+ { "keys": ["ctrl+k", "ctrl+alt+right"], "command": "create_pane_with_file", "args": {"direction": "right"} },
+ { "keys": ["ctrl+k", "ctrl+alt+down"], "command": "create_pane_with_file", "args": {"direction": "down"} },
+ { "keys": ["ctrl+k", "ctrl+alt+left"], "command": "create_pane_with_file", "args": {"direction": "left"} }
]
View
@@ -54,6 +54,16 @@
"caption": "File",
"children":
[
+ {
+ "caption": "Create to",
+ "children":
+ [
+ { "command": "create_pane_with_file", "args": {"direction": "up"}, "caption": "Above" },
+ { "command": "create_pane_with_file", "args": {"direction": "down"}, "caption": "Below" },
+ { "command": "create_pane_with_file", "args": {"direction": "right"}, "caption": "Right" },
+ { "command": "create_pane_with_file", "args": {"direction": "left"}, "caption": "Left" }
+ ]
+ },
{
"caption": "Carry to",
"children":
View
@@ -22,5 +22,9 @@
{ "command": "destroy_pane", "args": {"direction": "up"}, "caption": "Origami: Destroy Pane Above" },
{ "command": "destroy_pane", "args": {"direction": "right"}, "caption": "Origami: Destroy Pane on the Right" },
{ "command": "destroy_pane", "args": {"direction": "down"}, "caption": "Origami: Destroy Pane Below" },
- { "command": "destroy_pane", "args": {"direction": "left"}, "caption": "Origami: Destroy Pane on the Left" }
-]
+ { "command": "destroy_pane", "args": {"direction": "left"}, "caption": "Origami: Destroy Pane on the Left" },
+
+ { "command": "create_pane_with_file", "args": {"direction": "up"}, "caption": "Origami: Create Pane with File Above" },
+ { "command": "create_pane_with_file", "args": {"direction": "right"}, "caption": "Origami: Create Pane with File on the Right" },
+ { "command": "create_pane_with_file", "args": {"direction": "down"}, "caption": "Origami: Create Pane with File Below" },
+ { "command": "create_pane_with_file", "args": {"direction": "left"}, "caption": "Origami: Create Pane with File on the Left" }
View
@@ -73,6 +73,10 @@ def clone_file_to_pane(self, direction):
self.window.run_command("clone_file")
self.carry_file_to_pane(direction)
+ def create_pane_with_file(self,direction):
+ self.create_pane(direction)
+ self.carry_file_to_pane(direction)
+
def create_pane(self, direction):
window = self.window
rows, cols, cells = self.get_layout()
@@ -165,6 +169,11 @@ def run(self, direction):
self.clone_file_to_pane(direction)
+class CreatePaneWithFileCommand(PaneCommand):
+ def run(self, direction):
+ self.create_pane_with_file(direction)
+
+
class CreatePaneCommand(PaneCommand):
def run(self, direction):
print "creating"

0 comments on commit 2cd66fd

Please sign in to comment.