在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):ebranlard/vim-matlab-behave开源软件地址(OpenSource Url):https://github.com/ebranlard/vim-matlab-behave开源编程语言(OpenSource Language):Vim Script 68.9%开源软件介绍(OpenSource Introduction):matlab-behave.vimFacilitates the use of vim/gvim as external editor to Matlab (GUI or terminal):
FunctionalitiesBelow is a list of functionalities. Default mappings are written within parenthesis (See section "Mapping"), and the vim functions are written within brackets. If they do not work, see section "Customization" below. Reproducing some matlab editor commands:
Some additions:
Cell and folding support:
Opening files in vim when an error is thrown: (see "Installation - matlab side" below) NOTE: The run functionalities are Linux only for now. It is based on "wmctrl" (see Installation - System). Basic principle of the "run" functionalities
CustomizationFor mapping customization, see section "Mapping".
Depending on the terminal, you might need to customize the pasting cmd (see below).
You can change this variable in your vimrc, for instance "Ctrl+Shift+v" or "Shift+Insert", or any other mapping that would work in the matlab window (GUI or Terminal).
or
This should work for Matlab GUI. When using MatRunExtern the pluggin attempt to force the title of the terminal window using the command line switch -T (supported by xterm and xfce4-terminal) and the above variable. You can change the variable in your vimrc. If you are opening the terminal yourself and not using MatRunExtern, you could try to set the variable above so that it fits the title of your terminal window (run "wmctrl -l" to find it) or alternatively change the title of the terminal window to fit the variable. For example, for xfce4-terminal, the following command will open Matlab in a proper terminal window with the title "MATLAB R":
<--- If you change to Octave, don't forget to change window base name:
and use Octave on a window with OCTAVE name, for example:
Installation - SystemInstall wmctrl, xclip and xdotool from your linux distribution. I didn't look for alternatives on windows. Please contribute. Installation - VimCopy the file "ftplugin/matlab_behave.vim" into the equivalent location in your Vim config directory, e.g.: ~/.vim/ftplugin/ If you don't have a preferred installation method, I recommend installing pathogen.vim, and then simply copy and paste:
Installation - matlab sideThis is optional. For matlab to switch back to vim/gvim automatically go to matlab options: File/Preferences/Editor: set Editor to vim/gvim , e.g. "gvim --remote-tab-silent" Further, to have the possibility to click on matlab command window links when an error or a warning is thrown to jump directly to the right location in vim:
Other complementary pluginsFor best support of matlab use Fabrice Guy's plugin (syntax, indent,ftplugin, compiler(mlint) ) MappingsMappings are activated by default. Mappings are defined in the "matlab_behave.vim". (look for Mappings in this file)
Explanation of some commands used
Special configurationsBelow are some tips for special system configurations. Uxing xmonat windows manager Include the Ewmh package from contrib in your xmonad config: http://hackage.haskell.org/package/xmonad-contrib-0.13/docs/XMonad-Hooks-EwmhDesktops.html Using Termite (matlab in the terminal) Use the ContributingPlease do, and don't hesitate to contact me. LicenseCopyright (c) E. Branlard (lastname at gmail dot com). Distributed under the same terms as Vim itself.
See ContributingAny contributions to this project are welcome! If you find this project useful, you can also buy me a coffee (donate a small amount) with the link below: |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论