vim-rails icon indicating copy to clipboard operation
vim-rails copied to clipboard

Make Rextract quotes configurable (so that one can use single quotes)

Open jeromedalbert opened this issue 9 years ago • 2 comments
trafficstars

The rails-:Rextract doc says:

And you issue this command:

    :2,3Rextract post

Your file will change to this:

 1  <div>
 2    <%= render 'post' %>
 3  </div>

'post' uses single quotes, but if you try to reproduce the example and extract to a partial, vim-rails actually uses double quotes. Our team has the exact opposite convention as the one mentioned in #343, i.e. we use single quotes. Maybe we could make them configurable, or revert to single quotes?

jeromedalbert avatar May 02 '16 05:05 jeromedalbert

:Eunittest my_model! will generate:

require 'spec_helper'

describe MyModel do
end

always using single quotes. Having all quotes being configurable would solve both these issues.

What do you think @tpope? I'd gladly take a stab at this if this is something we want to include in vim-rails.

teoljungberg avatar Jun 23 '16 04:06 teoljungberg

Changing all the projections to use custom quotes sounds pretty invasive. I wanna know how this is handled in generators before I commit to that.

tpope avatar Oct 07 '19 17:10 tpope