Closed kirin121 closed 3 years ago
What you want isn't a perfect fit for how rails.vim works, but you could probably shoehorn it in with projections like these:
{
"app/components/*_component/component.scss": {"type": "componentstylesheet", "affinity": "model"},
"app/components/*_component/component.haml": {"type": "componentview", "affinity": "model"},
...
}
Then you'll get commands like :Ecomponentstylesheet
, :Ecomponentview
, etc, and you can map those commands to achieve the desired effect.
The weird part of that is "affinity": "model"
, which is a lie because it's a component not a model, but that will enable the commands to work with zero arguments.
Hi. Nice tool! I'm using it for years.
I'm using https://github.com/github/view_component to build Rails views. With "Sidecar directory approach" every component has it's own "example_component" dir with 3-5 files:
Is there any way to setup multiple(3-5) alternatve projections per one file and use them all with different keybindings? So i would be able to navigate from one file, for instance - "component.rb", to any of those 4 alternative files with different keybindings. Something like this:
Those keybindings just an example, maybe i will use mappings with different keys, but general idea is the same.