Skip to content
This repository has been archived by the owner on Mar 3, 2023. It is now read-only.

Ruby completion still spits out regexes #1207

Closed
jnunemaker opened this issue Dec 4, 2013 · 9 comments
Closed

Ruby completion still spits out regexes #1207

jnunemaker opened this issue Dec 4, 2013 · 9 comments
Labels

Comments

@jnunemaker
Copy link

When I type the following in ruby file:

something do<tab>

I expect this:

something do |<cursor here>|

end

But I get this:

response.each do${1/(^(?<var>\s*[a-z_][a-zA-Z0-9_]*\s*)(,\g<var>)*,?\s*$)|.*/(?1: |)/}variable${1/(^(?<var>\s*[a-z_][a-zA-Z0-9_]*\s*)(,\g<var>)*,?\s*$)|.*/(?1:|)/}

end

Several other tab completion things do the same in ruby.

@jnunemaker
Copy link
Author

It has been like this for a while, but I'm trying to be diligent about reporting everything I run into that slows productivity. Feel free to dup it or what not, but I have a terrible time finding related issues in the atom org. Thanks!

@kevinsawicki
Copy link
Contributor

Just to confirm, you would expect:

something do |<cursor here>|

end

and not:

something do
  |<cursor here>|
end

@kevinsawicki
Copy link
Contributor

This shows how bad my ruby is, nevermind.

@kevinsawicki
Copy link
Contributor

I fixed this one but other ones may still have a similar issue until we fully support TextMate snippets, refs #483

@jnunemaker
Copy link
Author

The syntax for this is:

something do |some_var|
  puts some_var
end

So ideally it selects the contents between the pipes on the first tab and the second tab would be right before where the puts line is, if that makes sense.

@kevinsawicki
Copy link
Contributor

@jnunemaker Can you grab atom 0.41.0 from atom.io and give it a spin and see if you like the new do snippet?

@jnunemaker
Copy link
Author

@kevinsawicki I could 👄 you.

@jnunemaker
Copy link
Author

👏 👏 👏 👏 👏 👏 👏 👏 👏 👏 👏 👏 👏 👏 👏 👏 👏 👏

@lock
Copy link

lock bot commented Jan 27, 2019

This issue has been automatically locked since there has not been any recent activity after it was closed. If you can still reproduce this issue in Safe Mode then please open a new issue and fill out the entire issue template to ensure that we have enough information to address your issue. Thanks!

@lock lock bot locked as resolved and limited conversation to collaborators Jan 27, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants