lmscloud-io / mdlcode-docs

5 stars 3 forks source link

Feature request: Replace with lang_string #15

Closed FMCorz closed 3 months ago

FMCorz commented 3 months ago

I absolutely love the ability to select text and transform it to a new language string, or re-use an existing one. It would be fantastic if there was a choice between using a get_string call, or new lang_string call. The need for lang_string became apparent to me when working with the report builder that requires them in quite a few places.

Thanks!

marinaglancy commented 3 months ago

Thanks for suggestion Fred, added in version 1.0.34 released 2024-09-01

Place the cursor anywhere on the get_string call, and choose "Replace with new lang_string()" from the code actions (yellow lightbulb or Ctrl+. )

This is an extra step when you transform a text into a string but otherwise the replacement menu would have too many options. And also I thought that converting get_string to lang_string (and vice versa) is a useful action even when you do not transform text. Hope you agree :)

FMCorz commented 3 months ago

Thanks @marinaglancy!