2016年3月29日 星期二

[IDE] Sublime text 3 Jump to definition and back with ctrl+ mouse left click. Ubuntu/Mac/Windows


Ubuntu: 
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


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



pasted below into the file you just created.


[
 {
  "button": "button1",
  "count": 1,
  "modifiers": ["ctrl"],
  "press_command": "drag_select",
  "command": "goto_definition"
 },
 {
  "button": "button2",
  "count": 1,
  "modifiers": ["ctrl"],
  "press_command": "jump_back",
  "command": "jump_back"
 }
]



 save. restart sublime text3 

Then you can press ctrl then click a function to jump to definition,
and press right click will jump back.










沒有留言:

張貼留言