Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7045419
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T02:31:42+00:00 2026-05-28T02:31:42+00:00

Soon after starting a new project I realized, that I’m not getting the correct

  • 0

Soon after starting a new project I realized, that I’m not getting the correct syntax highlighting for my RSpec files.

At first I thought this is just because of my project specific .vimrc, which are loaded via set exrc. But even after I deleted it, it didn’t help.

I also thought that the problem is in the spec file itself, that it doesn’t get recognized as RSpec, so I took a file from another project, copied it over, and it still isn’t getting properly highlighted.

syntax highlighting

This is the same file opened in two different places. The one on the left is in the original project, where it does get highlighting, and the one on the right is the copied version.

The same thing happens for all the RSpec files in that one project, but it seems to work everywhere else.

Here is my ~/.vimrc, but I don’t think that’s of any relevance, because I never had this issue before, only in this specific project.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T02:31:43+00:00Added an answer on May 28, 2026 at 2:31 am

    You’re using janus so you have rails.vim installed. As you can see here, that plugin defines the syntax methods for you and that’s the reason why you have the RSpec syntax enabled only in rails projects.

    If you want to enable that syntaxt in each spec file you can add the following to your vimrc:

    autocmd BufRead *_spec.rb syn keyword rubyRspec describe context it specify it_should_behave_like before after setup subject its shared_examples_for shared_context let
    highlight def link rubyRspec Function
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We will be soon hosting a large number of audio and video files that
I am starting a new client/server project at work and I want to start
I'll be starting medium-sized iOS project soon, a document-centric app. Later, the software might
I'm starting work on java project. The application has no GUI and does not
Soon I'll be launching my new site and i was planning on using gmail
I'm getting married soon and am busy with the seating plan, and am running
I'm soon going to check in the very first commit of a new Java
We'll soon be embarking on the development of a new mobile application. This particular
I'm soon going to be starting some iPhone Development (3.0) building a simple app
I'm starting a personal project, so I have at the moment complete architectural/design control.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.