Last active
September 16, 2019 21:22
-
-
Save koryteg/c7823962ba843ed71e9ee1bdf894c2bc to your computer and use it in GitHub Desktop.
vim test workflow in vs code
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
//this file is an example of using leader + t to runn the current spec in vs code. | |
// you need two extentions: | |
// vim-mode | |
// rails run specs | |
// once those are installed add this to the config: | |
{ | |
"vim.normalModeKeyBindingsNonRecursive": [ | |
{ | |
"before": ["<leader>", "T"], | |
"commands": ["extension.runFileSpecs"] | |
}, | |
{ | |
"before": ["<leader>", "t"], | |
"commands": ["extension.runSpecLine"] | |
}, | |
{ | |
"before": ["<leader>", "l"], | |
"commands": ["extension.runLastSpec"] | |
} | |
] | |
} | |
// by default it is setup for rspec, but if you are using minitest you can change the default command and file pattern like so: | |
{ | |
"ruby.specCommand": "rails test", | |
"ruby.specPattern": "test" | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment