mathworks / MATLAB-extension-for-vscode

This extension provides support for editing MATLAB® code in Visual Studio® Code and includes features such as syntax highlighting, code analysis, navigation support, and more.

Home Page:https://marketplace.visualstudio.com/items?itemName=MathWorks.language-matlab

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Change keyboard shortcuts to emacs mode

TemuG opened this issue · 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.

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

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?

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

Thanks for the clarification!