(no title)
curriculum | 4 years ago
I generally don't use counts. If I want to go down a few lines, I don't count the number of lines and use 4j or whatever, I instead use / to search for the exact place I want to move to. This feels more natural and preserves the jump-list, so I can ctrl-o back to where I was.
Same if I want to delete a few words. I don't count how many I want to delete and do 4daw, instead I do daw and press . until I've deleted everything I want gone.
And I make heavy use of text objects when available. If I want to move to the next function, I use the keybinding for that instead of searching or counting lines.
vulcan01|4 years ago
(see https://jeffkreeftmeijer.com/vim-number/)
curriculum|4 years ago
nobleach|4 years ago
anon946|4 years ago
unrealhoang|4 years ago
bombela|4 years ago
Jenk|4 years ago
Examples:
\\w -> will highlight all words after \\b -> all words before \\e -> ends of words after \\ge -> ends of words before \\fe -> all occurences of the char 'e' after \\Fe -> 'e' before \\se -> 'e' in both directions \\j -> lines after \\k -> lines before etc.
but can even use it with traditional search:
\\n -> will highlight all search-matches found by a previous "/" or "?" search after current pos. \\N -> will highlight all search-matches before.
mega useful.
dundarious|4 years ago