Giter VIP home page Giter VIP logo

vscode-vs-keybindings's Introduction

Visual Studio Keymap for Visual Studio Code

This extension ports popular Visual Studio keyboard shortcuts to Visual Studio Code. After installing the extension and restarting VS Code your favorite keyboard shortcuts from Visual Studio are now available.

What keyboard shortcuts are included?

Command macOS Windows Linux
workbench.action.tasks.build ctrl+shift+b ctrl+shift+b ctrl+shift+b
workbench.debug.viewlet.action.addFunctionBreakpointAction ctrl+b ctrl+b ctrl+b
workbench.debug.viewlet.action.removeAllBreakpoints ctrl+shift+f9 ctrl+shift+f9 ctrl+shift+f9
workbench.action.debug.restart ctrl+shift+f5 ctrl+shift+f5 ctrl+shift+f5
editor.debug.action.runToCursor ctrl+f10 ctrl+f10 ctrl+f10
editor.action.formatDocument ctrl+k ctrl+d ctrl+k ctrl+d ctrl+k ctrl+d
insertSnippet ctrl+k ctrl+x ctrl+k ctrl+x ctrl+k ctrl+x
editor.action.deleteLines ctrl+shift+l ctrl+shift+l ctrl+shift+l
editor.action.clipboardCutAction ctrl+l ctrl+l ctrl+l
workbench.action.files.openFileFolder ctrl+shift+g ctrl+shift+g ctrl+shift+g
editor.action.referenceSearch.trigger alt+f12 alt+f12 alt+f12
redo ctrl+y ctrl+y ctrl+y
editor.action.smartSelect.expand ctrl+w ctrl+w ctrl+w
editor.action.addSelectionToNextFindMatch shift+alt+. shift+alt+. shift+alt+.
editor.action.triggerSuggest ctrl+alt+space ctrl+alt+space ctrl+alt+space
undo alt+space alt+space alt+space
deleteWordEndRight ctrl+delete ctrl+delete ctrl+delete
deleteWordStartLeft ctrl+backspace ctrl+backspace ctrl+backspace
workbench.action.files.saveAll ctrl+shift+s ctrl+shift+s ctrl+shift+s
workbench.action.output.toggleOutput ctrl+alt+o ctrl+alt+o ctrl+alt+o
workbench.view.explorer ctrl+alt+l ctrl+alt+l ctrl+alt+l
editor.action.rename ctrl+r ctrl+r ctrl+r ctrl+r ctrl+r ctrl+r
editor.action.toggleRenderWhitespace ctrl+r ctrl+w ctrl+r ctrl+w ctrl+r ctrl+w
editor.foldAll ctrl+k ctrl+m ctrl+k ctrl+m ctrl+k ctrl+m
workbench.action.navigateBack ctrl+- ctrl+- ctrl+-
workbench.action.navigateForward ctrl+shift+- ctrl+shift+- ctrl+shift+-
workbench.action.quickOpen ctrl+, ctrl+, ctrl+,
cursorColumnSelectDown shift+alt+down shift+alt+down shift+alt+down
cursorColumnSelectLeft shift+alt+left shift+alt+left shift+alt+left
cursorColumnSelectPageDown shift+alt+pagedown shift+alt+pagedown shift+alt+pagedown
cursorColumnSelectPageUp shift+alt+pageup shift+alt+pageup shift+alt+pageup
cursorColumnSelectRight shift+alt+right shift+alt+right shift+alt+right
cursorColumnSelectUp shift+alt+up shift+alt+up shift+alt+up
workbench.action.toggleZenMode shift+alt+enter shift+alt+enter shift+alt+enter
workbench.action.closeActiveEditor ctrl+f4 ctrl+f4 ctrl+f4
editor.action.copyLinesDownAction ctrl+d ctrl+d ctrl+d
cursorWordStartRight ctrl+right ctrl+right ctrl+right
cursorWordStartRightSelect ctrl+shift+right ctrl+shift+right ctrl+shift+right
editor.action.insertLineBefore ctrl+enter ctrl+enter ctrl+enter
editor.action.insertLineAfter shift+enter shift+enter shift+enter
editor.action.wordHighlight.next ctrl+shift+down ctrl+shift+down ctrl+shift+down
editor.action.wordHighlight.prev ctrl+shift+up ctrl+shift+up ctrl+shift+up
editor.action.replaceAll alt+a alt+a alt+a
search.action.replaceAll alt+a alt+a alt+a
search.action.replaceAllInFile alt+a alt+a alt+a
search.action.replaceAllInFolder alt+a alt+a alt+a
editor.action.replaceOne alt+r alt+r alt+r
search.action.replace alt+r alt+r alt+r
toggleSearchRegex alt+e alt+e alt+e
toggleFindRegex alt+e alt+e alt+e
deleteWordStartRight ctrl+delete ctrl+delete ctrl+delete

The full list of keyboard shortcuts including the when clause (e.g. while debugging) can be found in the extension's contribution list.

Why don't all the keyboard shortcuts work?

VS Code does not implement all of the commands available in Visual Studio. If you would like to see a feature in VS Code that is in Visual Studio, please open an issue on GitHub.

How do I contribute a keyboard shortcut?

We may have missed a keyboard shortcut. If we did please help us out! It is very easy to make a PR.

  1. Head over to our GitHub repository.
  2. Open package.json.
  3. Add a JSON object to contributes.keybindings as seen below.
  4. Open a pull request.
{
    "mac": "<keyboard shortcut for mac>",
    "linux": "<keyboard shortcut for linux",
    "win": "<keyboard shortcut for windows",
    "key": "<default keyboard shortcut>",
    "command": "<name of the command in VS Code"
}

You can read more about how to contribute keybindings in extensions in the official documentation.

vscode-vs-keybindings's People

Contributors

auchenberg avatar chrisdias avatar connorads avatar cpmcgrath avatar gcrev93 avatar lszomoru avatar microsoftopensource avatar msftgits avatar neoskunk avatar raky291 avatar rebornix avatar rik-smeets avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

vscode-vs-keybindings's Issues

user keybindings not working after update 1.75.0

After the recent update

Version: 1.75.0
Commit: e2816fe719a4026ffa1ee0189dc89bdfdbafb164
Date: 2023-02-01T15:29:17.766Z
Electron: 19.1.9
Chromium: 102.0.5005.194
Node.js: 16.14.2
V8: 10.2.154.23-electron.0
OS: Linux x64 5.4.0-91-lowlatency
Sandboxed: No

certain user keybindings are not working anymore. This goes along with other issues I've noticed, like keybindings beeing displayed, either wrong or very confusingly in the keybindings interface.

Tested with all extension disabled:
Yes

How to recreate:
Since I had never any troubles with my keybindings (and snippets, which also don't work anymore after the update) and now after the update to 1.75.0 many things are broken, I suppose to recreate the bug just update to 1.75.0, idealy on Linux Ubuntu 20.04 LTS. I don't know what to do, other than that.

Screenshot of the debug output:
keybindingNotWorking

Maybe or maybe not directly related to the issue, but as a side note that might help tracking down the bug, here a screenshot of the keybindings beeing incorrectly displayed in the UI. And to make it clear, this is not an accidental overlap or double assignment. I previously cleared the keybindings for these actions completely and the assigned them in the UI using the key combination "ctrl+#".
keybindingAssignment

keybindingsDisplayInUI

How to set up custom shurtcut for focus custom explorer?

I use vscode-solution-explorer and I wanna use custom shortcut to focus custom solution explorer. This is a solution explorer like in Visual Studio. I apologize for offtop maybe, but can you tell me what to do to set up shortcut for this extension?

Is there a way to port VSCode's keyboard shortcuts to Visual Studio

I have used VSCode for a time and new to Visual Studio. VS shortcuts is very difference to VSCode. When I find if there are a way to use VSCode's shortcuts in Visual Studio I find this repo. I wonder if there are a way to port VSCode's keyboard shortcuts to Visual Studio? Thanks!

[Visual Studio Keymap] Ctrl+Backspace/Ctrl+Delete keys within commit message are intercepted by extension in main editor

From @rebornix on November 16, 2017 22:59

From @prenetic on August 16, 2017 17:56

  • VSCode Version: 1.15.0
  • OS Version: Windows 10 version 1703 (build 15053.540)
  • Visual Studio Keymap Version: 0.1.7

Steps to Reproduce:

  1. Install Visual Studio Keymap extension and reload.
  2. Open an editor with any non-empty text file.
  3. Place the cursor somewhere in the middle of the text file (remember where) to observe behavior.
  4. Select the Source Control tab.
  5. Begin typing a commit message (does not matter if file belongs to a repository or not), and then press Ctrl+Backspace to delete a word to the left of the cursor within the commit message.
  6. Observe that the open file is now dirty and the word to the left of where the cursor in the main editor was placed in step 2 is now missing.
  7. In the same commit message, press Ctrl+Delete to delete a word to the right of the cursor within the commit message.
  8. Observe that the word to the right of the cursor in the main editor is now missing.

Reproduces without extensions: No

Copied from original issue: microsoft/vscode#32651

Copied from original issue: rebornix/vscode-vs-keybindings#24

Question: does the inverse of this extension exist?

I know this is likely not the right place for this question, but I'm not sure where the right place would be.

From my understanding this extension brings Visual Studio keybindings to Visual Studio Code. I would like to do the opposite: I'm familiar with VSCode keybindings and would like to use them in Visual Studio (which I very rarely open anymore). Is anyone aware of a plugin/extension/way of accomplishing that? If not, what would it take to make something like that?

Thanks!

Inverse Package?

This project should have a link to a package that does the inverse: VSCode binding in Visual Studio. This package is the natural search result for either search and either project should link to each other.

If the inverse package does not exist, it should be created.

Exhaustive search for keyboard conflicts

From @tohagan on October 6, 2017 0:44

  • VSCode Version: Code 1.16.1 (27492b6bf3acb0775d82d2f87b25a93490673c6d, 2017-09-14T16:38:23.027Z)
  • OS Version: Windows_NT x64 6.1.7601
  • Extensions:
Extension Author (truncated) Version
html-snippets abu 0.1.0
vscode-color ans 0.4.5
npm-intellisense chr 1.3.0
vscode-simpler-icons dav 1.4.0
vscode-eslint dba 1.3.2
vscode-instant-markdown dba 1.3.0
tslint eg2 1.0.9
vscode-npm-script eg2 0.2.1
auto-rename-tag for 0.0.14
icon-fonts idl 1.8.1
angular2-switcher inf 0.1.4
docthis joe 0.4.8
Angular2 joh 2.7.0
vscode-todo Mat 0.8.0
Angular-BeastCode Mik 5.0.4
csharp ms- 1.12.1
vs-keybindings ms- 0.1.7
live-server-preview neg 0.0.4
language-vscode-javascript-angular2 nwa 0.0.11
ionic2-snippets oud 1.0.0
vscode-docker Pet 0.0.18
simontest Sim 0.17.2
vscode-fileutils sle 2.7.0
ionic2 Tha 2.4.0
cordova-tools vsm 1.2.12

After hitting another keyboard shortcut conflict I thought I'd do an exhaustive search for more so I've prepared a spreadsheet that highlights duplicate keyboard mapping to assist in the hunt. Below is an attached Excel sheet that I produced using the steps above to help identify keyboard conflicts and the procedure I used to create this list.

I also found some cases where an identical mapping rule was duplicated which might cause problems with your code maintenance in the future.

Here the conflict that trigged my search:

  • "ctrl+shift+g" conflict: "Show SCM" and "workbench.action.files.openFileFolder"

Steps to Reproduce:

  1. "Open Keybaord Shortcuts"
  2. Edit "keybinding.json"
  3. Select ALL (Ctrl-A) and Copy (Ctrl-C)
  4. Visit https://konklone.io/json/ to convert JSON to CSV
    • Remove header comment (1 line) before "[" and and all trailing comments after last "]"
  5. Download keyboard shortcuts as a CSV file.
  6. Open in Excel and sort by 1st column ("key")
  7. Use conditional formatting to highlight duplicate key mappings (1st column)

Inspect to check for duplicate key mappings that may conflict. I fully understand that you'd need to check the "when" condition. Since we sorted the rules, this sheet does not record the original rule order which may also affect their interpretation. I'm not up on this but I'm assuming you are!

Happy conflict hunting 👍

vscode-keyboard-conflict.xlsx

Copied from original issue: rebornix/vscode-vs-keybindings#20

VS keybindings extension overrides word navigation with column selection on OSX

From @rebornix on November 16, 2017 23:6

From @adison on September 30, 2017 6:57

  • VSCode Version: Code 1.16.1 (27492b6bf3acb0775d82d2f87b25a93490673c6d, 2017-09-14T16:24:39.530Z)
  • OS Version: Darwin x64 16.7.0
  • Extensions:
Extension Author (truncated) Version
markdown-toc Ala 1.5.6
vsc-rustfmt Con 0.1.0
swift Kas 0.0.3
githistory don 0.2.3
python don 0.7.0
unicode-normalizer esp 0.0.1
vscode-auto-open-markdown-preview hnw 0.0.4
Lua key 0.0.9
Go luk 0.6.65
MagicPython mag 1.0.12
prettify-json moh 0.0.3
cpptools ms- 0.13.0
csharp ms- 1.12.1
vs-keybindings ms- 0.1.7
debugger-for-chrome msj 3.3.1
Ruby reb 0.15.0
RustyCode sav 0.19.1
guides spy 0.8.4
code-spell-checker str 1.4.0
vscode-react-native vsm 0.4.2
markdown-pdf yza 0.1.7

Steps to Reproduce:

  1. use alt + arrow key(left/right) to jump word by word
  2. use shift to select anything(word or letter) and try alt + arrow(right/left) again, it can only move letter by letter.

Reproduces without extensions: Yes

Without this feature, it's hard to delete multiple words efficiently.

Copied from original issue: microsoft/vscode#35412

Copied from original issue: rebornix/vscode-vs-keybindings#25

Ctrl+Delete deletes whitespace plus token in VS Keymap

From @rebornix on August 11, 2017 21:51

From @ItWorksOnMyMachine on June 24, 2017 18:10

  • VSCode Version: Code 1.13.1 (379d2efb5539b09112c793d3d9a413017d736f89, 2017-06-14T18:21:47.485Z)
  • OS Version: Windows_NT ia32 10.0.15063
  • Extensions:
Extension Author Version
aurelia AureliaEffect 0.3.4
vscode-nuget-package-manager jmrog 1.1.3
csharp ms-vscode 1.10.0
vs-keybindings ms-vscode 0.1.3

I pasted method into the editor but the formatting was off and there were too many spaces before the method name. I used Ctrl+Home to return to the beginning of the line and the pressed Ctrl+Delete with the intention of deleting all whitespace and then pressing my tab key to indent. Unfortunately, the Ctrl+Delete deleted all the whitespace and the method name. I would expect it to delete all whitespace up to, but not including, the method name.
Steps to Reproduce:

Copied from original issue: microsoft/vscode#29385

Copied from original issue: rebornix/vscode-vs-keybindings#18

VS code shortcuts in Visual Studio

I was trying to find a way that makes vs code shortcuts work in visual studio but I got nothing, even when I chose it from the tools > Environment > Keybindings it doesn't work.
Is there a way to do it?

Shift+Tab behaviour

From @cpmcgrath on January 31, 2018 23:48

In Visual Studio Code. Shift Tab "Outdents" the selected line. In Visual Studio it "Untabs" (removes tab/x spaces from current caret position)
I couldn't see a command to change this to, but would love it if someone could work it out!

Copied from original issue: rebornix/vscode-vs-keybindings#29

Where is the straight forward, direct link to all the keyboard shortcuts of this extension?

From @fmorriso on December 17, 2017 14:23

"You can see all the keyboard shortcuts in the extension's contribution list."

What does this mean? I cannot find it.

Please provide a straight-forward, easy-to-find, direct link on the main page of this extension to a list (such as markdown or pdf) of the replacement keyboard shortcuts this extension supplies.

Copied from original issue: rebornix/vscode-vs-keybindings#26

Keyboard shortcuts from extension not applied

  • VS Code Version: 1.55.0 - insider
  • OS Version: Window 10

Steps to Reproduce:

  1. install vscode insider
  2. install ms-vscode.vs-keybindings
  3. open keyboard shortcut preferences:
    image
  4. see the difference between the shortcut in the menu and the setting for "Save all" command
  5. try to save all with menu defined shortcut works
  6. try to save all with preferences defined shortcut doesn't works

Does this issue occur when all extensions are disabled?: Not applicable

Shift-option-arrow should select words on MacOS

Repro steps:

  1. use a macbook
  2. open some source code in Visual Studio Code (I'm using typescript, in case the type of code matters)
  3. put the cursor on the left side of a word
  4. press option-shift-right-arrow

Expected result: the entire word is selected.

Actual result: only one character is selected.

Word-by-word NAVIGATION works in VSC using option-arrow.

Word-by-word SELECTION works in this text-entry box (the UI that I'm using to submit this feedback right now in VSC) using option-shift-arrow.

The same hotkey also performs word selection in every other Mac app.

The same hotkey does NOT perform word selection in VSC's source-code editing window.

Undo != Alt+Space

Is Alt-Space commonly used for Undo? Or have I missed something? Isn't Ctrl+Z the defacto keybinding for Undo? The only other binding I know of is to shake the device. Seems like a poor choice for this extension.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.