Answer the question
In order to leave comments, you need to log in
How to open a test in a vertical split?
Given:
the file `src/Foo/Bar/Some.php` is open
Need or a plugin that will open the test in vspli like this:
- create in vsplit
- open in the right spec/Foo/Bar/SomeSpec.php
If there are no ready-made solutions:
- how to get in vim function the path of the current file ?
- how to change it to required for subsequent transfer to `:e `?
Answer the question
In order to leave comments, you need to log in
The vim-projectionist
plugin .
The config is set via the "g:projectionist_heuristics" variable (JSON => VimL) or via the ".projections.json" file, which must be located in the root directory of the project.
{
"src/Foo/Bar/*.php": {
"alternate": "spec/Foo/Bar/{}Spec.php",
"type": "src"
},
"spec/Foo/Bar/*Spec.php": {
"alternate": "src/Foo/Bar/{}.php",
"type": "spec"
}
}
call altr#define('src/*/%.php', 'spec/*/%Spec.php')
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question