vscode-rust icon indicating copy to clipboard operation
vscode-rust copied to clipboard

Consider adding ${file_name} and etc.

Open KalitaAlexey opened this issue 8 years ago • 4 comments

Hello everybody.

I am opening this issue because I was asked in https://github.com/KalitaAlexey/vscode-rust/issues/66

I think that such feature may be very useful.

One unresolved question is that which variables to add.

I have a list:

  • base_name: examples/ex.rs => ex
  • file_name: examples/ex.rs => ex.rs
  • relative_path: examples/ex.rs => examples/ex.rs
  • absolute_path: examples/ex.rs => path/to/workspace/examples/ex.rs

I want it to be substituted when it is used as:

  • an argument in any of "*Args"
  • an argument of "args" in any of "custom*Configurations"

What do you think about it?

Thanks

KalitaAlexey avatar Feb 10 '17 17:02 KalitaAlexey

https://code.visualstudio.com/Docs/editor/tasks#_variable-substitution

ancwrd1 avatar Feb 11 '17 08:02 ancwrd1

@dremon, It is interesting. I will think about it.

KalitaAlexey avatar Feb 11 '17 08:02 KalitaAlexey

If someone wants to implement it, you should copy the implementation from https://github.com/Microsoft/vscode/blob/a33f2a234ab28d04d8f4abd2d15808fe013a5201/src/vs/workbench/services/configurationResolver/node/configurationResolverService.ts

KalitaAlexey avatar Feb 16 '17 16:02 KalitaAlexey

FWIW, I'd find this very useful. Similarly, the ability to run tests in current file (when in the top-level tests directory) would be great.

TedDriggs avatar Jun 06 '17 23:06 TedDriggs