Is there a MATLAB editor/plugin/version with better code completion? - matlab

Comparing Visual Studio code completion with MATLAB R2008b 7.7 there are a few important features missing in the last one:
Local variables completion
Function, for, if auto ENDing
But Visual Studio doesn't support MATLAB code. Is there any MATLAB plugin, editor or version with a better code completion?

You could always take a look at MATLAB-Emacs integration (also deals with Vim in the article).
Also, while we're at the subject:
Editing MATLAB files with Vim
Evaluate selected text from Vim in Matlab

On Windows, Notepad++ allows code completion of functions and words.

With the R2010a release of MATLAB, the Editor's tab completion now includes local variables.

Related

How to setup Julia in VS code?

I'm coming from a pure Windows Visual Studio programming background with little Linux experience. It seems possible to use VS Code to program in Julia, but I can't figure out how to get things set up correctly.
Does anybody have good example launch.json, tasks.json, or other files that can serve as an example to build from?
This would be a great thing to see in a detailed tutorial.
Here is how things work if you are using the Julia extension for VisualStudio Code.
The extension adds a bunch of new commands. They all start with "julia", so filtering by that string should show you everything you can do with the extension.
In terms of running Julia code, the extension offers only two options right now. First, you can execute a command to start a REPL. This will just show a default Julia prompt, and you can interact with it like you would with any other Julia REPL. The second is that there is also a command, triggered by Ctrl + Enter, to send either the current editor selection or the current editor line to this REPL.
There is currently no further integration offered by the Julia extension. We do plan to add debugger support in the future, at which point I would expect F5 to start the current file in the debugger, or something like that. But that functionality is probably a couple of months away.

Syntax Highlighting While Running MATLAB via Terminal?

I really dislike the MATLAB GUI, thus, I followed some instructions online to open MATLAB via Terminal using matlab -nodesktop. It works. However, I lack the conveniences of syntax highlighting; the sorts that exists in vim, for example.
I am interested in knowing if this is possible.
Try this FileExchange submissions:
Highlighting Matlab files in Vim
Editing Matlab files in Vim
There's Matlab mode for emacs, and also a built-in octave mode which will serve for syntax highlighting.
You can use edit yourfile.m in the terminal to open the matlab editor. This will open the editor without the entire matlab gui. Not sure why you'd want to do this though...

Automated function hints tool in Matlab

I have worked shortly with Netbeans using Java and use eclipse for school projects, where I noticed there are some really cool features like it will show built-in functions on ctrl-space or it will suggest from existing variables. I recently started using matlab, I was wondering if there are any such tools available in the matlab. I know it's a scripting environment so things are probably a little different but then I wonder people who work with extensive projects with matlab, how would they manage the codes or cross-develop without such tools. I searched mathworks but could not find any useful information on that.
Anyone knows if such tools or add-ons existe for matlab? Thanks in advance guys!
As mentioned before, autocomplete works for functions, variables and fields.
If it seems to fail to work for a field (perhaps because your workspace is not properly set up) it can help to call the field without index:
For example:
entity.field instead of entity(i).field
Also if you change the workspace frequently it may be that the mfile editor does not catch up, in that case a quick workaround is to just type in the command window and copy afterwards.
As mentioned before the variables need to be in workspace.
I often approach so that I evaluate the code as I write it like this:
Write the code in cell mode
Evaluate cell with [ctrl - enter] - or button in menu bar.
Write next cell (variables of previous blocks are now available in workplace, autocomplete with tab)
There is also a matlab mode for emacs. It offers some autocomplete functionality and has a nice feature to wrap long code lines.
unfortunately on windows it lacks the ability to evaluate cells. So I rarely use it.
There are some similar design in MATLAB, one of them is called function hints.
You could find the documentation for it in here: http://www.mathworks.com/help/matlab/matlab_env/check-syntax-as-you-type.html

Using external editor in MATLAB

I'm trying to use EMACS as the external editor for MATLAB. After following the directions here: matlab script editing I can get the matlab-shell feature working, but I still don't understand how to use EMACS to write scripts.
When I hit edit in the MATLAB console and get to EMACS, I don't see any MATLAB-specific features. Where are the syntax highlighting, debugging, etc. options?
You need the matlab-emacs integration from here: http://matlab-emacs.sourceforge.net/ - that should get you syntax highlighting. If you already have that installed, perhaps you need to update your auto-mode-alist.
I must admit that while I use emacs extensively for editing, I use the MATLAB editor for debugging.

Is there a way to access Stata from eclipse?

… similar to the StatET plugin that allows you to run R code from Eclipse?
I tried googling it but nothing useful has turned up.
None that I know. If you're a CLI junky or willing to use Emacs, you might find limited support through the ESS package and the ado-mode. This is what I used on Mac OS X when I want to run short snippet of code, or use Stata in batch mode, but there's no interactive graphical output (you can just save graphics as PDF as usual). The ado-mode provides basic syntax highlighting and can send region or buffer to a running instance of Stata GUI program (not the executable file, stata-*, that is being used by ESS).
Here are two screenshots of (top) edition of code in Emacs with the ado-mode, and (bottom) an interactive Stata session (no plot produced).
Some notes on text editors for Stata users provides a list of text editors that can be used with Stata (without interactive facilities, though).
There seems to be a promising project starting up here:
http://mas802.wordpress.com/2011/09/06/stata-plugin-for-eclipse-alpha/