matlab-vim


Ⅰ. 插件描述

A vim plugin for MATLAB and tmux

Ⅱ. 基本信息

创建日期:  2017-03-10
使用用户:  1
Github星:  2
插件作者:  Morten

Ⅲ. 安装方法

使用Vundle管理器安装

在你的.vimrc下添加:
Plugin 'mortenstabenau/matlab-vim-are-made-of'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall

对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。

使用NeoBundle管理器安装

在你的.vimrc下添加:
NeoBundle 'mortenstabenau/matlab-vim-are-made-of'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall

使用VimPlug管理器安装

在你的.vimrc下添加:
Plug 'mortenstabenau/matlab-vim-are-made-of'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall

使用Pathogen管理器安装

在终端中运行以下命令:
cd ~/.vim/bundle
git clone https://github.com/mortenstabenau/matlab-vim

Ⅳ. 文档说明

# matlab.vim - a vim plugin for using MATLAB and tmux

This plugin provides some simple integration between vim, MATLAB and tmux. On
opening a MATLAB file (for example a .m-file) the plugin launches a MATLAB
console in a new hidden tmux split at the right of the current split. The split
is hidden by zooming the current pane and can be unhidden by using
prefix+rightarrow, for example.

The plugin now provides multiple functions and mappings which make it easier to
interact with MATLAB. These include running scripts, adding breakpoints and
opening documentation.

matlab.vim also includes syntax highlighting, which was copied from
MatlabFilesEdition by
Fabrice Guy.

Installation

Use your favourite vim plugin manager. I recommend using
vim-plug. To install this plugin add
this to your .vimrc:

Plug 'MortenStabenau/matlab-vim'

And then run :PlugInstall.

Basic usage

  • Open any MATLAB file with vim inside of tmux. A MATLAB console will
    automatically open inside a hidden tmux split.
  • Run :MatlabRun to execute the file
  • Run :MatlabBreakpoint to set a breakpoint in the current line
  • Run :MatlabDoc to open the help for the function below your cursor

Options

  • Change the MATLAB executable
let g:matlab_executable = '/path/to/your/matlab/version'
  • Change the tmux split size
let g:matlab_panel_size = 50

For an overview of all options, check out the
doc
file.

Documentation

For a full documentation detailing the commands, options and mappings, please
read the
doc
file or run help matlab. The latter also gives you pretty syntax
highlighting.

TODO

  • Add new MATLAB functions to highlighting: the old MatlabFilesEdition code was
    written in 2009 or so. Since then, a lot of new MATLAB functions have been

added which are currently not recognized by the syntax highlighting.

  • Initial working folder should check if any MATLAB files are present
  • Add a nice demo gif to this README
  • Display breakpoints (?)
  • Add :MatlabStopServer command (?), also auto-closing
  • Paths with spaces do not work

Thanks

  • Fabrice Guy:
  1. his work on

MatlabFilesEdition. I
used his code for the syntax highlighting and the indentation.

  • Daan Bakker:
  1. his handy projectroot

functions

添加新评论