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:
- Is there a keyboard shortcut for navigating between these files sequentially? (the equivalent to cmd + option + left (or +right) in Sublime Text?)
- Is there a keyboard shortcut for closing a file and removing it from the working files list? cmd + w just closes its editor window.
- If these shortcuts don't exist by default, can I create them?
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.
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).