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.

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.

What keyboard shortcuts are included?

Command Key
cursorColumnSelectDown shift+alt+down
cursorColumnSelectLeft shift+alt+left
cursorColumnSelectPageDown shift+alt+pagedown
cursorColumnSelectPageUp shift+alt+pageup
cursorColumnSelectRight shift+alt+right
cursorColumnSelectUp shift+alt+up
cursorWordStartRight ctrl+right
cursorWordStartRightSelect ctrl+shift+right
deleteWordEndRight ctrl+delete
deleteWordStartLeft ctrl+backspace
editor.action.addSelectionToNextFindMatch ctrl+w
editor.action.clipboardCutAction ctrl+l
editor.action.copyLinesDownAction ctrl+d
editor.action.deleteLines ctrl+shift+l
editor.action.formatDocument ctrl+kctrl+d
editor.action.insertLineAfter shift+enter
editor.action.insertLineBefore ctrl+enter
editor.action.referenceSearch.trigger alt+f12
editor.action.rename ctrl+rctrl+r
editor.action.toggleRenderWhitespace ctrl+rctrl+w
editor.action.triggerSuggest ctrl+alt+space
editor.debug.action.runToCursor ctrl+f10
editor.foldAll ctrl+kctrl+m
insertSnippet ctrl+kctrl+x
redo ctrl+y
undo alt+space
workbench.action.closeActiveEditor ctrl+f4
workbench.action.debug.restart ctrl+shift+f5
workbench.action.files.openFileFolder ctrl+shift+g
workbench.action.files.saveAll ctrl+shift+s
workbench.action.navigateBack ctrl+-
workbench.action.navigateForward ctrl+shift+-
workbench.action.output.toggleOutput ctrl+alt+o
workbench.action.quickOpen ctrl+
workbench.action.tasks.build ctrl+shift+b
workbench.action.toggleZenMode shift+alt+enter
workbench.debug.viewlet.action.addFunctionBreakpointAction ctrl+b
workbench.debug.viewlet.action.removeAllBreakpoints ctrl+shift+f9
workbench.view.explorer ctrl+alt+l

vscode-vs-keybindings's People

Contributors

artemnih avatar cpmcgrath avatar gerbendekker avatar jflepp avatar kirkone avatar nhamlin avatar rebornix avatar rubberduck203 avatar timothymothra avatar tmazot007 avatar wade-ryan 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  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

vscode-vs-keybindings's Issues

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

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

[Request] Publish extension on open-vsx.org

Hi there!

I'm reaching out to you because we currently have your extension manually added to our extension gallery at Coder for code-server, and we're currently working on a migration to open-vsx, which is also used by other community VSCode forks (including, but not limited to Arch Linux's Code-OSS builds and VSCodium).

We (and other open source VSCode forks) cannot use Microsoft's extension gallery, as MS' terms of service allows only the proprietary MS products to interact with the official gallery.

We'd really appreciate it if you can add your extension to open-vsx! A simple guide on publishing extensions to Open-VSX is available here.

Exhaustive search for keyboard conflicts

  • 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

ctrl+up and ctrl+down

See microsoft/vscode#47487 which claims that in Visual Studio the cursor is kept visible when using ctrl+up and ctrl+down. This can be achieved via the keybindings:

    {
        "key": "ctrl+down",
        "command": "editorScroll",
        "args": {
            "to": "down",
            "by": "line",
            "revealCursor": true
        }
    },
    {
        "key": "ctrl+up",
        "command": "editorScroll",
        "args": {
            "to": "up",
            "by": "line",
            "revealCursor": true
        }
    }

Can you also provide invert of this mapping?

Can you also provide invert of this mapping?
I'm looking for Visual Studio Code Keymap for Visual Studio.

Some of VS code shortcuts are great like Alt+ โ† / โ†’ Go back / forward.

I tried to install the Visual Studio Keymap but I don't think it worked.

I tried to install the Visual Studio Keymap expecting to get the same shortcuts as I'm used on Visual Studio 2015.

I don't know if I did something wrong but it's been really hard for me using the editor and learning all over again the shortcuts.

I now I can remap them but to remember them all is a pain in the neck.

If this extensions is not for that. Does anybody have already mapped the shortcuts to be similar to the ones from VS2015?

Thanks

Shift+Tab behaviour

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!

Modifier keys on macOS when Swap position

Hi
On Windows use Ctrl+C to copy, but on Mac, use command+C. If i set modifier keys in System preferences "Control to Command" and "Command to Control", Now The left bottom button + C is copy. Same usage habits as Windows.
But if I install Visual Studio Keymap, the shortcut of system and the shortcut of vs Code Meaning will not be the same, It can't be like using the shortcut keys on windows.
Is there a way to detect whether the modifier keys of the macOS system have been modified, or add an option to be selected by the user.
Thanks

Ctrl+backspace in "Quick open" does not work

  1. Have a file open in the editor where the cursor is not at the start of the document (e.g. a Typescript file)
  2. Open the "Quick open" (Ctrl+,)
  3. Type in some keyword to find a file (don't hit enter)
  4. Hit Ctrl+backspace to remove the keyword just entered
  5. See that instead of the keyword being removed, some content before the cursor in the editor was removed.

Ctrl+space is not deleteWordStartLeft

ctrl+space in VS is a shortcut to Intellisense, or as VSCode calls it, triggerSuggest. Why is this extension remapping it to deleteWordStartLeft?

Cannot type polish characters "รณ" (right alt+O) and "ล‚" (right alt+L)

After installing this extension I can't type polish characters "รณ" (right alt+O) and "ล‚" (right alt+L).
This is because of the new shortcuts:

package.json line 104:
{
"key": "ctrl+alt+o",
"command": "workbench.action.output.toggleOutput"
},
{
"key": "ctrl+alt+l",
"command": "workbench.view.explorer"
},

Smart Select Grow/Shrink not working

editor.action.smartSelect.grow is mapped to Shift + Alt + RightArrow.

However, this doesn't work. It is supposed to select the word on first use, then the line, then the code block and then keep selecting larger code blocks.

Suggestion: Ctrl + F4 to Close Window

I'm very used to this shortcut in Visual Studio. I've made the customization myself, but I would guess it would be nice to have it as a default for this extension.

Ctrl+Delete deletes whitespace plus token in VS Keymap

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

Override "Show Fixes" to be Alt + Enter

In Visual Studio, the "Quick Actions" shortcut is Alt+Enter.

In Visual Studio Code, the default key mapping for "Show Fixes", the equivalent function, is Ctrl+..

It would be good if Alt+Enter behaved the same way in VS Code and VS.

There appear to be two other mappings for Alt+Enter; "open breakpoints to the side" and "select all matches". I think these are not as important and can probably be removed (although I think the "when" condition is different as "Show Fixes" is when there is problemFocus).

tab key

hello, so in microsoft visual studio when i write in C lang, i was able to move to next things on the line with tab.
i dont know how to explain it right, but here if i press tab its doing tab space.
i have search for the key name and its: Edit.SelectNextControl
i dont have it in your keyboard option.
how i can change it to be Edit.SelectNextControl and not tab space?
thank

Shift-Alt-Down conflicts

Extracted from microsoft/vscode#29327 (comment)

From @tohagan


In VSCode 1.16.1 I found that there is a keyboard mapping conflict for Shift-Alt-Down:

  • Copy Line Down (wanted)
  • cursorColumnSelectDown (not wanted)

Further I found that ALL the cursorColumnSelect* functions have multple keyboard mappings are creating more keyboard shortcut conflicts.

Ctrl+L doesn't quite work the same

Hi, thanks for this extension. I note that Ctrl+L doesn't do quite the same thing as on Visual Studio. There, with nothing selected, it cuts the current line with cr-lf and moves the cursor to the start of the line, and with text selected it it acts like Ctrl+X. I only use it with no selection.

My understanding (drawing on this vscode feature request) is that one would need to define a new command in the extension to call other commands conditionally.

Anyone active here?

Hi,

I just wonder if there is anyone active maintaining this extension at the moment?
Can I offer some help?

I think this is a very valuable extension and there are many active users. So this should get some care.

I don't want to complain but liked to offer my help.

Greetings
KirK

VS keybindings extension overrides word navigation with column selection on OSX

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

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.