neovim-scorched-earth


Ⅰ. 插件描述

Ⅱ. 基本信息

创建日期:  2017-03-28
使用用户:  1
Github星:  14
插件作者:  Justin C.

Ⅲ. 安装方法

使用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.

demo

Why... this?

  1. This is my first Neovim plugin in Rust.
  2. A highlight plugin is new territory and interests me, so I'm less likely to
    give up on it.
  3. 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.
  4. Experiment with a directory structure to combine the rust source and
    vimscript plugin.

Try it out

  1. It's dangerous to go alone. Take this! https://www.rustup.rs/
  2. Use the stable rust compiler.
rustup install stable
rustup default stable
  1. Fetch the plugin.
$ git clone https://github.com/boxofrox/neovim-scorched-earth.git
  1. Build the binary portion of the plugin.
$ cd neovim-scorched-earth
$ cargo build --release
  1. Test 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_group to select
    highlight color using existing syntax groups.
  • [x] Add vimscript variable g:scorched_earth_program to specify location of Rust
    plugin binary. Will facilitate testing development binaries.

添加新评论