Is this for real? Do you count the number of lines or characters before you move? Do you look at line numbers and do the arithmetic in your head? This can't be right, right?
I think most people use commands like f) (move to to the next ')' on the current line) more often than something like 12k (move twelve chars to the right), because, like you say, counting chars is slower than mashing 'k'.
People just use 12k because it's a simple example of how vim commands can be chained together. As a less-contrived example, you can do 2f) to move to the second ')' on the current line.
I "bookmark" important lines with named markers "ma", "mb", etc for "a" and "b" markers respectively, available as 'a, 'b.
Not to mention cscope or ctags for finding function declarations, various call chains, etc., etc.
There are quite a few ways to get around.
For example, if you want to delete 3 words, there is an action to delete (d) and a motion to move forward one word (w): 3dw (read (3) times, (d)elete (w)ord)
If you want to delete everything up to a closing bracket, there's a motion to move to the next occurrence of a character (t): dt) (read (d)elete (t)o ')')
It becomes much more productive when you're thinking in terms of composing actions and motions to achieve a goal rather than memorizing situational key combos. The hardest part is getting over the hump of memorising the actions and motions.
Relative line numbers aren't even too important, given that there is a motion to jump to a line number. If you have a function that you can see starts at line 6 and ends at line 14 and I want to move it to the top of the file. You want to go to line 6 (6G), delete (d), go to line 14 (14G - thus applying the delete action to the motion of moving from line 6 to line 14) then go to line 1 (1G) and paste (P).
I prefer to use d3w since it feels more like English. It's also more compatible with other combinations like ci" ('change inside quotes', e.g. to change a string), ca" ('change around quotes', e.g. to replace a string with a constant), or yt{ ('yank to brace').
Various semantic movements help a lot, too. But I never stress on hitting the target exactly, I'd rather get nearby without thinking than stop and think to get there in one command.
set number
set relativenumber
This turns your line numbers into a hybrid mode that show the numbers relative to your cursor and the actual line number your cursor is currently on.For (a little) more, see:
In addition to counting motions, other great options for getting around include:
% jump to the matching brace/bracket/paren
( jump back a "sentence"
) jump forward a "sentence"
{ jump back a "paragraph"
} jump forward a "paragraph"
Also, getting around by searching can be hugely worthwhile. n jump to the next occurrence of the last search
N " " " previous " " " " " "
* jump to the next occurrence of the word under cursor
# " " " previous " " " " " "I'm now off to read "cmdline.txt" (:help Command-line).
BTW, I just accidentally closed my browser tab (latest version of Firefox) by hitting Ctrl-W when I wanted to delete the previous word in this textbox. That used to drive me mad but when Firefox restored the tab, it also restored the text I'd typed. :)