How to enable auto word completion in the MATLAB Editor? - matlab

I can use auto word completion at the MATLAB command prompt by pressing tab, but I can not do that while using the Editor for an m file. Is there any way to use tab completion in the Editor?

According to this MathWorks blog post, tab completion works in the Editor as it does in the Command Window for MATLAB R2010a, but you may have to turn it on in the Keyboard Preferences menu.
For older MATLAB versions, tab completion in the Editor only works for function names and variables that have already been created in the workspace. So, if you are writing a script with a variable foobar, and that variable hasn't yet been created in the workspace (i.e. Command Window), then foobar won't show up when using tab completion in the Editor. This was the case when I tested it in MATLAB 7.8.0 (R2009a).

When you are writing a code press key "TAB", see:

Tab completion works for function names that are on Matlab's path. It also works for variable names, if the variable exists in the workspace. Thus, while you code, it may be a good idea to evaluate commands as you write. This allows you to immediately check for errors, and it makes variables available for auto-completion.

Related

CLIPS: Clear-window in CLIPSDOS.exe and tab to indent in CLIPSIDE

With CLIPS, It's possible some of the following?? (V 6.4 for Windows)
1 - Use a command like (clear-window) in the CLIPSDOS console for clear the console.
2 - Use tabs for indentation in CLIPSIDE. When i press tab, cursor goes to File menu item... how to indent?
How do people learn programming with CLIPS? I'm using a plugin for Visual Studio that helps me with the parenthesis concordance, let me use tabs to indent, and other tricks. But it has some problems, and i'm quite worried about the usability of the CLIPSDOS and CLIPSIDE interfaces to this purpose.
Thanks in advance.
In CLIPSDOS, you can use the command (system cls) to clear the screen. This will simply call out to DOS to execute a cls command.
The IDEs use standard text editing classes for the CLIPS command prompt window. Tabs appear to work correctly on the macOS IDE, but not the Windows or Java Swing IDEs, so that will need to be corrected.
While you can directly enter constructs at the command prompt, it's better to edit them in a file with your preferred text editor and then use the load command from the command prompt to load the contents of that file. The IDE supports a command history so you can use the up/down arrow keys to cycle through prior commands to avoid retyping.

What is hotkey to manually check a C function api in vscode?

Sometimes when I write the function name, the api is shown above its name automatically, but sometimes it doesn't work and I have to rewrite the function name to get that, so is there a shortcut key for it?
(I know man function_name but I used to CTRL+Q in NetBeans to get the same thing quickly but I can't find one for vscode.)
ALT+F12 seems to do the job. It's called "peek definition" which is available in the right click options too.
Also note that the opened window doesn't go away by clicking somewhere else outside of it, however, instead you can still use the ESC from keyboard.

Switch Matlab workspaces in the debugging mode

I am using Matlab R2017a. In earlier versions, there used to be an option, while in the debug mode, to switch the workspaces amongst calling functions in order to examine the values of the variables in the respective workspaces. I can not find the control in this current version Matlab R2017a. How does one switch?
The function call stack dropdown is on the editor tab while your program is stopped in the debugger:
You can also use dbstack, dbup, and dbdown to list the stacks and navigate through them via the command window.

Does VS Code has any shortcut like ctrl+q in eclipse?

Does VS Code (I currently use v1.8.1) has any shortcut like ctrl+q in eclipse?
It returns your cursor to the place where you stopped writing code(very useful for fast code browsing)
and it is different to alt+left which navigate backward
EDIT: I have found that this extension should do that you're asking. I suggest trying it out.
Original:
Out of the box in VS Code, this command does not exist. The list of default shortcuts can be found here, or you can open the keybindings settings in VS Code (ctrl+k, ctrl+s on Windows) and see which commands are available.
If you'd like to suggest this as a feature, you can open a new issue on GitHub or consider creating an extension.
If I understand correctly, you want a command that will move the cursor to where the last edit in a document was made.
This should be possible using an extension that listens to document change events and records the position of the cursor. Then, when the command is issued, it sets the editors cursor to that saved position.
You can also try "Eclipse Keymap" from Alphabot Security, has a lot of eclipse bindings.
I don't believe there is a built-in way to do this, but you could work around it by using an extension such as https://marketplace.visualstudio.com/items?itemName=alefragnani.Bookmarks .

Is there a plugin for Eclipse that immediately evaluates a highlighted expression?

A colleague of mine uses Netbeans, and I noticed a tremendously useful feature it has in debug mode: it immediately shows what a highlighted expression evaluates to in a tooltip. I'm not sure whether this is a standard feature in Netbeans, but I would definitely find it useful in Eclipse as well.
Does anyone know a plugin or a similar way of using this in Eclipse?
EDIT:
Eclipse provides tooltips for single variable evaluation and expressions evaluation in the expressions view. This is not what I need. In Netbeans, you can highlight an expression (possibly containing more than one variable) and it gets evaluated in a tooltip.
In Eclipse debug mode you can add needed expression to Expression view and check its value or you can hover mouse over variables and check theirs values
In Eclipse, when you're running your program in the debugger, you should be able to add a Watcher for a variable, or just simply evaluate an expression (I believe) in the Watcher tab. Sorry, I don't actually use Eclipse full-time, this is just from memory as I have used it in the past...
Three years later (don't know if it was before) you can Inspect the selected expression.
Select it, right click and choose Inspect, or press Ctrl+Shift+I (personally I changed that shortcut to one more reachable F12).