Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

In Visual Studio Code, how can I get # to be auto replaced with #{} in Ruby strings

Using Visual Studio Code, how can I get # to be auto replaced with #{} in Ruby double quoted strings.

An 'autocorrect' function would do this but I don't think this is available in VS Code.

Other editors - Sublime, Atom, IntellIJ seem to have this 'out of the box'

like image 758
Ross Attrill Avatar asked Jun 04 '17 23:06

Ross Attrill


People also ask

How do I get the run icon in VS Code?

Run and Debug view# To bring up the Run and Debug view, select the Run and Debug icon in the Activity Bar on the side of VS Code. You can also use the keyboard shortcut Ctrl+Shift+D.

How do I get multiple cursors in VS Code?

VS Code supports multiple cursors for fast simultaneous edits. You can add secondary cursors (rendered thinner) with Alt+Click. Each cursor operates independently based on the context it sits in. A common way to add more cursors is with Shift+Alt+Down or Shift+Alt+Up that insert cursors below or above.


1 Answers

There is a Visual Studio Code extension called 'Auto Add Brackets in String Interpolation' by 'Ali Ariff'. It provides the required functionality.

The extension is available at: https://marketplace.visualstudio.com/items?itemName=aliariff.auto-add-brackets

like image 150
Ross Attrill Avatar answered Oct 22 '22 04:10

Ross Attrill