Giter Club home page Giter Club logo

rspec.vim's Introduction

rspec.vim

This provides improved syntax highlighting for rspec. This is pulled from Specky which is a great plugin which just does a little too much for me.

If you don't have a preferred installation method check out vim-plug

Usage

By default this syntax is used with all files matching one of these patterns:

  • *_spec.rb
  • *_shared_examples.rb
  • *_shared_context.rb

If you don't follow this pattern use something like:

autocmd BufNewFile,BufRead *_foo.rb set syntax=rspec

In your ~/.vimrc

rspec.vim's People

Contributors

camponez avatar delta4d avatar geoffharcourt avatar gevans avatar hsatac avatar iain avatar jkrup avatar johann-koebbe-vericity avatar jondkinney avatar kassio avatar keith avatar mikeastock avatar pcasaretto avatar sheerun avatar tonekk avatar toupeira avatar ylecuyer avatar zorbash avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

rspec.vim's Issues

Undefined variable: b:current_syntax

/home/ianks/.yadr/editors/vim/plugged/rspec.vim/syntax/rspec.vim, line 7
Vim(let):E121: Undefined variable: b:current_syntax
Error occurred while executing "open" action!

Since #22 was merged I have been getting this error when opening any *_spec.rb file. b:current_syntax is not guanteed to be defined, and it seems it fails at this point. I am not sure why this is different in my case, but it seems ruby syntax is not loaded before the rspec.vim is loaded.

File type not detected

With ftdetect in after the spec files get ruby as the file type and the syntax is not loaded for me. I am using Vim 8.1 and the plugin is in the $HOME/.vim/pack directory.

If I move just the ftdetect to the root directory of the plugin - syntax stays in after - everything seems to work fine.

Looks like that MR #36 introduced a regression. Maybe @sheerun, as the author of #36 has an idea if it is indeed necessary from his point of view to have both ftdetect and syntax in after or is it only syntax which needs to be there.

I don't know what is the sequence with ftdetect directories, but for filetype.vim definitions in after are meant as fallbacks, so if there is an earlier match (in this case ruby, coming from /usr/share/vim/vim81/filetype.vim), then things in after are ignored.

Filetype

Why is filetype equal to rspec and not to ruby.rspec?

Support do end match

Could rspec.vim support do..end match?
(Jump between do and end using %)

Or is there any way to make rspec.vim work with vim-ruby or vim-rails?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.