Questions tagged [rails.vim]

A useful vim plugin for ruby on rails developers, adds a lot of useful features such as syntax highlighting, navigation of the Rails directory structure, interface to rake, interface to the rails command, and partial extraction

23 questions
98
votes
7 answers

Vim, how to reload syntax highlighting

When I execute Rmodel, Rcontroller and others in Vim. I see only white text. But when I go to next buffer and then go back by :bn and :bl, colors are working. This is my .vim folder https://github.com/regedarek/dotvim
tomekfranek
  • 6,852
  • 8
  • 45
  • 80
10
votes
2 answers

Opening a rails.vim related file in a new window

I like rails.vim support for going to the corresponding file. For example, if I'm in the Product model, I can type :Econtroller to open the ProductsController in the same window. I want to open the controller in either a newly created window or…
Kyle Heironimus
  • 7,741
  • 7
  • 39
  • 51
8
votes
1 answer

rails.vim and custom controllers location

I love Rails.vim but I have a problem with using it in some projects. I have two places for controllers in one of my apps: app/controllers app/controllers/v1/api Can I configure (perhaps in config/rails.vim?) this extra path somehow? I'd like to…
Nazgob
  • 8,502
  • 4
  • 40
  • 42
7
votes
2 answers

Go to last file with rails.vim

I am just getting into rails.vim as my ROR IDE and I am really liking it. The only thing I don't know how to do, that I wish I could, is hop back to the last file I was editing. For example, if I am editing one file, say a view and I use…
Matthew
  • 12,892
  • 6
  • 42
  • 45
7
votes
1 answer

In rails.vim why do I get "E345 can't find file in path" errors?

I've been learning Ruby/Rails with vim. Tim Pope's rails.vim seems like a really good tool to traverse files with, but I keep getting these pesky "E345 can't find file in path" errors. I'm not vim expert yet, so the solution isn't obvious. …
JnBrymn
  • 24,245
  • 28
  • 105
  • 147
7
votes
1 answer

rails.vim installed but :Rfind doesnt'work

I've installed rails.vim and it seems to be installed correctly since :Rails! returns rails.vim 5.0. But, if I'm in an existing Rails project and look for a file :Rfind user I get E492: Not an editor command: Rfind user. Any suggestions?
crispychicken
  • 2,592
  • 2
  • 33
  • 50
5
votes
3 answers

Rails.vim plugin, does it have any fancy migration support?

I am hoping rails.vim has some migration support. I'm looking for something like: generate migration and jump to that file, and then a way to fire the migration. Does this exist or am I dreaming? :)
Blankman
  • 259,732
  • 324
  • 769
  • 1,199
4
votes
1 answer

Vim: Using rails.vim, how do I make rails.vm use rspec instead of testunit?

I'm using rails.vim and when I use :A on a model file, it opens the corresponding testunit file. How do I make it open the corresponding rspec file?
double free
  • 1,027
  • 2
  • 9
  • 14
2
votes
1 answer

Why doesn't rails.vim recognize any gems that I install?

I'm a ruby and vim newbie. I recently installed the rails.vim plugin and all the commands work fine apart from the commands to create a new Rails project. Every time I do this it says rails is not installed on my system, but it is! It also acts up…
Michel
  • 21
  • 1
2
votes
1 answer

How to add capybara dsl syntax highlighting to vim syntax highlighting?

I'm using Tim Pope's rails.vim plugin and for the most part it highlights nearly everything I want, except Capybara's new DSL which contains keywords like feature, scenario, background etc. I don't want to create a new syntax file just for those two…
sent-hil
  • 18,635
  • 16
  • 56
  • 74
2
votes
1 answer

rails.vim with ruby omnicompletion giving "Error loading rails environment" error

I'm trying to get up and working with vim with ruby on rails and am having a few problems with omni-completion. I have downloaded the rails.vim plugin for vim, which appears to be installed, with a vim call :Rails! gives rails.vim 4.3…
Alan Saul
  • 23
  • 3
2
votes
2 answers

Vim rails.vim plugin doesn't seem to work

I've installed rails.vim plugin. Running :Rails! command shows: rails.vim 4.3. But when I try to run :Rails myapp it opens command line (cmd.exe) that shows: C:\Windows\system32\cmd.exe /c rails myapp. Bunch of rails help comes up and nothing…
Alex
  • 16,409
  • 6
  • 40
  • 56
1
vote
2 answers

How to run current RSpec test in VIM + Rails.vim + Ubuntu?

It says everywhere: Interface to rake. Use :Rake to run the current test, spec, or feature. Use :.Rake to do a focused run of just the method, example, or scenario on the current line. :Rake can also run arbitrary migrations, load individual…
Serge Vinogradoff
  • 2,262
  • 4
  • 26
  • 42
1
vote
1 answer

remove surrounding ERB tag just with vim plugin rails and surround

In vim, yss- can add the erb tag <% %> surrounding the current sentence. If I want to do the opposite operation, ds<% doesn't work. I have to repeat these typing like: ds% followed by ds< to remove the erb tag completely. Is there a more direct way…
canoe
  • 1,273
  • 13
  • 29
1
vote
1 answer

Rails.vim - How to test all features and/or specs?

I am using rails.vim plugin which is pretty awesome. However, I fail to see how could I test all the specs in one command. Right now I need to open a particular spec and do :Rake and that just tests the current opened spec. However, how could I…
Hommer Smith
  • 26,772
  • 56
  • 167
  • 296
1
2