diff --git a/changelogs/1.1.1.txt b/changelogs/1.1.1.txt new file mode 100644 index 00000000..1a65f529 --- /dev/null +++ b/changelogs/1.1.1.txt @@ -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! diff --git a/messages.json b/messages.json index bfb2a736..9da9ae4e 100644 --- a/messages.json +++ b/messages.json @@ -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" } diff --git a/readme.md b/readme.md index 01a8c2c7..d63122d5 100644 --- a/readme.md +++ b/readme.md @@ -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 @@ -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