Skip to content

Commit

Permalink
Details for clicking to jump to a dependency. Fixes #11
Browse files Browse the repository at this point in the history
  • Loading branch information
Joel Kemp committed Jul 14, 2014
1 parent acbc7bf commit 9795e61
Show file tree
Hide file tree
Showing 3 changed files with 68 additions and 1 deletion.
32 changes: 32 additions & 0 deletions changelogs/1.1.1.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
Using the mouse to jump to a dependency
---

1. Create a new (or modify existing if you have one) .sublime-mousemap file:

Windows - create Default (Windows).sublime-mousemap in %appdata%\Sublime Text 3\Packages\User

Linux - create Default (Linux).sublime-mousemap in ~/.config/sublime-text-3/Packages/User

Mac - create Default (OSX).sublime-mousemap in ~/Library/Application Support/Sublime Text 3/Packages/User

2. Add the following binding

[
{
"button": "button1",
"count": 1,
"modifiers": ["super", "alt"],
"press_command": "drag_select",
"command": "dependents",
"args": {
"root": "public/assets/js",
"mode": "dependency"
}
}
]

* Note: You do not need the opening/closing square brackets [] if you are modifying an existing .sublime-mousemap file.

3. Modify the root according to the location of JS files in your codebase

Now, you can hold down CMD + Option and Click on the path of a dependency to jump to that file!
3 changes: 2 additions & 1 deletion messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@
"install": "readme.md",
"1.0.8": "changelogs/1.0.8.txt",
"1.0.9": "changelogs/1.0.9.txt",
"1.1.0": "changelogs/1.1.0.txt"
"1.1.0": "changelogs/1.1.0.txt",
"1.1.1": "changelogs/1.1.1.txt"
}
34 changes: 34 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,36 @@ Add the following to your User defined keyboard bindings: `Preferences` -> `Key

* You won't need the opening and closing square brackets ([]) if you have pre-existing key bindings

#### Mouse Binding

1. Create a new (or modify existing if you have one) .sublime-mousemap file:

Windows - create Default (Windows).sublime-mousemap in %appdata%\Sublime Text 3\Packages\User

Linux - create Default (Linux).sublime-mousemap in ~/.config/sublime-text-3/Packages/User

Mac - create Default (OSX).sublime-mousemap in ~/Library/Application Support/Sublime Text 3/Packages/User

2. Add the following binding

[
{
"button": "button1",
"count": 1,
"modifiers": ["super", "alt"],
"press_command": "drag_select",
"command": "dependents",
"args": {
"root": "public/assets/js",
"mode": "dependency"
}
}
]

* Note: You do not need the opening/closing square brackets [] if you are modifying an existing .sublime-mousemap file.

3. Modify the root according to the location of JS files in your codebase

### Usage

#### Find the dependents of the current file
Expand All @@ -78,3 +108,7 @@ Use the `keys` value above, `cmd + option + up`, to trigger finding the dependen

1. Within a JS file, place your cursor over the dependency path you want to go to
2. Press cmd + option + right (or the key combination you defined) to jump to that file

If you defined the mousemap in the Mouse Binding section:

1. hold down CMD + Option and Click on the path of a dependency to jump to that file

0 comments on commit 9795e61

Please sign in to comment.