I use this command constantly and can't imagine not having it. Once you do it a few times it will become muscle memory and boost your productivity. Select the code that is currently commented-out and execute the shortcut. With fixing Issue #2106, it is now possible to also remove a cursor by using the same gesture on top of an existing selection. Windows: Ctrl + / Mac: Command + / You can also uncomment using the same command. For example, when the setting is ctrl/Cmd, multiple cursors can be added with Ctrl / Cmd + Click, and opening links or going to definition can be invoked with Alt + Click. The Go To Definition and Open Link gestures will also respect this setting and adapt such that they do not conflict. There's also a new menu item Use Ctrl + Click for Multi-Cursor in the Selection menu to quickly toggle this setting.
So, recent versions of VSCode let you toggle between Alt+LeftMouse and Ctrl+LeftMouse under the Selection menu, as detailed in another answer.Īlternately, you could change your OS key bindings using gsettings as mentioned in another answer.Īdd multiple cursors with Ctrl / Cmd + Click IntelliSense As you type in HTML, we offer suggestions via HTML IntelliSense. Ubuntu) assign window dragging to Alt+LeftMouse, which will conflict with VSCode. No matter which profile you chose, you can identify the shortcut for a command by opening the Options dialog box, expanding the Environment node, and then choosing Keyboard. This makes it a lot easier to introduce multiple cursors This page lists the default command shortcuts for the General profile, which you might have chosen when you installed Visual Studio. select 300 lines and only 80 fit in the viewport). If the find widget is open, then the find widget settings (matchCase / matchWholeWord) will be used for determining the next occurrenceĬtrl+U ( Cmd+U on Mac) undoes the last cursor action, so if you added a cursor too many or made a mistake, you can press Ctrl+U ( Cmd+U on Mac) to go back to the previous cursor state.Īdding cursor up or down ( Ctrl+Alt+Up / Ctrl+Alt+Down) ( Cmd+Alt+Up / Cmd+Alt+Down on Mac) now reveals the last added cursor to make it easier to work with multiple cursors on more than 1 viewport height at a time (i.e. 1 day ago &0183 &32 With VS Code 1.81, the diff editor includes several new features and bug fixes, and the new diff algorithm is enabled by default. More multi-cursor features are now available in Visual Studio Code 0.2:Ĭtrl+D ( Cmd+D on Mac) selects next occurrence of word under cursor or of the current selectionĬtrl+K Ctrl+D moves last added cursor to next occurrence of word under cursor or of the current selection This works on Windows and Linux*, and it should work on Mac, too. Optional: Filter the list of commands by entering all or part of the name of the command, without spaces, in the Show commands containing box. Lastly, another option you may want is to add a custom keyboard shortcut to push changes.Press Alt and click. Expand Environment, and then choose Keyboard. If you are using the later versions of VS Code which has MRU list of command history, you can shorten it even further and just type gp, which is exactly what I've been using since SublimeGit in Sublime Text. My old habit to use F6 does not work either. (It's been ingrained in my fingers since the days of Sublime Text) Visual Studio Code has a hotkey combination to split the current window to 2 or 3 panes: 'key': 'ctrl + \', 'command': '' Unfortunately, I can't find a way to switch between such panes without the mouse. Otherwise, I frequently bring up the Command Palette with ⇧⌘P (Ctrl-Shift-P on Windows/Linux) and type gpus, which brings up Git: Push as the first option. when you're working on a project by yourself). This might or might not be what you want, but it's easy to click this when you know that there are no changes upstream (e.g. Ctrl + Alt + M - pretty JSON power by JSON Tools Alt + M - minify JSON power by JSON Tools Ctrl + Shift + I - pretty JSON included directly in VS Code, to use. both pull AND push, merging your branch with upstream if necessary). There is a button at the bottom left of the VS Code editor, which you can click to automatically sync your branch with that from remote (i.e.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |