- Undocumented Matlab - https://undocumentedmatlab.com -
Spicing up the Matlab Editor
Posted By Yair Altman On March 30, 2018 | 2 Comments
I’d like to introduce guest blogger Andreas Justin [1], who will discuss some way-cool features in his Editor Plugin utility. Many of his feature implementations are not Editor-specific and can be reused in other Matlab-Desktop applications, for example dockable panels, and integration with Matlab’s main Preferences window.
Note: I will be traveling to the USA in June, and to Spain in August. If you would like me to visit your location for onsite consulting or training, then please let me know.
Happy Easter/Passover!
Compared to other IDE like IntellIJ, Eclipse and many more, Matlab’s editor seems somewhat outdated. Especially writing Object-Oriented code in Matlab is kind of a hassle. To make Matlab more user friendly, I’ve written a Java app that adds important features to the editor – Features such as navigating inside Class-code and in Inherited members; Searching through methods and instantly jumping to desired location; Reopening an editor that was closed by accident; Storing bookmarks between Matlab sessions; and Live Templates using commands directly written in the editor, replaced by pre-defined text.
The default Keyboard shortcuts listed below for the features can be customized. Most variables can be customized as well (I will point out which variables are not [yet] customizable).
Most GUIs have a search field. Within this search field you can move the list or the tree up and down using arrow keys, or hit <escape> to return to editor. These search fields allow you to enter regular expressions to limit results shown in list or tree. Also, most GUIs are dockable.
The Editor-Plugin utility is open-source. It is available on GitHub [2] and also mirrored on the Matlab File Exchange [3]. A detailed setup guide [4] is provided on the utility’s wiki section in GitHub [5].
If you discover any problem or have any suggestion for improvement, please visit the utility’s Issues section on GitHub [6], where all open/closed issues can be tracked and discussed.
A brief overview of some of the features is presented below. For a detailed explanation of these and other features (which are not listed below), please review the Features section [7] of the utility’s wiki (you guessed it: on GitHub…).
%this%
(delivered within the package). When you type a command into the editor the string will get replaced by the predefined text. This predefined text may include variables depending on what you want to achieve. %this%
was designed to insert the fully qualified name of the current class you’re in (or function, or script).As noted above, a detailed explanation of these and other features is provided in the Features section [7] of the utility’s wiki. If you discover any problem or have any suggestion for improvement, please visit the utility’s Issues section on GitHub [6], where issues can be tracked and discussed.
Categories: Desktop, Guest bloggers, High risk of breaking in future versions, Java, Undocumented feature
Article printed from Undocumented Matlab: https://undocumentedmatlab.com
URL to article: https://undocumentedmatlab.com/articles/spicing-up-the-matlab-editor
URLs in this post:
[1] Andreas Justin: https://github.com/GavriYashar
[2] on GitHub: https://github.com/GavriYashar/Matlab-Editor-Plugin
[3] on the Matlab File Exchange: https://www.mathworks.com/matlabcentral/fileexchange/58497-gavriyashar-matlab-editor-plugin
[4] detailed setup guide: https://github.com/GavriYashar/Matlab-Editor-Plugin/wiki/Setup
[5] wiki section in GitHub: https://github.com/GavriYashar/Matlab-Editor-Plugin/wiki
[6] Issues section on GitHub: https://github.com/GavriYashar/Matlab-Editor-Plugin/issues
[7] Features section: https://github.com/GavriYashar/Matlab-Editor-Plugin/wiki/Features
[8] discussed by Yair: http://undocumentedmatlab.com/blog/customizing-workspace-context-menu
[9] discussed by Yair: http://undocumentedmatlab.com/blog/editormacro-assign-a-keyboard-macro-in-the-matlab-editor
[10] EditorMacro – assign a keyboard macro in the Matlab editor : https://undocumentedmatlab.com/articles/editormacro-assign-a-keyboard-macro-in-the-matlab-editor
[11] Accessing the Matlab Editor : https://undocumentedmatlab.com/articles/accessing-the-matlab-editor
[12] Non-textual editor actions : https://undocumentedmatlab.com/articles/non-textual-editor-actions
[13] Recovering previous editor state : https://undocumentedmatlab.com/articles/recovering-previous-editor-state
[14] Spicing up Matlab uicontrol tooltips : https://undocumentedmatlab.com/articles/spicing-up-matlab-uicontrol-tooltips
[15] Variables Editor scrolling : https://undocumentedmatlab.com/articles/variables-editor-scrolling
Click here to print.
Copyright © Yair Altman - Undocumented Matlab. All rights reserved.
2 Comments To "Spicing up the Matlab Editor"
#1 Comment By Josh On January 27, 2021 @ 04:42
Dear Yair,
Small typo; you wrote
>>Move lines up or down – CTRL + ALT + UP or DOWN allows you to move selected lines up or down
but it’s actually ALT+SHIFT then UP/DOWN
Cheers! Great post!!
josh
#2 Comment By Niko On January 12, 2022 @ 13:26
Hi,
Has anyone acomplished to install Andreas’ tool for Matlab version ‘9.11.0.1809720 (R2021b) Update 1’ or higher?
I think the fact that Matlab now uses the stupid LiveEditor causes problems 🙁
Cheers,
Niko