Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm using gtk, and all the function names have many underscores. It gets annoying to type things like set_from_file and on_button_clicked, etc. Do you have any tips on how to type these more effectively?

share|improve this question

migrated from stackoverflow.com Aug 6 '09 at 20:47

This question came from our site for professional and enthusiast programmers.

7  
For the fastest underscore possible, you could swap the space bar and the underscore keys. –  Nosredna Aug 6 '09 at 20:32
3  
Or remap shift+space to _ ? –  sep332 Aug 6 '09 at 20:34
1  
This is a legitimate question people. I know vote to close is exciting but try to calm those itchy fingers. :P If this gets closed I'll vote to reopen. –  Spencer Ruport Aug 6 '09 at 20:41
3  
If only so much attention were spent on my more legit questions about GTK. –  Claudiu Aug 6 '09 at 20:46
1  
well it caused me to get an account here, anyway. –  Claudiu Aug 6 '09 at 21:08

10 Answers 10

up vote 13 down vote accepted

Use an editor with auto-complete functionality?

share|improve this answer
    
I agree. A decent editor will auto-complete for you. –  Brian Neal Aug 6 '09 at 20:43
    
most sane, probably. i'd first have to find a good one for python (IDLE works, but it is shoddy, and it only works if you run your code in it), and then get used to it. but could be worth it! –  Claudiu Aug 6 '09 at 20:45
    
Hmm, I think swapping the underscore and spacebar keys is more efficient. :) –  Sasha Chedygov Aug 6 '09 at 20:49
    
probs best answer, still have to find a good one for python though –  Claudiu Aug 9 '10 at 20:22
    
Komodo edit 7 is pretty good with python! –  Claudiu Sep 10 '12 at 3:38

Using a programmable foot pedal could help you out a bit.

share|improve this answer
3  
+1 for awesome. –  RJFalconer Aug 6 '09 at 22:34
    
You combine the chance to become a professional gtk programmer with the chance to become a death metal drummer. –  Stefano Borini Aug 6 '09 at 22:46
    
haha. that'd be awesome. –  Claudiu Aug 6 '09 at 23:28
    
Not a proper answer, but it sure made me laugh :] There was a 'computer stupidity' rinkworks.com/stupid/cs_mice.shtml about mouse/foot pedal (beware, very addictive website). –  Slink84 Aug 13 '09 at 6:30

Copy and paste a bunch of times.

share|improve this answer
  1. Turn on capslock.
  2. Place something heavy on the shift key.
  3. Everything you type will be in lowercase, but if you type a - it will be a _

Alternate Method:

Use an autohotkey script

#IfWinActive ahk_class gtk ; or whatever the title for the window is

;Choose one of the below
-::Send _        ; replace -'s with _'s
+space::Send _   ; replace shift+space with _'s
f3::Send _       ; replace F3 with _'s. You get the idea
share|improve this answer
1  
+0.4 for creativity. Unfortunately we round down. –  Joe Philllips Aug 6 '09 at 21:38

What's wrong with holding shift with your left hand and using your pinky from your right hand? That's what I do -- it's probably the fastest once you get used to touch typing it.

share|improve this answer
    
hmmmm... i'm using my ring finger to hit it, atm. i'll try adjusting to using a pinky and - starting now - I'll see - just = how_ ti_ goes_. i might like this. –  Claudiu Aug 6 '09 at 23:30
1  
You do have to pivot the hand a bit but you can pivot it right back __ _ __ __ __ weeeeee –  Joe Philllips Aug 7 '09 at 0:28

Use MSKLC .. I'd remap ' (dagger) to _ and _ to '.

share|improve this answer

Practice, practice, practice...

The kids (and I) like this Typing Instructor

-JFV

share|improve this answer
    
i can already type at like 140wpm; i don't know if that typing instructor is for me –  Claudiu Aug 6 '09 at 23:29
2  
The best typing tutor is The Typing of The Dead –  Dana Robinson Aug 7 '09 at 1:32
    
I learned from Mario Teaches Typing. If you got a good typing streak going, Mario blew though goombas like a samurai. –  Grant Aug 7 '09 at 12:26

Try using Autohotkey

Include a configuration like:

a::_

in this case, when you type "a", it will put a "_"

share|improve this answer
    
I'd give the example using another key... –  samuelcarrijo Aug 6 '09 at 20:37
15  
Of course, it's your choice wh_t you want to repl_ce –  mkato Aug 6 '09 at 20:38
    
The ` is a good choice. I never use that thing. And it's pretty easy to hit. Makes your left pinky super-strong. –  Nosredna Aug 6 '09 at 21:17
    
@samuelcarrijo, e::_ –  Grant Aug 6 '09 at 21:26

Hitting the underscore key isn't much harder than hitting any upper case letter, since it's just a key combined with Shift.

You can always copy it to the clipboard and type Control-V if your fingers have a problem hitting the numeric row consistently.

share|improve this answer
2  
i actually often CTRL+C annoying letters when i have to type them a lot in a particular section of code –  Claudiu Aug 6 '09 at 20:44
    
Except that it's keyboard position puts it out of reach of all but those with abnormally long and dextrous pinkies, which means your fingers have to leave the home keys. That significantly reduces typing speed. It makes a difference in any application of real size. –  Russell Steen Aug 6 '09 at 20:44

remap - key to _ so you don't have to relearn key location but can save time not hitting shift.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.