Copy/Print auto-generated editor text?
Answered
For named parameters, the editor adds the name in light grey letters even though it's not part of the language. Similarly, for Dart, the editor can add closing labels as comments, but it doesn't add these to the files. So when I copy/paste the code, these labels don't appear in the pasted version. Is there a way that I can copy the code so that this additional text can be pasted elsewhere?
Please sign in to leave a comment.
There is no way to do that at the moment, request is welcome at https://youtrack.jetbrains.com/issues/IDEA. Please describe the use case in the ticket. IDE can add editor hints, should they also be copied? Note that such code will not compile if you paste is somewhere.
I'll submit a request. Also, in Dart, I'm looking at the Editor->Code Style options. Is there a way to set it so that I don't get two closing parentheses on the same line as in
Do you have
[✔] Use the dartfmt tool when formatting the whole fileenabled in Settings | Editor | Code style | Dart? When it's enabled (and it's ON by default), IDEA ignores its own code style preferences and usesdartfmttool from Dart SDK.Dart language authors believe that there is only one correct way to format Dart apps, so other options are there for historical reasons only, they will be removed in next versions. If you think that the official Dart code style has to be changed, please file a request to Google, https://github.com/dart-lang/dart_style/issues