Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do touch typists navigate in vi?

I'm learning vi, as I appreciate the vast possibilities of the editor, and have to use a plain-text editor for my current project. In many tutorials I have read that it is recommended to use the keys "h", "j", "k" and "l" instead of the arrow keys, for the sake of speed.

However, as a touch typist, my fingers are normally in the default position of a, s, d, f (left hand) and j, k, l and ö (right hand [german keyboard]). Navigating in vi requires effectively to place the right hand in the default position of h, j, k and l. This makes writing text correctly hard, as I notice constantly that I start to type text, when my right hand is in the "vi right hand position" instead of the "touch-typing right hand position".

As a touch typist, have you adapted your hand memory so that you have switch the position depending on the vi mode, or have you found some other solution? I would appreciate experiences and tips from experienced touch typists using vi.

like image 827
simon Avatar asked Sep 09 '09 12:09

simon


People also ask

What is the correct typing position for the right hand?

Standard touch typing teaches us the home position for the right hand has the index finger on the j key, so your fingers are on jkl;. But standard vim motion keys are hjkl.

What is the correct way to use VI?

I think that jkl; is actually the more appropriate usage for vi. For one, h and l really don't matter that much. w, e, and b are significantly more useful for horizontal navigation. As a bonus, ; is easy to get at if the language requires it.

What are the different types of navigation in Vim?

Following are the three navigation which can be done in relation to text shown in the screen. H – Go to the first line of current screen. M – Go to the middle line of current screen. L – Go to the last line of current screen. ctrl+f – Jump forward one full screen. 3. Vim Special Navigation

How to navigate line by line in Vim?

Following are the four navigation that can be done line by line. By using the repeat factor in VIM we can do this operation for N times. For example, when you want to go down by 10 lines, then type “10j”. Within a line if you want to navigate to different position, you have 4 other options.


1 Answers

I still keep my fingers on the home keys for touch typing, and just reach for the keys I want. My index finger is used for both h and j. I'm not often switching between h and j anyway, so it doesn't slow me down.

I find I use w, b, 0, f and / to navigate though, not so much with h, j, k and l.

BTW. I found it really hard to write this message into the browser text box. When typing about vi keys, my fingers naturally wanted to use them. Please excuse any extraneous characters :-)

like image 172
camh Avatar answered Oct 04 '22 02:10

camh