- Visual studio code mac shortcuts how to#
- Visual studio code mac shortcuts code#
- Visual studio code mac shortcuts windows#
I've included two extra shortcuts which are very similar to the Start/end of word shortcut.
Visual studio code mac shortcuts code#
VS Code default: OPTION + left/right arrow key.Note:_ underscores are considered part of a word while hyphens are not._ With the start/end of word shortcut (sometimes called Cursor Word Start/End), you can quickly navigate one word at a time left/right on a line without holding arrow keys or having to use your mouse.
![visual studio code mac shortcuts visual studio code mac shortcuts](https://zellwk.com/images/2020/vscode-keybindings-2/new-terminal.gif)
How many times do you find yourself holding down left arrow while the cursor slowly moves towards the middle of the line so you can fix a typo or replace a word? I also prefer the difference of instead of using SHIFT as a modifier. I prefer my keybinding because it is the default in Eclipse, which is where I learned this shortcut.
![visual studio code mac shortcuts visual studio code mac shortcuts](https://zellwk.com/images/2020/vscode-keybindings-2/move-panel.png)
Think of it as an "undo/redo" for your cursor. This shortcut will move your cursor to where it was before/after, even across files. Now you want to go back to the previous file and re-read a line, but you can't remember which file it was or what line number. Let's imagine you have 5 files open and you're trying to follow the code flow between files. I prefer my keybinding because "Line" starts with "L" so it's easier for me to remember CMD + L than CTRL + G. This is really helpful when you are dealing with larger files and need to find a specific line (maybe from the result of a stack trace while debugging). #Go to lineĪ lot of people don't realize almost all text editors have a Go To Line utility built in. I stick with the VS Code default for this one because it's what I started out using. VS Code default: OPTION + up/down arrow key.How often do you find yourself copy/pasting lines to move them up or down throughout a line? With this keyboard shortcut, you can simply use your arrow keys to move lines around. Ctrl+P : Displays the search bar to search for files. As an example, the preview of this post would look like this in preview: Note: Typically, images would render in the preview. To open side by side, use the keyboard shortcut Ctrl+K V. I prefer my keybinding over the VS Code default because I can press it with just my left hand. To do this in Visual Studio Code, there are two options: To open a separate preview window, use the keyboard shortcut Ctrl+Shift+V. This shortcut also works on multiple lines, if you have multiple highlighted. This works, however a shortcut can make it much faster. #Delete line(s)īefore you utilize a delete line shortcut, you find yourself highlighting an entire line and then pressing backspace or delete. Preface: These shortcuts may not apply to some editors such as Vim, etc. Windows: Ctrl + Shift + P, then type keyboard shortcuts. There are three ways: Method 1: From the menu Mac: Code-> Preferences-> Keyboard Shortcuts Windows: File-> Preferences-> Keyboard Shortcuts Method 2: Use show all Commands Mac: Command + Shift + P, then type keyboard shortcuts.
Visual studio code mac shortcuts windows#
The keyboard shortcuts I list in this article are OSX specific, but they should transfer over to Windows if you replace: First, open up the keyboard settings preferences. I use VS Code as my IDE, but these shortcuts can be applied to any editor.
![visual studio code mac shortcuts visual studio code mac shortcuts](https://www.ngdevelop.tech/wp-content/uploads/2018/06/Copy-Code-Block.gif)
![visual studio code mac shortcuts visual studio code mac shortcuts](https://blog.finxter.com/wp-content/uploads/2021/02/image-130-1024x792.png)
Here are 5 keyboard shortcuts you can implement in any IDE to help navigate your code faster. I mostly do it because “:w” is still muscle memory for saving even after all these years.Highlight characters as you use start/end of word/line Personally, I am one is those strange guys who uses the Vim extension in VSCode so I’m sure there are plenty more key combos I might use but don’t because I use the Vim approach instead. Ctrl-shift-t will reopen the last closed tab in Chrome. For example ctrl-space also works in Eclipse, Visual Studio, InteliJ, etc. It should be noted that almost every one if these Key combos work almost universally. To navigate by words without selecting, omit the shift. If it understands what type of file you have open it will use the right comment characters (e.g # for python)Ĭtrl-space: open the auto complete dialogĬtrl-tab to indent multiple highlighted linesĬtrl-shift-tab de-indent multiple selected linesĬtrl-shift-f: search all files in the workspaceĬtrl-shift-t: reopen the most recently closed editorĬtrl-shift-arrows: select by words instead of just characters. I’m not at a place where I can test these but from memory:Ĭtrl-/ to comment, ctrl-shift-t/ to uncomment.
Visual studio code mac shortcuts how to#
I’m not sure how to do it in Linux it Chromebooks. On Windows you can type alt and the character coffee but I find it easier to use the character map. Search for "union"v and you should find the symbol for MQTT. If you enter ctrl-cmd-space it will open a dialog where you can find emoji and symbols. You can type that combo in any other on the Mac and get the degree symbol. That’s an OS X thing and not implemented by VSCode.