VS Code Extensions You Need if You’re a Ruby Developer
By: Senada Kadric
Tags: Ruby on Rails, Ruby, Vscode, Vs Code Extensions, Web Development

Stop what you’re doing and download these VS Code extensions right now

You’ve decided to start the journey and learn how to program. Excitedly you’ve downloaded VS Code because you heard it was the best (and you’re not wrong, don’t let the ATOM users tell you otherwise). Or maybe you’ve been coding for a longer period of time, but have you been taking advantage of VS Code extensions?

Visual studio code extensions enable you to add tools to the text editor that can help make writing code faster and easier. They are meant to help you with efficiency, productivity, and can spare you from a lot of headaches. Are you excited yet?! I’ll first briefly show you how to install an extension in VS Code just in case you’ve never done it before.

You’ll want to click on this icon on the left-hand side of the screen:

Once you do, the following should open up:

Once there you can search for extensions by their name and once you’ve found the one that you want you just click install. It’s that simple!

Okay so let’s get started with an extension that is simple, but oh so very sweet.

Endwise

This lovely extension “wisely” adds the end keyword to your Ruby code. It also maintains proper indentations for the code structure!

Below is a demonstration of the extension working to create the end keyword for a method “hello_world” and for an if statement.

Never forget an “end” again!

I can’t tell you how many times I’ve gotten syntax errors from forgetting an end somewhere in my code. I’ve made it a habit to write an “end” as soon as I begin writing a method or an if statement; however, I still somehow forget it a great deal. With this extension, you don’t need to remember to write it! So many headaches and so much time will be saved! Install Endwise here.

Simple Ruby ERB

This extension makes creating and switching between ERB tags (<%= %>, <% %> and <%# %>) a BREEZE!

Below is a demonstration of creating and toggling between ERB tags with the keyboard shortcut that this extension provides, ctrl+shift+`. You can also personalize the shortcut if you’d prefer something else!

Create and toggle between ERB tags with a quick keyboard shortcut!

Wow! So quick! So easy ! I know I’ll be using this shortcut ALL THE TIME! You can find out more about this extension here.

Ruby on Rails

This extension provides you with A LOT of functionality. From providing you with all the CRUD helpers to writing out the syntax for creating a new table for your database.

Below is a demonstration of typing this extensions keyword “crud” and getting (almost) all of the CRUD methods (the “new” action is missing). It’s not perfect, as you might want to tinker with the output it gives you. For example, in the “update” method I would change the .find that it creates for you to .update. But, that’s okay! This could definitely save you a lot of time.

Here, I show you how this extension makes creating database tables in your migration files incredibly quick and easy.

There’s much more to this extension that you can play around with! You can see all of its features here.

There are also so many more extensions to check out. These were the best that I‘ve found in regards to working as a Ruby developer. They help save us time and guard against easily preventable bugs, ultimately making us better programmers. If you want to check out other VS Code extensions that go beyond just Ruby, these are some great blogs to check out — “The 25 Best VS Code Extensions” , “VS Code Extensions For Web Dev Productivity” and “60 Extensions to Supercharge Visual Studio Code”.

Thank you for reading and I hope you found this useful!