codecadwallader / codemaid

CodeMaid is an open source Visual Studio extension to cleanup and simplify our C#, C++, F#, VB, PHP, PowerShell, JSON, XAML, XML, ASP, HTML, CSS, LESS, SCSS, JavaScript and TypeScript coding.
http://www.codemaid.net
GNU Lesser General Public License v3.0
1.91k stars 359 forks source link

Remove multiple white spaces between xaml attributes #810

Open fabianoriccardi opened 3 years ago

fabianoriccardi commented 3 years ago

Environment

Description

Is it possible to remove white spaces between attributes in XAML?

Current vs Expected behavior

  1. In an empty mainwindow.xaml, if a type the following in the element
  2. mc:Ignorable="d"     Name="Window"
  3. I would get
  4. mc:Ignorable="d" Name="Window"
codecadwallader commented 3 years ago

Thanks for the suggestion. CodeMaid invokes Visual Studio's formatting, and within Visual Studio there are some options related to how attributes are spaced out. Take a look at Tools->Options->Text Editor->XAML->Formatting->Spacing

image

fabianoriccardi commented 3 years ago

I didn't know this, thanks for pointing me out! In General tab there is also the option to specify the maximum line length. It would be nice if these options will be integrated in codemaid, so they can be shared in CodeMaid.config