MATLAB-extension-for-vscode icon indicating copy to clipboard operation
MATLAB-extension-for-vscode copied to clipboard

Change keyboard shortcuts to emacs mode

Open TemuG opened this issue 10 months ago • 4 comments

I am used to having emacs keybindings in matlab running in windows (e.g, ctrl-a goes to start of line, ctrl-e to end of line, ...). Using the matlab-vscode extension, I have the default keymappings (ctrl-a selects all). In the normal Matlab window, I can change this in the "keyboard shortcuts preferences" (e-macs default set with a couple of tweaks).

It would be nice to be able to change the keymap, e.g., by manually reading an xml file. I have tried changing it from the matlab terminal, using an undocumented feature: com.mathworks.services.Prefs.setStringPref('CurrentKeyBindingSet', 'Emacs') But that didn't work.

What would be cool is to start the matlab terminal in a cmder terminal (https://cmder.app/), which has these keybindings.

TemuG avatar Apr 12 '24 11:04 TemuG

Thanks for the feedback! This is something we can consider including in a future release.

philipb314 avatar Apr 12 '24 13:04 philipb314

Hi @TemuG, To clarify - is this feedback focused on the opened files in VS Code, or the MATLAB terminal in VS Code?

If this is about the opened files, do you want emacs keybindings to apply to only MATLAB files, or to all files? For example, do you want Ctrl + A to go to the start of a line in a .m file, but to select all in a .py file?

dklilley avatar Apr 12 '24 14:04 dklilley

Hi @dklilley ,

I would like this behaviour in the MATLAB terminal. I used the term emacs keybindings, because that is what it is called in the matlab preferences. bash behaviour is probably a less confusing name.

Temu

TemuG avatar Apr 12 '24 14:04 TemuG

Thanks for the clarification!

dklilley avatar Apr 12 '24 14:04 dklilley