简体   繁体   中英

Visual studio auto complete and commas

after moving from netbeans to visual studio 2012, theres a feature of the editor i cant seem to find and it saves a lot of time (1 key), it is the following:

Say you are typing a function call or definition or something like, this.doSomething(someString), note that doSomething autocompletes when i see it in the small popup and press '(' which also auto completes the closing ')'. Now im only left to type the parameters inside, i proceed to write someString, and here comes the problem! Now the cursor is in ....(someString|) so i have to move 1 right and then write the ';'. However, in netbeans i could simply write the ';' and it would correctly place it at the end of the line, im not sure if im explaining myself...

this.doSomething(someString;) ==> This is what i get in VStudio and i dont like this.doSomething(someString); ==> This is what i want.

you can go to the end of the line with TAB.

Write "this.d", type TAB complete to

this.doSomething

type "(" obtain

this.doSomething()

then write "someS" and TAB complete to

this.doSomething(someString)

cursor is between "g" and ")". Type TAB again and cursor go after ")". Complete with ";"

this.doSomething(someString);

So, you have type "this.d TAB (someS TAB TAB ;"

There is no way to do what you exactly want, but with TAB you can save much typing.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM