Skip to content

Instantly share code, notes, and snippets.

@koryteg
Last active September 16, 2019 21:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save koryteg/c7823962ba843ed71e9ee1bdf894c2bc to your computer and use it in GitHub Desktop.
Save koryteg/c7823962ba843ed71e9ee1bdf894c2bc to your computer and use it in GitHub Desktop.
vim test workflow in vs code
//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