Jump to content

Autocomplete double quotes, braces, parens ... how is it used

3.14159

Hello,

 

As a very new programming student I am a bit confused by the "autocomplete" feature. Specifically I'd like to talk about the double quotes (programming in C). If I write something in double quotes and the second double quote is auto-generated, I still have to arrow over the character in order to close the parens or do whatever next.

 

Am I doing something wrong? I feel like using the arrow key to skip over the auto-generated double quote is in no way a time saver compared to just typing <shift> + <">. Cognitively I find it easier to just type the second <"> naturally. Same with parens and even braces.

 

I feel like I'm not using this feature right, is there another key to press that will automatically skip you to the end of the autocompleted text or something?

 

Sorry if this is question is too basic - I'm literally brand new to this stuff. Looking forward to your responses!

 

edit: in case anyone is wondering I'm referring to this feature as used in codewars.com editor, but I believe I've seen it around other places too.

Edited by 3.14159
see edit
Link to comment
Share on other sites

Link to post
Share on other sites

Intelligent code completion when it comes to stuff like braces or quotes may not appear to be a time saver in some instances but at the very least it reminds you to put them in. It cuts down on syntax errors which ultimately stops you from sifting through your code. Although the compiler will most likely point you to the line sometimes its not always immediately evident where you missed a brace or what not. So the real gain is when you press your shortcut to compile and it just works.

CPU: Intel i7 - 5820k @ 4.5GHz, Cooler: Corsair H80i, Motherboard: MSI X99S Gaming 7, RAM: Corsair Vengeance LPX 32GB DDR4 2666MHz CL16,

GPU: ASUS GTX 980 Strix, Case: Corsair 900D, PSU: Corsair AX860i 860W, Keyboard: Logitech G19, Mouse: Corsair M95, Storage: Intel 730 Series 480GB SSD, WD 1.5TB Black

Display: BenQ XL2730Z 2560x1440 144Hz

Link to comment
Share on other sites

Link to post
Share on other sites

Gotchya, that makes sense. Maybe when I start writing code that requires more than a dozen lines I'll appreciate this feature more.

Link to comment
Share on other sites

Link to post
Share on other sites

If the autocompleted double quote requires the same amount of keystrokes as manually typing it, that would make it a good thing, right? Since that way you can never forget and it's not any more keystrokes.

These sorts of handy features is something that will become second nature once you start programming more.

 

Of course it's always good to remember how to do things manually, but I can't remember the last time I manually typed a "for"-loop (instead of typing for and pressing Tab twice, which is the short-hand in Visual Studio).

"We're all in this together, might as well be friends" Tom, Toonami.

 

mini eLiXiVy: my open source 65% mechanical PCB, a build log, PCB anatomy and discussing open source licenses: https://linustechtips.com/topic/1366493-elixivy-a-65-mechanical-keyboard-build-log-pcb-anatomy-and-how-i-open-sourced-this-project/

 

mini_cardboard: a 4% keyboard build log and how keyboards workhttps://linustechtips.com/topic/1328547-mini_cardboard-a-4-keyboard-build-log-and-how-keyboards-work/

Link to comment
Share on other sites

Link to post
Share on other sites

Yes, once I start programming more. At the moment (and with my current very short scripts) I find it more of a distraction or mild hinderance. I have to restrain myself from typing <shift> <"> and instead arrow over. Obviously this is a minor gripe, mainly wanted to see if I was even using it right lol.

 

Like you said, with more practice I'm sure this will become natural.

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×