How do I (using vi commands) get to a space character that is not on the same line as I am on? I need to get to the space character that is marked by the red “2” in one key sequence.
Answer
- Step 0: First you need to remember the search for [space], this will save on one keystroke later on
f[space]
-
Step 1: To start over with the search remembered
kj
-
Step 2: to move down 4 times
4j
-
Step 3: to go to the beginning of the line
0
-
Step 4: to move up 2 times
2k
-
Step 5: to move 3 words forward
3w
-
Step 6: to the very end
99e
-
Step 7: to search for backwards remembered at step 0
,
Attribution
Source : Link , Question Author : Ben Harold , Answer Author : Ilya Kharlamov