aspnet / Tooling

Issue tracker and info on Visual Studio tooling for ASP.NET
Other
256 stars 123 forks source link

Enter key doesn't work at the end of an @taghelper line in _ViewImports file. #945

Closed srivatsn closed 6 years ago

srivatsn commented 7 years ago

From @MarkMichaelis on January 16, 2017 21:42

When working in a _ViewImports file, the ENTER key doesn't work at the end of the @addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers line.

cc: @GrantErickson, @jinujoseph

Copied from original issue: dotnet/roslyn-project-system#1194

scottaddie commented 7 years ago

It's worth noting that the ENTER key does work if you first hit the space bar at the end of the line. This seems to take the @addTagHelper line out of read-only mode.

mlorbetske commented 7 years ago

TFS Bug#369170

NickCraver commented 7 years ago

I didn't see this when searching, more info from my dupe here: https://github.com/aspnet/Razor/issues/1045

This is a weird one. The editor basically acts as if the enter key doesn't work immediately following this helper.

VS 2017 Build: 15.0.0+26288.0 Repo: https://github.com/MiniProfiler/dotnet/ File: samples/Samples.AspNetCore/Views/Shared/_Layout.cshtml

When adding a directive like this (no quotes):

@addTagHelper *, MiniProfiler.AspNetCore.Mvc

If your cursor is at the end of the line right after the c, the enter key just doesn't work. It has no effect, no new line is inserted. The key command goes into a black hole of an uncaring cosmos never to return.

Workarounds

Apologies if this is a duplicate, I couldn't find anything on it and just came across it today.

Roblinde commented 7 years ago

Another workaround:

It sure is annoying though.

alexgav commented 6 years ago

This is fixed. The fix will be in VS 2017 15.5