Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

MATLAB: Delete line hotkey?

My trackpad is not comfortable to use so I aim to do coding with my keyboard only. My "kill line" hotkey do not work no matter what key I set it to. I did unassign all conflicts.

Simple question: Is there a way to make a hotkey, that will delete the line of code, the cursor (caret) is currently located on (not only all code after the cursor, like kill-line is supposed to do)?

like image 392
Sigbjorn Hokland Avatar asked Mar 20 '15 14:03

Sigbjorn Hokland


People also ask

Is there a hotkey to delete a line of code in MATLAB?

Simple question: Is there a way to make a hotkey, that will delete the line of code, the cursor (caret) is currently located on (not only all code after the cursor, like kill-line is supposed to do)? Show activity on this post. The Kill line ( Ctrl+K by default in Windows) is working only in the Matlab console window by default.

How do I Kill a line in MATLAB?

By default this action is only bound to Ctrl+K in the Command Window. To get it in the Editor, (1) go to File -> Preferences -> Keyboard -> Shortcuts, (2) search for “Kill Line”, (3) select the shortcut and in the table below, (4) click the drop-down arrow and check the “MATLAB Editor” checkbox.

Is there a shortcut to execute current line of code in MATLAB?

When you select a line / multiple lines of code in Matlab, you can press F9 to execute it / them. Is there a shortcut to execute the current line of code? This would enable you to go down line per line with your arrow down key and execute the corresponding line with this shortcut. Show activity on this post.

How to delete row in editor using AutoHotkey in MATLAB?

Now your shortcut probably appear next to Search documentation text box. Pressing Alt + 1 will trigger the code and delete the row in editor. Now you can change it to your custom shortcut keys with help of AutoHotkey. #IfWinActive MATLAB ;in MATLAB window F11:: ;pressing F11...


1 Answers

The Kill line (Ctrl+K by default in Windows) is working only in the Matlab console window by default. If you go to File->Preferences->Keyboard->Shortcuts, and select the Kill Line action line, in the next table (labeled Shortcuts for Kill Line) you will see two columns Shortcut and Tolls with shortcut. So you should make the Tools with shortcut to be All tools instead of Command Window by clicking on it and selecting everything.

like image 136
Eugene Sh. Avatar answered Sep 25 '22 23:09

Eugene Sh.