tpope/vim-projectionist

Having multiple alternatives

Closed this issue · 3 comments

I am currently using emberJS framework and I am trying to get a projectionist setup to be able to switch from component js to component hbs to component test. So I have the following but its not working. I would think I could do :A and it would show me a list which would be the hbs file, the js file, and the test file. Maybe there is another command to see tests?

{
  "app/components/*.js": {
    "type": "component",
    "alternate": "app/templates/components/{}.hbs"
  },
  "app/templates/components/*.hbs": {
    "type": "ctemplate",
    "alternate": "app/components/{}.js"
  },
  "tests/integration/components": {
    "type": "component-test",
    "alternate": "app/components/{}.js"
  }
}
tpope commented

The only time you'll get prompted by :A - or any other command - is when no file exists and it has to create one. You can use named navigation commands like :Ectemplate to jump to other files.

@tpope maybe I wont get prompted but could I get to where :A would switch between the js file, the template and the test?

tpope commented

You can configure the js alternate to be the template, the template alternate to be the test, and the test alternate to be the js file.