vs code consistent keybindings for Mac and windows with settings sync - visual-studio-code

I use a windows computer for work and have painstakingly set up many keybindings for common tasks, as well as many other personalizations I really would like to have transferred to my personal computer, which is a Mac.
I recently found out about and set up Settings Sync, which is pretty awesome, but I can't seem to get my keybindings to work quite how I would like.
First, it doesn't seem that any of my keybindings transferred--when I open up the keyboard shortcuts on Mac and display User Keybindings, the list is empty, yet when I do this on Windows, all my keybindings are there.
To complicate matters, I sometimes use a Windows keyboard with my Mac. Without getting into too much detail, I'll explain what I'm trying to accomplish with a particular shortcut:
On windows machine, I use the right alt and ctrl keys to open up my integrated terminal with:
alt+ctrl+t
I'd like to keep this keybinding to work even when on my Mac because when I use my windows keyboard with it, I still have the alt and ctrl keys on the right side of the keyboard.
However, on my Mac without the windows keyboard, in place of the alt and ctrl keys I have the cmd and option keys, so in this instance I'd like cmd+option+t to trigger the integrated terminal.
So, is my solution to simply recreate all my windows shortcuts that use alt+ctrl with a corresponding cmd+opt version for Mac? And what about all the missing user keybindings that didn't seem to transfer with settings sync (logs show that they should've been transferred)? If anyone has any advice about how to properly set this up, I'd greatly appreciate it. Thanks.

It seems that Settings Sync synchronizes the user’s shortcuts by platform, which would prevent conflicts between Windows and Mac. So to achieve what you’re looking for, it should be enough to properly configure your shortcuts as you want them to be now in Mac.
There shouldn’t be any conflict when you move to your Windows machine, each platform should keep its own configuration :)

Related

Totally transfer VSCode settings from one Mac to another

VSCode is wonderful but it takes a little careful setting-up.
There are numerous secret tips to follow, example
How to turn off "matching" highlighting in VS Code?
https://stackoverflow.com/a/59225110/294884
and so on.
If I have everything "just right" on Mac A, how can I perfectly transfer all the detail to Macs B, C, and D?
For that matter, how could one transfer their VSCode settings to a Windows machine from a Mac?
Note, now includes in VSCode from 2021...
Another amazing new feature added to VSCode:
https://code.visualstudio.com/docs/editor/settings-sync
I use the vscode extension Setting Sync. It uses github to sync everything up, it should be platform agnostic and works like a charm.

M-x not working for 2 days in Emacs

I do use Emacs for years, and in particular the Cygwin Emacs version (under Windows 10) for months.
Since 2 days, M-x combo key is not working anymore, well ESC x but I don't want to be forced to use Emacs à la Vi ;-)
First, I thought that the keyboard of my laptop could have a trouble, but the same effect is observed with an external keyboard connected by USB.
Second, I though it could be due to some changes I did in my own Emacs init file, or changes inherited from MELPA. To test that, I came back into time with Git, but that wasn't it: problem still observed; to test for MELPA packages, I used a minimal Emacs (emacs -q) and, once again, the problem still persists.
(And ESC x displays that M-x, translated from <escape> x, runs the command
execute-extended-command -- which is expected.)
Finally, what's weird, is that the key x alone is working, and so does C-x. On the other hand, M (meta) is working: M-c, M-w do work like expected.
So, to sum up, only the particular combination M-x is not working, and I really have no idea why.
Any smart test I could do to debug this (on Win 10)?
To sum up the answer in the comments:
If your key combination does not do what you expect - use C-h k to find out if it's a wrong mapping inside emacs, or something is grabbing this combination before emacs has a chance. If C-h k doesn't do anything in response to Alt-X - then you can be certain emacs doesn't see it at all.
If you want to confirm a key combination has been hijacked try to use some other application with it. Alt-X isn't used by regular Windows applications, but if you happen to have anything else that can have customized key bindings then try to map Alt-X to anything inside it. Eclipse, IntelliJ, Visual Studio, gvim. But seeing what happens with C-h k is a sufficient proof.
To find out what is stealing your Alt-X check what was installed or reconfigured lately. Disable startup programs if you can't recall. Additionally, from my experience a couple of nasty offenders: Intel video driver, and Windows language bar. (Not with Alt-X, with other key combinations.) Windows language bar is especially annoying when it steals C-S-) which I use for slurp.
Last thing. If you are running in a VM, your key combination may be stolen at either host or guest level (or both, as I've seen with the language bar.) So you may need to look around in both places.
I encountered the same problem. But I found that the problem was come up with the conflict of hotkey. On my Win10 OS, M-w is conflicted with the Tencent QQ software. So when I closed the QQ or changed the QQ's hotkey, the Emacs worked well.
I don't know why, but the problem is with Growl for windows v2.0.8. Close it and emacs will run normally.
Anyways, any new program setup could create conflicts. Stop all new (since the bug) process and check it.
(I don't want to change the keys configuration)

emacs key commands different in Windows and Linux?

I'm trying to finally bite the bullet and learn emacs. Mainly so that I am comfortable editing files on a server through ssh. So I installed emacs on Windows in order practice. Right away I noticed this difference: when I press ctrl - rightarrow on windows, the cursor jumps to the next work. When I do this in emacs on the server, the cursor moves to the next character only. I believe the latter is the "normal" behaviour (M - rightarrow will jump to the next word in both versions). How can I get my windows emacs to behave exactly like the one on the server? I don't want to learn habits on windows that won't carry over to the server.
You mention server, I assume you are connecting to it over SSH? It is very likely that something over the route steals modifiers off your C-arrow movements.
If this is the case, try to edit your files locally. Here's how: How can I use Emacs tramp to ssh to a remote host and edit a file as another user on an ad-hoc basis?

Remap meta key to other key on the keyboard

I have a programmable mechanical keyboard and can place any key anywhere.
At our company we recently switched to windows PCs and so that broke my emacs configuration because of the dreaded windows key which I tried to map to Meta but never got it to work.
Basically I use tigervnc to run vnc session that runs on linux.
Running emacs under linux in the VNC on a windows machine is a pain.
Every time I click the windows button to act as a meta the windows menu popup.
Anyways, I wonder if I can map Meta key to say "insert key", and the program the keyboard to have "insert" in place of "windows key" and vice versa.
I am also using ALT for other configurations so I don't want to map meta to ALT since I sometimes use all three combinations "Ctrl+ALT+Meta"+F-keys.
Is there a way to do so?
It would help if you can tell us which keyboard you own.
If it supports QMK firmware, you can just create two layers of keymaps for regular Windows usage and for VNC.
I think you will need to peruse Keymaps for Translating Sequences of Events (function-key-map et al).

Is there a Keyboard Shortcut in Chrome Developer Tools to switch Source File?

Checking the list
https://developers.google.com/chrome-developer-tools/docs/shortcuts?csw=1#sources-panel
I cannot find any way to navigate through the source files inside Chrome Dev Tools. Anyone with an idea how to switch source files without using the mouse?
Ctrl-P / Ctrl-O shortcut will bring up a Goto-Source dialog.
To my knowledge there is no keyboard shortcut for doing this. I would know since I have recently updated that page multiple times to add or change some shortcuts.
I'm pretty sure there's no command you can configure either.
I'd suggest opening a ticket for it if you would like to see this added.