I’m quite sure I used a shortcut for this earlier today, but I don’t really remember it. I just want to be able to move my code editor view to the current cursor position. (I know I can achieve this with the left or right arrow keys, but I want the shortcut to jump to it).
It’s Control + L on macOS, for anyone who wants to know.
The best way to find a keyboard shortcut is to find the command in the menu and look at the key shown next to it - in this case it’s Goto -> Scroll -> Scroll to Selection, which is ctrl+k ctrl+c on Windows
Thanks! I did that but still hadn’t been able to find it there. Furthermore, I couldn’t even find it on the multiple “shortcut cheat sheet” sites a visited!
don’t forget you can search the menus
- Install PackageResourceViewer if it isn’t already installed
- Open Command Palette
PackageResourceViewer: Open Resource
- Use ST’s find capabilities to look for what you want, and note the menu hierarchy (JSON) or command name
- Optionally search the Default sublime-keymap file for the command
Wow, that’s really nice! Do you know if you can change any of these? The reason I want to do this is, for example, because when I press “Tab”, the “Goto” menu bar gets highlighted (on macOS). I’m thinking that removing the menu bar item from the menu bar will prevent this (rather visually distracting) thing from happening. Would I just need to create a
Main.sublime-menu file? I don’t know how that would help me override the settings, though… It seems like I can even edit the file, but I am slightly hesitant to do so, in case there is a better way.
Edit: I also would like to rearrange some of the items in the menu bar and make some frequently-used options more accessible, so I really want to edit this file now!
yes, if you want to re-order or remove items, editing that file and saving it is the best way - be sure to use OverrideAudit to remind you to compare any changes made to the menus in future builds of ST
Oh, amazing! Thanks for the tip. This is going to be extremely useful for me. Also, wow, you tested the package! Cool.