Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Resharper Auto Complete Statement

Tags:

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.

like image 837
firefly Avatar asked Nov 20 '09 21:11

firefly


People also ask

How do I autocomplete in Visual Studio?

The suggestion list of Automatic completion appears as soon as you start typing a new identifier. The suggestion list of Basic completion appears when you press the default Visual Studio IntelliSense shortcut Ctrl+Space . If necessary, you can always return to the Visual Studio's native's IntelliSense.

How do I enable autocomplete code in Visual Studio?

You can trigger IntelliSense in any editor window by typing Ctrl+Space or by typing a trigger character (such as the dot character (.)

Does ReSharper provide syntax highlighting?

Syntax highlightingReSharper extends the default Visual Studio's symbol highlighting. Additionally, it highlights fields, local variables, types, and other identifier with configurable colors. For example, ReSharper syntax highlighting allows you to easily distinguish between local variables and fields in your code.


1 Answers

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

like image 141
Andrew Serebryansky Avatar answered Oct 16 '22 05:10

Andrew Serebryansky