Ⅰ. 插件描述
Vim plugin that loads the Reason and Merlin plugins from the `PATH`.Ⅱ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin 'reasonml/vim-reason-loader'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle 'reasonml/vim-reason-loader'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug 'reasonml/vim-reason-loader'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/reasonml/vim-reason-loader
Ⅳ. 文档说明
vim-reason-loader
Currently deprecated. Please use vim-reason instead!
Vim plugin that loads the real Reason
and Merlin plugins from the PATH.
Installation
install using
VundleorNeoBundle." Or if using NeoBundle(recommended) NeoBundle 'reasonml/vim-reason-loader' " Using Vundle Bundle 'reasonml/vim-reason-loader' " Using Vim Plug Plug 'reasonml/vim-reason-loader'
Usage
It's really simple: when you start vim, make sure that the PATH environment
variable has any and all Merlin, ocaml, andReason tooling available in the path.
You can test this by trying which ocamlmerlin, and which refmt.
If that doesn't print the path, then you haven't used your package manager to
correctly setup your PATH with those tools globally available.
Details:
This is a tiny Vim plugin whose only job is to load the real Vim Reason /
Merlin plugins when you start Vim. In general, if you've already installedReason, Merlin, or OCaml those installations have the real Vim plugins
sitting next to the ocamlmerlin, and refmt binaries respectively. Depending
on how you installed the packages, the real plugin code is likely sitting
somewhere next to those binaries, and this plugin loads them from that
location.
Why would you want to do this? Because you may have two separate projects, that
have different versions of refmt, or ocamlmerlin, or Reason syntax
highlighting, and you change your PATH environment variable to reflect your
specific project. You want to make sure that when you start Vim, you're loading
the Vim plugins for the specific versions of Reason / Merlin that you are
working on. This scripts wraps that short, but messy logic into one Vim plugin
that you can depend on easily like any other Vim plugin.
Troubleshooting
Colors Aren't Appearing
- If you're using a combination of zsh and nvim, you may run into an issue where
correct shell will load, but colors won't display correctly.
- You can try to fix this by setting
set shell=/bin/shin your Neovim config.
- You can try to fix this by setting