editorconfig / editorconfig-visualstudio

EditorConfig Visual Studio Addin
http://editorconfig.org
Other
352 stars 74 forks source link

Not working on Visual Studio 2013 #19

Open daniel-liuzzi opened 9 years ago

daniel-liuzzi commented 9 years ago

Note: moved from editorconfig/editorconfig#217.

Given the following configuration file:

.editorconfig

root = true

[*]
indent_size = 2
indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true

And the following sample file (deliberately unformatted):

sample.html (original)

<!DOCTYPE html>
<html>
<head>
<title>Lorem ipsum</title>
</head>
<body>
<p>Lorem ipsum dolor sit amet.</p>
</body>
</html>

When I open this file in Visual Studio 2013 and do Edit > Advanced > Format Document (Ctrl+E, D), the document is indented to four spaces, seemingly ignoring the .editorconfig file:

sample.html (Visual Studio 2013)

<!DOCTYPE html>
<html>
<head>
    <title>Lorem ipsum</title>
</head>
<body>
    <p>Lorem ipsum dolor sit amet.</p>
</body>
</html>

On the other hand, when I do the same thing in Visual Studio 2012, the document is indented properly:

sample.html (Visual Studio 2012)

<!DOCTYPE html>
<html>
<head>
  <title>Lorem ipsum</title>
</head>
<body>
  <p>Lorem ipsum dolor sit amet.</p>
</body>
</html>

If it matters, this is the version of Visual Studio 2013 I use:

Microsoft Visual Studio Community 2013 Version 12.0.31101.00 Update 4

And this is Visual Studio 2012:

Microsoft Visual Studio Professional 2012 Version 11.0.61030.00 Update 4

I'm running EditorConfig 0.5.0 on both.

Note that this might be related to editorconfig/editorconfig#191, though I am not 100% sure.

AuthorProxy commented 9 years ago

Confirm the bug, encoding don't change in Visual studio 2013

jamiehumphries commented 9 years ago

I'm having the same problem, setting indent_size for [*.html] or [*.cshtml] does not make the necessary changes under Tools > Options > Text Editor > HTML.

mleanos commented 8 years ago

Not working in Visual Studio 2013 Ultimate for me.

Any work around out there?

CodeZombieCH commented 8 years ago

Same problem here

Microsoft Visual Studio Professional 2013 Version 12.0.40629.00 Update 5 with JetBrains ReSharper Ultimate 10.0.2 Build 104.0.20151218.120627 installed