I've implemented a new feature (that is useful at least for me) and hope that you can integrate it.
The idea is that I would like to use FSwitch for switching between implementation and test code. For SomeFile.scala my test file would be called SomeFileTest.scala. It would also be in a different directory (but b:fswitchlocs takes care of that). So I thought to introduce a new option that allows substitution over the base filename. Here is how I use it:
au FileType scala let b:fswitchdst = 'scala'
" Matches scala files that do not end with Test.scala
au BufEnter *\(Test\)\@!.scala let b:fswitchlocs = 'reg:+/main/scala+/test/scala/+' | let b:fswitchfnames='/$/Test/'
" Matches scala files that do end with Test.scala
au BufEnter *Test.scala let b:fswitchlocs = 'reg:+/test/scala+/main/scala/+' | let b:fswitchfnames='/Test$//'
Hi Derek,
I've implemented a new feature (that is useful at least for me) and hope that you can integrate it.
The idea is that I would like to use FSwitch for switching between implementation and test code. For SomeFile.scala my test file would be called SomeFileTest.scala. It would also be in a different directory (but b:fswitchlocs takes care of that). So I thought to introduce a new option that allows substitution over the base filename. Here is how I use it: