Skip to content

Commit

Permalink
Add clone pane command and some golang ignore stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
neilsarkar committed Jun 14, 2014
1 parent 3f857cc commit 52345ce
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 5 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
.DS_STORE
*.last-run
*.pyc
Package\ Control.sublime-settings
Package\ Control.sublime-settings
Package\ Control*
GoSublime*
22 changes: 19 additions & 3 deletions Default (OSX).sublime-keymap
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,12 @@
"command": "copy_path_to_clipboard"
},

// clone pane
{
"keys": ["super+alt+2"],
"command": "clone_pane"
},

// ctags
{
"keys": ["ctrl+]"],
Expand Down Expand Up @@ -67,6 +73,13 @@
"context": [ {"key": "selector", "operator": "equal", "operand": "source.coffee"} ]
},

{
"keys": ["super+r"],
"command": "gs9o_open",
"args": {"run": ["replay"] },
"context": [ {"key": "selector", "operator": "equal", "operand": "source.go"} ]
},

// close all other tabs
{
"keys": ["super+alt+w"],
Expand All @@ -90,17 +103,20 @@
{
"keys": ["super+r"],
"command": "run_tests",
"args": {"scope": "file"}
"args": {"scope": "file"},
"context": [ {"key": "selector", "operator": "equal", "operand": "source.ruby"} ]
},
{
"keys": ["super+shift+r"],
"command": "run_tests",
"args": {"scope": "line"}
"args": {"scope": "line"},
"context": [ {"key": "selector", "operator": "equal", "operand": "source.ruby"} ]
},
{
"keys": ["super+alt+ctrl+r"],
"command": "run_tests",
"args": {"scope": "last"}
"args": {"scope": "last"},
"context": [ {"key": "selector", "operator": "equal", "operand": "source.ruby"} ]
},

// go to symbol
Expand Down
2 changes: 1 addition & 1 deletion Preferences.sublime-settings
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
"log"
],
"font_face": "Monaco",
"font_size": 21.0,
"font_size": 18.0,
"highlight_line": true,
"highlight_modified_tabs": true,
"hot_exit": false,
Expand Down
9 changes: 9 additions & 0 deletions clone_pane.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import sublime, sublime_plugin

class ClonePaneCommand(sublime_plugin.WindowCommand):
def run(self):
# Use the ST2 built-in split to two panes
self.window.run_command("set_layout", {"cells": [[0, 0, 1, 1], [1, 0, 2, 1]], "cols": [0.0, 0.5, 1.0], "rows": [0.0, 1.0]})
# Requires the Origami package
# self.window.run_command("create_pane", {"direction": "right"})
self.window.run_command("clone_file_to_pane", {"direction": "right"})

0 comments on commit 52345ce

Please sign in to comment.