11# Rspec Focus
22
3- Add and clear ` : focus` tag in RSpec files.
3+ Add and clear focus tag in RSpec files (default ` :focus ` , configurable) .
44Ported from Atom's [ package] ( https://github.com/traviskroberts/atom-rspec-focus ) by [ @traviskroberts ] ( https://github.com/traviskroberts ) .
55
66This extension also available at [ Open VCX] ( https://open-vsx.org/extension/asux/rspec-focus ) .
@@ -9,14 +9,23 @@ This extension also available at [Open VCX](https://open-vsx.org/extension/asux/
99
1010With this extension you can:
1111
12- - add ` : focus` tag to nearest RSpec test (moving upwards from cursor)
13- - clear all ` :focus ` tags from current buffer
12+ - add the configured focus tag to nearest RSpec test (moving upwards from cursor)
13+ - clear all instances of that tag from current buffer
1414
15- Keymaps
15+ ### Configurable focus tag
1616
17- ` ctrl-alt-cmd-t ` - Add ` : focus` tag to closest ` it ` , ` describe ` , ` context ` , ` feature ` , ` scenario ` , ` shared_examples ` , ` shared_examples_for ` , ` shared_context ` , ` include_context ` , ` include_examples ` , ` it_behaves_like ` block.
17+ The tag used for focus is configurable (default: ` focus ` , e.g. ` it 'example', :focus do ` ). You can switch to ` wip ` or any other symbol:
1818
19- ` ctrl-alt-cmd-z ` - Clear all ` :focus ` tags from current open buffer.
19+ - ** Settings (UI):** Open Settings, search for “RSpec Focus” or “focus tag”, and set ** Focus Tag** (e.g. ` wip ` ).
20+ - ** settings.json:** Add ` "rspec-focus.focusTag": "wip" ` (or another name). The value is the symbol name without the colon.
21+
22+ Add and Clear commands always use the current setting, so you can use ` :focus ` for normal runs and e.g. ` :wip ` for work-in-progress.
23+
24+ ### Keymaps
25+
26+ ` ctrl-alt-cmd-t ` — Add the configured tag to the closest ` it ` , ` describe ` , ` context ` , ` feature ` , ` scenario ` , ` shared_examples ` , ` shared_examples_for ` , ` shared_context ` , ` include_context ` , ` include_examples ` , ` it_behaves_like ` block.
27+
28+ ` ctrl-alt-cmd-z ` — Clear all instances of the configured tag from the current buffer.
2029
2130## Release Notes
2231
0 commit comments