Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
jeromedalbert opened this issue May 2, 2016 · 2 comments

Comments

@jeromedalbert
Copy link

jeromedalbert commented May 2, 2016

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 jeromedalbert changed the title Make quotes configurable (so that one can use single quotes) Make Rextract quotes configurable (so that one can use single quotes) May 2, 2016
henrik added a commit to henrik/vim-rails that referenced this issue Jun 22, 2016
The style was changed in tpope#343.

If tpope#458 happens, we can change this again.
tpope pushed a commit that referenced this issue Jun 22, 2016
The style was changed in #343.

If #458 happens, we can change this again.
@teoljungberg
Copy link
Contributor

: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.

@tpope
Copy link
Owner

tpope commented Oct 7, 2019

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants