Emacs-style mark setting in Matlab

9 ビュー (過去 30 日間)
Micah Fry
Micah Fry 2020 年 8 月 24 日
コメント済み: Micah Fry 2020 年 9 月 16 日
Is there a way to set a mark (i.e., for highlighting/selecting text) similar to the method in Emacs? See https://www.gnu.org/software/emacs/manual/html_node/emacs/Setting-Mark.html for more info on the Emacs style.
I see that Shift-Up, Shift-Right, etc. allow me to select text from the keyboard (not requiring my mouse), but the main problem is that I cannot use other Emacs text navigation commands with a set mark in order to select text. In other words, I want to be able to highlight text to the end of the script (for example) by:
C-Space (set mark), M-> (goto end of script)
Rather than the MATLAB approach:
Shift + Ctrl + End
Having a separate "mark setting" function allows me to control text selection entirely from my keyboard without having to memorize or define new hotkeys (it's just C-Space + whatever text navigation commands I want to issue).

回答 (1 件)

Sourabh Kondapaka
Sourabh Kondapaka 2020 年 9 月 14 日
編集済み: Sourabh Kondapaka 2020 年 9 月 14 日
Hi,
It is possible to change the default key bindings to Emacs key bindings.
Please follow the below steps:
  • In MATLAB under the “HOME” tab, in the “ENVIRONMENT” sub-section click on the “Preferences” option.
  • Under the “MATLAB” drop down item, find “Keyboard” and click on it.
  • You should select the “Shortcuts” option under “Keyboard”.
  • On the right, you will be able to see a section called “Active Settings”. Under it you can choose “Emacs Default Set”.
Below screenshot should help you in finding the required settings:
  1 件のコメント
Micah Fry
Micah Fry 2020 年 9 月 16 日
Yes, I've already done that, and the bindings are mostly aligned with Emacs. The problem is that those bindings don't provide the functionality in question; I'm unable to set highlight marking on and off with a key stroke.

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeEnvironment and Settings についてさらに検索

製品

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by