Vscode-ruby: String Interpolation Should Automatically Add Closing Bracket

Created on 2 Oct 2017  路  5Comments  路  Source: rubyide/vscode-ruby

Your environment

  • vscode-ruby version: 0.15.0
  • Ruby version: 2.4.1
  • VS Code version: 1.16.1
  • Operating System: MacOS 10.12.6

Expected behavior

When typing a Ruby string with String interpolation, for example a puts statement, the closing bracket of the string interpolation should automatically appear. For example, when I type this:

puts "test_str = #{

Then the closing bracket should immediately be filled in:

puts "test_str = #{}

Actual behavior

The closing bracket does not get filled in automatically, which is very annoying.

Steps to reproduce the problem

Nothing else to really mention regarding steps to reproduce. I am personally curious if this is a bug in the VSCode IDE itself or specific to this extension.

Most helpful comment

I in fact think that the feature should go one step further and think that anytime you type in and hashtag inside of double quotes that are not escaped the editor should add both curly braces.

All 5 comments

I in fact think that the feature should go one step further and think that anytime you type in and hashtag inside of double quotes that are not escaped the editor should add both curly braces.

I opened this same issue in #200. Want to close this one, so we don't have duplicates?

I don't mind closing to remove duplicates, but I want to see if @jeffpereira 's concern will still be address.

His expected behavior is what I have in the "Expected behavior" section of my open issue.

Hi, I created a solution specifically for this issue. Feel free to try it out.

https://marketplace.visualstudio.com/items?itemName=aliariff.auto-add-brackets

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mmarinaccio picture mmarinaccio  路  3Comments

webmastak picture webmastak  路  4Comments

Snake-Sanders picture Snake-Sanders  路  4Comments

archfish picture archfish  路  5Comments

ghost picture ghost  路  4Comments