Question

About half year ago I decided to improve my programming efficiency, so I learned touch-typing and moved to Vim. All is fine and I feel myself much better than before. However there is a question that annoys me all that time: how should I touch-type IDENTIFIERS_WRITTEN_IN_CAPS?

  • If I will use shifts by all rules, I would have to switch hands very often. Trying to type GOOGLE in this case is a challenge.
  • If I will use just left shift holding it all the time, I would lose the physical memory of the left hand and wouldn't be able to find keys blindly.
  • If I use caps lock, I have to remember to release it. Forgetting this in Vim will lead to apocalypses in command mode. Furthermore, many remap caps lock to something else like Esc or keyboard layout switching.

How do you touch-typists deal with SQL, Makefiles, Win API, DirectX and all that stuff that requires printing in caps?

Was it helpful?

Solution

I just keep left shift pressed with my pinky finger and type normally, it doesn't seem to affect my left hand's ability to find keys. I very rarely use caps lock.

However, most of the identifiers are completed by Vim's insert mode completion, so actual typing is not that much: usually IDENTIFIERS_WRITTEN_IN_CAPS is just ID+<keyword_completion_key>

OTHER TIPS

In Vim you may try something like this:

In command mode type

:imap <Leader>u <ESC>bgUwwi

Now, in insert mode you can type it lowercase, then (also in insert mode) press <Leader>u (Leader is \ by default) and it gets uppercase, e.g.:

identifiers_written_in_caps\u

gets transformed into

IDENTIFIERS_WRITTEN_IN_CAPS

I personally just type the first letters and then press <Ctrl>-P and start using autocompletion :)

(Sadly, I've never become very proficient at touch-typing because I always use autocompletion, both in vim and in bash).

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top