Last active
February 2, 2019 01:16
-
-
Save mathvp/5d00ea7b691815902d87a7108ef21a2d to your computer and use it in GitHub Desktop.
Custom Ruby/Rails Snippets for VSCode
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
// Custom Ruby/Rails Snippets for VSCode - Matheus Vieira | |
// Place on .config/Code/User/snippets or go to 'File > Preferences > | |
// User snippets' and create a Ruby snippet file | |
// TODO Needs to remove extra whitespaces from the feature name string | |
// https://code.visualstudio.com/docs/editor/userdefinedsnippets | |
"do": { | |
"prefix": "do", | |
"body": [ | |
"do", | |
"\t$0", | |
"end" | |
], | |
"description": "Insert 'end' after 'do'" | |
}, | |
"spec_feature": { | |
"prefix": "feature", | |
"body": [ | |
"feature '${TM_FILENAME_BASE/([_]|[a-z]*$)/${2} /g} $0' do", | |
"\tscenario 'Successfully' do", | |
"\t\t", | |
"\tend", | |
"end" | |
], | |
"description": "Spec feature" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment