I'm a web developer accustomed to Sublime Text. Often I'll have multiple files open and will navigate between them with cmd + option + left (or +right).
I'd love to have something as close to this functionality as possible in Visual Studio Code. From what I've read, in Visual Studio Code it sounds like instead of having multiple documents open in tabs across the top, you're supposed to use the "Working Files" list in the sidebar on the left. A few questions:
I did just discover Ctrl + - and Ctrl + shift + - (ref), which navigate between "edit locations." This is handy, but sometimes it jumps around between different locations in the same file (depending on where you've been editing). Also I would love an option that moved through files sequentially, i.e not based on most recently viewed, but rather top-to-bottom according to how they are listed in the Working Files list.
Hold Ctrl and press Tab to view a list of all files open in an editor group. To open one of these files, use Tab again to pick the file you want to navigate to, then release Ctrl to open it. Alternatively, you can use Ctrl+Alt+- and Ctrl+Shift+- to navigate between files and edit locations.
To navigate directly to a procedure or other member of a class, choose it in the right drop-down. To shift focus from the code window to the navigation bar, press the shortcut key combination Ctrl+F2. To shift focus from box to box on the navigation bar, press the Tab key.
To launch the Define Keybinding widget, press Ctrl+K Ctrl+K. The widget listens for key presses and renders the serialized JSON representation in the text box and below it, the keys that VS Code has detected under your current keyboard layout.
I like the idea of having commands for closing a working file or closing all working files and I can look into adding those for the next update.
As for navigation between working files: We have a very powerful tool for navigation called Navigate History. By default it is assigned to Ctrl + Tab and you can leave the Ctrl key pressed and click Tab to cycle through the list of files, similar how you can switch between windows on the OS.
Navigate history is not identical to what you are asking for because it also contains files that you opened that are not in working files. Can you give it a try and report back if it solves the navigation problem for you?
We feel that this is a more natural way of navigating, because you don't have to worry about the order of working files. Instead you navigate across the list of most recently used files.
In our team we are so used to Navigate history that we cannot live without it anymore. Very often we would press Ctrl + Tab one or two times without even looking at the list that opens because we know that the file we want was either one or two history entries away.
Update
With the release of Visual Studio Code 0.5.0 there are now keyboard shortcuts to navigate back and forward in the list of working files. The shortcut is CMD + K + ↑ and CMD + K + ↓ (on Windows use the Ctrl key).
Ctrl + Page Up
Ctrl + Page Down
would be the best answer for navigating sequential tabs.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With