alternate-file / vscode-alternate-file

Switch to and create spec files for any framework in VS Code
https://marketplace.visualstudio.com/items?itemName=will-wow.vscode-alternate-file
MIT License
33 stars 7 forks source link

Enable cycling in a "ring like" fashion #25

Open benjamin-thomas opened 2 years ago

benjamin-thomas commented 2 years ago

Hello, great job so far :)

Is this project still active?

Given this projection file:

{
  "lib/**/controllers/*_controller.ex": {
    "type": "controller",
    "alternate": "lib/{dirname}/views/{basename}_view.ex"
  },
  "lib/**/views/*_view.ex": {
    "type": "view",
    "alternate": "lib/{dirname}/templates/{basename}/index.html.heex"
  },
  "lib/**/templates/*/index.html.heex": {
    "type": "template",
    "alternate": "lib/{dirname}/controllers/{basename}_controller.ex"
  }
}

I'd like to be able to go to the controller, then the view, then the template, and back to the controller.

This is the behavior of the vim plugin.

At the moment, I can only toggle between the controller an the view.

lemomar commented 5 months ago

This would be nice for sure, I might look into opening a PR for it

bschlenk commented 6 hours ago

I'd love this too, with the possibility that a file might not exist.

I have this set up for our storybook, to jump between the *.stories.tsx file and *.mdx file. But sometimes there is also a *.stories.module.css file I'd like to include in the ring.