Ⅰ. 插件描述
Ⅱ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin 'boxofrox/neovim-scorched-earth'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle 'boxofrox/neovim-scorched-earth'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug 'boxofrox/neovim-scorched-earth'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/boxofrox/neovim-scorched-earth
Ⅳ. 文档说明
# neovim-scorched-earth
A stupid proof-of-concept for a Neovim plugin written in Rust using
daa84/neovim-lib.
What does it do?
Scorched Earth highlights the region of text that was touched by the cursor
while in Insert or Replace modes.

Why... this?
- This is my first Neovim plugin in Rust.
- A highlight plugin is new territory and interests me, so I'm less likely to
give up on it. - I'm unfamiliar with the nuances of Msgpack RPC communications with Neovim
using neovim-lib. The way was fraught with danger. This project was just
deep enough to burn myself a few times tinkering with different designs,
and shallow enough that I didn't invest a depressing amount of work that
needed refactoring. - Experiment with a directory structure to combine the rust source and
vimscript plugin.
Try it out
- It's dangerous to go alone. Take this! https://www.rustup.rs/
- Use the stable rust compiler.
rustup install stable
rustup default stable
- Fetch the plugin.
$ git clone https://github.com/boxofrox/neovim-scorched-earth.git- Build the binary portion of the plugin.
$ cd neovim-scorched-earth
$ cargo build --releaseTest it out in a fresh instance of Neovim. *(If Windows requires any
changes, open an issue!)*
nvim -u ./init.vim --noplugin -c ":ScorchedEarthConnect"The ScorchedEarthConnect command spawns the Rust plugin in a separate process and
establishes a channel.
Todo
- [ ] Add vimscript variable
g:scorched_earth_syntax_groupto select
highlight color using existing syntax groups. - [x] Add vimscript variable
g:scorched_earth_programto specify location of Rust
plugin binary. Will facilitate testing development binaries.