Skip to content

Latest commit

 

History

History
37 lines (21 loc) · 862 Bytes

README.md

File metadata and controls

37 lines (21 loc) · 862 Bytes

rspec-current.vim

Caution

It's very unstable. It's not documented yet and the implementation is immature. Feel free to try it but everything is subject to change in the future.

Limitations

It required Ruby 3.2 since it uses new features added to RubyVM::AbstractSyntaxTree in Ruby 3.2.

Usage

Install

First, install neovim gem if you use Neovim. Skip this installation step if you use Vim.

gem install neovim

Then install it with your favorite package manager.

Functions

After installation, two functions are available.

  • RSpecCurrentSubject: Returns current subject as a String
  • RSpecCurrentContext Returns current context as a String

Then you can echo it with something like:

:echo RSpecCurrentSubject()

You can set these functions in your statusline plugin to track current subject/context.