1

Re: When '/' search ends in comment, 'enter' opens new line

VS 2010 Ultimate, ViEmu 2.5.9, ReSharper 5.1.

When I use '/' to search, and the search ends up in a "//" comment line, pressing 'enter' opens a new line.

The only way to get out of search mode is to press 'esc', which returns the cursor to where it was before the search.

I know this was reported earlier; I thought it was fixed in a previous release.

2

Re: When '/' search ends in comment, 'enter' opens new line

Hi, Number8. Please correct me if I'm wrong, I've only been able to reproduce this in codedoc comments, those beginning with "///". Resharper seems to intercept 'enter' keypresses when in those comment lines to implement the behavior of starting the next line with '///' automatically. The way it intercepts them doesn't allow ViEmu to get notified and do something about it, we've been trying different approaches to 'trap' the keypress before ReSharper does, but so far haven't been able to.
Even more, we've noticed that ReSharper shows inconsistent behavior even when ViEmu is uninstalled, such as sometimes inserting a new line too when selecting an entry from an intellisense listbox while in a "///" comment line, instead of inserting the selected entry text.
We'll keep on trying different approaches to try to overcome this problem, but it may be a good idea to notify JetBrains about this, and maybe ask them to make this '///' behavior optional.
Regards,

3

Re: When '/' search ends in comment, 'enter' opens new line

Thanks for the quick reply.
I didn't notice the difference in behavior with '//' vs. '///', but it is different.
I'll send a note to JetBrains.

4

Re: When '/' search ends in comment, 'enter' opens new line

VisStudio feature:
"Tools | Options | Text Editor | C# | Advanced | Generate XML documentation comments for ///" checkbox

5

Re: When '/' search ends in comment, 'enter' opens new line

#8, does that mean if you toggle that, the bug is fixed?

Thanks! - Jon

6

Re: When '/' search ends in comment, 'enter' opens new line

Jon_Symnum wrote:

#8, does that mean if you toggle that, the bug is fixed?

Thanks! - Jon

Unfortunately, no.  'Enter', while searching, still opens a new line when in a '///' comment.

7

Re: When '/' search ends in comment, 'enter' opens new line

Number8 wrote:
Jon_Symnum wrote:

#8, does that mean if you toggle that, the bug is fixed?

Thanks! - Jon

Unfortunately, no.  'Enter', while searching, still opens a new line when in a '///' comment.

It appears that 'Enter', when in a '///' comment, always opens a new line.

I tried ":qa<Enter>" -- new line opened.
"Tools->Options->C#->Advanced->Generate XML documentation comments for ///" is NOT checked.

8

Re: When '/' search ends in comment, 'enter' opens new line

Hello.

I too am using VS2010 ultimate, ReSharper 5.1, and the latest available ViEmu, 2.5.7 for Visual Studio 2010. It's been a few weeks since anyone has posted on this topic. Is there a fix / work-around for this yet? This behavior is wholly annoying.

Thanks.

9

Re: When '/' search ends in comment, 'enter' opens new line

Hello.

Just wondering if there has been any movement on this issue in the past two weeks... In other news, is the source available for ViEmu? I will look into this myself if I possible. The issue is quite annoying.

10

Re: When '/' search ends in comment, 'enter' opens new line

We'll investigate and try to find a work-around, but we're not sure it can be done. It's all due to the way R# takes control of the <return> keypress, ViEmu doesn't have a chance to intercept it and do it's thing. Sorry about this, VS's system for third-party add-ons to intercept and process keypresses is too basic. In VS pre-2010 we intercepted events at the Win32 window-message level, but now that Microsoft switched to WPF, that is impossible.

Maybe you could you get in touch with R# and ask them if they can make the behavior optional, which will remove the issue.

Sorry about the annoyance. The options available for a low-level vi/vim emulator in VS2010 are limited, and more so in the presence of other third-party sw.

11

Re: When '/' search ends in comment, 'enter' opens new line

Thanks for your reply. I will contact JetBrains and refer them to this thread as well, assuming they can see it without a login. Hopefully they will be able to help.

12

Re: When '/' search ends in comment, 'enter' opens new line

Yes, the forum is fully open to anyone. Too many spammers take advantage of that (hope to improve the anti-spam system soon). Regards, - Jon

13

Re: When '/' search ends in comment, 'enter' opens new line

I have had some emails back and forth with JetBrains, so they are at least aware of it.

In VS2010: Tools->Options->ReSharper->Advanced, Suspend ReSharper.

VS2010 and ViEmu 2.5.13 appear to behave as expected/desired.

14

Re: When '/' search ends in comment, 'enter' opens new line

I have VS2010 Viemu 2.5.13 and Resharper 5.1.1753.4 and still have the problem.

I'm going to go post the problem on jetbrains site, please post there also.

15

Re: When '/' search ends in comment, 'enter' opens new line

JetBrains ReSharper 5.1 C# Edition
Build 5.1.1727.12 on 2010-07-07T20:40:20

Plugins: none.
Visual Studio 10.0.30319.1.

ViEmu 2.5.13.

WTH?  Today, the problem doesn't manifest. 
Previously, in addition to the problem with pressing Enter to end a search, pressing Enter in normal mode opened a new line in a '///' comment...

*****   UPDATE:  WTH^2??  Problem is back.  No idea what made it go away and now return.


Oh well, problem does exist on different computer with 5.1.1753.4 installed.

(Off topic, but maybe someone here can help:  How can I find which app is stealing 'Ctrl-M' in VS2010?  I press Ctrl-M, Ctrl-L, for example, and the Ctrl-M is ignored.  Instead of toggling outlining, I delete a line...  Even in Tools->Customize->Keyboard, Ctrl-M is not recognized.)

Last edited by Number8 (2010-12-31 14:38:45)

16

Re: When '/' search ends in comment, 'enter' opens new line

Ctrl-M is stolen by an IE extension:  mswinext.exe.  (I think that is the name, it is not running right now, so I can't check.)
If you kill that in TaskManager, Ctrl-M immediately works.  This affects programs other than VS 2010.
It is such an irritant I toggled up a small util to kill mswinext, and pinned it to the task bar.