How to Configure Ruby Snippets for VS Code

Chris Demahy
1 min readJan 29, 2021

--

How to set-up snippets for Ruby (or any language) in Visual Studio Code

My Snippet for a new class when working in OO ruby

Recently while learning Object-Oriented ruby, I have learned that some pieces of code get written continuously over and over each time the developer wants to define a new class. When defining relationships in OO-Ruby, some instance and class definitions start to become tedious when writing a dozen new classes in a day.

Many of you now might be saying ‘Chris, vs code has ruby extensions that add these amazing snippets that add.…’ When you make your own their more useful… trust me

Thankfully, vs code has some features built-in that relieves the headaches of writing these same pieces of code over and over. We can take these pieces, or snippets, of code and teach them to VSCode so that we never have to write them fully again.

--

--

Chris Demahy

Technology Enthusiast, Software Engineer, Git Issue Perfectionist.