serkonda7 / vscode-vba

VBA language extension to use with VS Code. Also used for syntax highlighting on GitHub.
https://marketplace.visualstudio.com/items?itemName=serkonda7.vscode-vba
Mozilla Public License 2.0
36 stars 12 forks source link

FormattingCode_VBA #90

Open Rao0805 opened 1 year ago

Rao0805 commented 1 year ago

Describe the feature

Such as controlling indentation, setting line spacing, setting the case of tags and attribute names, etc., in order to maintain a concise and clear source code format and facilitate self maintenance when checking the program. By utilizing the features of "formatting VBA code" and "purifying VBA code", it is possible to format and purify the VBA code of existing documents, achieving a unified VBA code format, deleting useless code, fixing code errors, optimizing code, and improving code quality.

Proposed Solution

No response

Additional Information

Format the code after saving Right click to format the code

serkonda7 commented 1 year ago

I agree, this would be a helpful feature.

Rao0805 commented 1 year ago

Consider deleting empty lines

Rao0805 commented 1 year ago

If you have time to reconsider deleting comments or customizing completion keywords

serkonda7 commented 1 year ago

deleting useless code, fixing code errors, optimizing code, and improving code quality.

These should in general not be done automatically.

Formatting is purely visual unification.

A linter could mark such code and provide the developer with hints but by default never change them on its own.