整理:VSCode配置Matlab环境
来源:互联网 发布:office2016激活工具mac 编辑:程序博客网 时间:2024/06/05 08:06
Main features
Colorization
(imported from Textmate's syntax)
Snippets
(Translated from TextMate's snippets)
Code Checking
Uses mlint for checking the MATLAB code for problems on save.
Usage
Install the extension in VS Code
- Open the command palette using
Ctrl+Shift+P
- Type
ext install Matlab
in the command palette
Select MATLAB as a language
- On the bottom-right corner, click on the select language mode button, if you have created a new file it should display Plain Text
- Select MATLAB in the list of languages.
Alternatively, saving the file with a .m
extension, will allow VS Code to understand that it is a MATLAB file, and automatically select the language correctly.
Using snippets
- Bring-up the autocomplete menu by hitting the
Ctrl+Shift
key combination - Select the snippet that you want to use in the list
- Use
tab
to navigate trough the snippet's variables
Setting-up linter
- Open the User Settings by going to File>Preferences>User Settings
On the right pane, where you have the settings.json file open, add to the json file.
"matlab.mlintpath" : "path to your mlint.exe file"
For example, on a PC :
"matlab.mlintpath": "C:\\Program Files (x86)\\MATLAB\\R2012a\\bin\\win32\\mlint.exe"
And on a Mac :
"matlab.mlintpath": "/Applications/MATLAB_R2016a.app/bin/maci64/mlint"
- Save your settings.json file
Now, when you open a Matlab document (.m), VS Code displays warnings and errors.
Remark: If you don't want the lint on save option and you want to remove the error message being displayed when the extension activates, change the
matlab.lintOnSave
option in the settings file toFalse
.
Setting the linter encoding
For some languages, like Chinese, the return of the linter is not using the default utf-8 encoding, but a different encoding (gb2312 for Chinese). If the linting doesn't show correctly, change the matlab.linterEncoding
to the encoding used by your Windows console. For example, if your Windows is installed in Chinese, add "matlab.linterEncoding" : "gb2312"
to your settings.json.
Changing the default file association
Visual Studio Code's default file association for .m
files is Objective-C, if you want to setup the default file associationt to be Matlab go to the Users preference (File>Preferences>User Settings) and add the following line:
"files.associations": {"*.m": "matlab"}
- 整理:VSCode配置Matlab环境
- VSCODE golang环境配置
- VSCode配置C++编写环境
- vscode 配置go开发环境
- VScode配置C++编译环境
- VSCODE 配置C++运行环境
- VSCode 配置C、C++环境
- 整理:Visual Studio Code (vscode) 配置C、C++环境/编写运行C、C++(Windows)
- 整理:Visual Studio Code (vscode) 配置C、C++环境/编写运行C、C++(Windows)
- vscode 配置go环境 可调试
- 配置VsCode的C/C++编译环境
- vscode中配置golang开发环境
- vscode 配置 go 语言开发环境
- 如何在vscode配置php开发环境
- ubuntu 16.04 VSCode 配置C++开发环境
- 如何在VSCode中配置python环境
- Win10环境下配置VScode的C++编译环境
- Ubuntu下VSCode的Python运行调试环境的配置
- 使用应用程序测试网卡收发UDP数据包性能
- Android自定义 view之图片裁剪从设计到实现
- 读书笔记——《Head First Java》战舰小游戏实例
- java学习笔记(二)——对象扩展
- 关于工厂模式的作用。为什么要用工厂模式?
- 整理:VSCode配置Matlab环境
- 2017 AndroidStudio优化
- adb连接手机报错解决方案汇总
- SLAM入门笔记(1):特征点的匹配
- 12-20
- 帮助文档或使用说明Chm文档打开后,目录都在,内容为空白,如何解决?
- fastjson中日期与json之间的转换
- git 应用 tag
- Ubuntu系统 Eclipse安装支持c/c++插件