English 中文(简体)
Resharper Auto Complete Statement
原标题:
  • 时间:2009-11-20 21:45:17
  •  标签:
  • resharper

I know it s probably something easy, but I just couldn t figure it out.

Say I have the following code

string name;

name.LastIndexOf("aaa");

After I type the single quote Resharper will added another for me so I have

name.LastIndexOf("")

After I type aaa I have name.LastIndexOf("aaa|") but now my caret | is sitting inside the double quote...

How do I tell Resharper that I am done so it can add the ; and move to the next line without using the mouse or the direction key?

Perhaps I didn t make myself clear. Using the End key is not much different from the directional key. I was looking for a one step key stroke that will tell Resharper to complete the statement and move to the next block. I think it certain possible since Resharper is so smart. I just couldn t figure it out.

最佳回答

You can actually use the Complete Statement feature (which is mapped to Ctrl+Shift+Enter in ReSharper 2.x and IntelliJ IDEA keymap). This will put ; at the end of the statement and move the caret to the next line

问题回答

You can type "), just as you would normally, or press the End key.

At that point ReSharper isn t waiting for you to complete a template so you ll need to type [End]; to move to the end of the line and complete the statement.





相关问题
Resharper Exception rethrow possibly intended

Consider this method (pardon the sad attempt at Chuck Norris humor :) ): public class ChuckNorrisException : Exception { public ChuckNorrisException() { } public ChuckNorrisException(...

Resharper Auto Complete Statement

I know it s probably something easy, but I just couldn t figure it out. Say I have the following code string name; name.LastIndexOf("aaa"); After I type the single quote Resharper will added ...

Resharper Suggestion Color Issue

I have a strange bug in resharper 4.5 in VS 2005. Instead of doing the usual underline for a suggestion -- IE: telling me that a using statement is unnecessary, it is setting the background to red in ...

StyleCop for ReSharper

I like stylecop and we use it to enforce coding standards. I dont like the fact that there is no way to automatically fix problems. So was thinking of making a plugin. Once I realised that 2010 is ...

How to repair Resharper?

I have problem with Resharper - all it s menu options are greyed, no shortcuts working... I ve tried run installer with repair option - no success Also tried uninstall / install back - same.. :( ...

Shortcut to turn on Resharper

Usually I start VS2008 without Resharper because it makes VS startup way too slow and I just need to fix a bug. But sometimes, I do want to turn on Resharper. Is there a way to setup a keyboard ...

热门标签