[Visual Studio Extension] Automatically format feature file on save
I'd like to be able to automatically format a feature file on save.
For example, instead of having to go to Edit > Advanced > Format document (Ctrl+K, Ctrl+D), I want the feature file I'm currently working on to automatically format itself when saved.
Visual Studio already has this ability for C# files, but it doesn't seem to work with feature files.
For example, if I make changes to a table within a step, I want the table columns to automatically get re-aligned when I save the file.
Thank you.
-
Hello, from what I known, by default Visual Studio doesn't format anything on save (even on C# files), may be there is a setting for that, but I would like that feature files behave like any other files in Visual Studio.
0 -
Right, by default, Visual Studio doesn't format documents on save.
You have to opt-in by following the instructions here: https://devblogs.microsoft.com/visualstudio/bringing-code-cleanup-on-save-to-visual-studio-2022-17-1-preview-2/
However, even after enabling code cleanup with "Format document" in the profile, feature files are not automatically formatted when saved, like C# files.
0
Please sign in to leave a comment.
Comments
2 comments