Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to transfer VSCode key mapping on windows to ubuntu

I use vs-code as my go-to editor on Windows. Recently I've installed on Ubuntu and now the default key mapping is different.

Is there any way I can set the key mapping on Ubuntu similar to what they were for Windows, or at least a subset of it?

like image 872
Vivek Kumar Avatar asked Oct 09 '18 17:10

Vivek Kumar


People also ask

How do I sync VS Code settings?

You can turn on Settings Sync using the Turn On Settings Sync... entry in the Manage gear menu at the bottom of the Activity Bar. You will be asked to sign in and what preferences you would like to sync; currently Settings, Keyboard Shortcuts, Extensions, User Snippets, and UI State are supported.

How do I export VS Code settings?

Open control panel ctrl+shift+p and select an action: Import Setting. Export Setting.


1 Answers

I have created an extension that provides the default Windows keybindings. It is on the VSCode extension marketplace and called Windows Default Keybindngs.

I have tested it on Linux with VSCode 1.38.0 and 1.36.1.

The new bindings take precedence where there is a conflict, but existing, non-conflicting bindings are still available.

Basically all I did was use HolyBlackCat's suggestion to run "Preferences: Open Default Keyboard Shortcuts (JSON)" and stuff the result into the appropriate place in package.json. (Plus document it and figure out how to publish it!)

Update 2020-06-05: In response to a question in a comment, I did a search and found LinuxKeybindings, an extension that provides the default Linux bindings. I have not tried it myself but this could be useful for those wanting the Linux bindings instead of Windows bindings.

like image 58
Scott McPeak Avatar answered Sep 18 '22 18:09

Scott McPeak