Touch uppercase identifiers

About six months ago, I decided to improve my programming efficiency, so I learned to type on the touch screen and switched to Vim. Everything is in order and I feel much better than before. However, there is a question that annoys me all this time: how do I touch a type IDENTIFIERS_WRITTEN_IN_CAPS?

  • If I use shifts according to all the rules, I will have to switch hands very often. Trying to enter GOOGLEin this case is a problem.
  • If I use the left shift while holding it all the time, I will lose the physical memory of my left hand and cannot find the keys blindly.
  • If I use caps lock, I have to remember about its release. Forgetting it in Vim will lead to apocalypse in command mode. In addition, many drag and drop blocks are locked onto something else, such as Esc or a keyboard layout.

How do you touch the machinists with SQL, Makefiles, Win API, DirectX and all that is required for printing in caps?

+3
source share
3 answers

I just keep the left shift pressed with my little finger and type normally, this does not affect my left ability to find keys. I very rarely use cap locks.

However, most identifiers end with the completion of insertion in Vim mode, so the actual typing is not so much: usually it IDENTIFIERS_WRITTEN_IN_CAPS’s just ID+<keyword_completion_key>

+6

Vim - :

:imap <Leader>u <ESC>bgUwwi

, ( ) <Leader>u ( ), , :

identifiers_written_in_caps\u

IDENTIFIERS_WRITTEN_IN_CAPS
+7

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

(Unfortunately, I never became very experienced at typing, because I always use autocomplete in both vim and bash).

0
source

Source: https://habr.com/ru/post/1751559/


All Articles