Permalink
Browse files

Bindings and documentation cleanup: Added new keybindings of 'ctrl+>'…

… to jump to definition and 'ctrl+<' to jump back. Fixed README to reflect proper binding of 'ctrl+SHIFT+left-click' for jump to definition, and added 'ctrl+shift+right-click' to jump back. Added symbol list commands to command palette.'
  • Loading branch information...
1 parent e2eb539 commit c66c34c8d42957de7ab979009658c2606581f0f2 Greg Williams committed Oct 20, 2012
Showing with 52 additions and 22 deletions.
  1. +27 −1 Default.sublime-commands
  2. +9 −1 Default.sublime-keymap
  3. +6 −0 Default.sublime-mousemap
  4. +10 −20 README.creole
@@ -1,7 +1,33 @@
[
{
- "args": {},
"caption": "CTags: Rebuild Tags",
"command": "rebuild_tags"
+ },
+ {
+ "caption": "CTags: Show Symbols (file)",
+ "command": "show_symbols",
+ "context": [
+ {
+ "key": "selector",
+ "match_all": true,
+ "operand": "source -source.css",
+ "operator": "equal"
+ }
+ ]
+ },
+ {
+ "caption": "CTags: Show Symbols (all)",
+ "command": "show_symbols",
+ "args": {
+ "type": "multi"
+ },
+ "context": [
+ {
+ "key": "selector",
+ "match_all": true,
+ "operand": "source -source.css",
+ "operator": "equal"
+ }
+ ]
}
]
@@ -4,6 +4,10 @@
"keys": ["ctrl+t", "ctrl+t"]
},
{
+ "command": "navigate_to_definition",
+ "keys": ["ctrl+shift+period"]
+ },
+ {
"command": "search_for_definition",
"keys": ["ctrl+t", "ctrl+y"]
},
@@ -13,6 +17,10 @@
},
{
"command": "jump_back",
+ "keys": ["ctrl+shift+comma"]
+ },
+ {
+ "command": "jump_back",
"args": {"to": "last_modification"},
"keys": ["ctrl+t", "ctrl+m"]
},
@@ -61,7 +69,7 @@
{ // override current default
"command": "transpose",
"context": [
- { "key": "num_selections", "operator": "not_equal", "operand": 1 }
+ { "key": "num_selections", "operator": "greater_than", "operand": 1 }
],
"keys": ["ctrl+t"]
}
@@ -5,5 +5,11 @@
"press_command": "drag_select",
"modifiers": ["ctrl","shift"],
"command": "navigate_to_definition"
+ },
+ {
+ "button": "button2",
+ "count": 1,
+ "modifiers": ["ctrl","shift"],
+ "command": "jump_back"
}
]
View
@@ -16,19 +16,9 @@ To get a proper copy of ctags, use one of the following options:
* Using [[http://www.macports.org/|MacPorts]]:
{{{port install ctags}}}
-* Make sure that Sublime Text is using the right version of CTags: Ensure that ~/.MacOSX/environment.plist has /usr/local/bin in the PATH string before /usr/bin (the standard location for CTags). Here's a sample environment.plist that should work:
-
-{{{
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
-<key>PATH</key>
-<string>/usr/local/bin:/usr/bin:/bin</string>
-</dict>
-</plist>
-}}}
-* If /usr/local/bin wasn't in your PATH already, you have to log out and log back in for the environment variables to be read in again.
+*Make sure that Sublime Text is using the right version of CTags:*
+* If 'which ctags' doesn't point at ctags in '/usr/local/bin', make sure you add '/usr/local/bin' to your PATH ahead of the folder that 'which ctags' reported.
+** Add or modify the 'export PATH=...' (e.g. in ~/.profile) to make the change permanent
=== Linux ===
@@ -136,10 +126,10 @@ Thanks :)
=== Commands Listing ===
-|=Command |=Key Binding |=Alt Binding |=Mouse Binding |
-| rebuild_ctags | ctrl+t ctrl+r | | |
-| navigate_to_definition | ctrl+t ctrl+t | ctrl+alt+] | ctrl+alt+left_click |
-| jump_back | ctrl+t ctrl+b | ctrl+alt+[ | |
-| jump_back to_last_modification | ctrl+t ctrl+m | | |
-| show_symbols | alt+s | | |
-| show_symbols multi | alt+shift+s | | |
+|=Command |=Key Binding |=Alt Binding |=Mouse Binding |
+| rebuild_ctags | ctrl+t ctrl+r | | |
+| navigate_to_definition | ctrl+t ctrl+t | ctrl+> | ctrl+shift+left_click |
+| jump_back | ctrl+t ctrl+b | ctrl+< | ctrl+shift+right_click |
+| jump_back to_last_modification | ctrl+t ctrl+m | | |
+| show_symbols | alt+s | | |
+| show_symbols multi | alt+shift+s | | |

0 comments on commit c66c34c

Please sign in to comment.