sublimehq/sublime_text

Mouse click on symbol should be "Goto Definition"

Closed this issue ยท 7 comments

Problem description

this is industry standard

Preferred solution

"Goto Definition" is already implemented, so this would be minimal extra work

Alternatives

pressing F12, which is SW specific and less intuitive, e.g. in Eclipse it's F4

Additional Information

No response

ctrl clicking in Sublime Text is reserved for adding a caret. You can goto a definition using the mouse by hovering over a symbol. Alternatively you can configure your own mouse binding for this, for example:

[
    { "button": "button1", "modifiers": ["ctrl"], "command": "goto_definition" },
]

Adding a caret seems way less important than going to definition by default isn't it?
Many users are using the too for coding I would assume.

Depends highly on your workflow and ctrl is universally used for extending selections. Either way the default can't be changed or else everyone's workflow gets broken.

Fare enough, I would recommend checking shortcuts in other popular IDEs like VScode/Eclipse first, when adding new features in Sublime.

That's what we do. This keyboard shortcut predates VSCode's existence by a good 7 years.

Yes, the solution works.

That's what we do. This keyboard shortcut predates VSCode's existence by a good 7 years.

But not Eclipse November 2001 :) And I'm not the first one who noticed it
https://www.youtube.com/watch?v=DwTV5ogPdlU
https://stackoverflow.com/questions/16235706/sublime-3-set-key-map-for-function-goto-definition

And who decides what's standard? Why didn't Eclipse or VSCode follow ST? We could also complain about them not doing so. Finally such kind of design choises are question of taste and known best practices. And taste is known to be a bad candidate to argue about ;-)