4 ms·
Oh man, I knew there had to be a way to do that but I couldn't find it, so I always resorted to counting the number of characters in the match and then use cl<n
by simias 6y ago
Oh man, I knew there had to be a way to do that but I couldn't find it, so I always resorted to counting the number of characters in the match and then use cl<num> to replace it if there was no convenient motion like some kind of barbarian.
- bobbyi_settv 6y agoThe non-barbarian way to avoid counting characters when there's no convenient motion is visual mode. Hit v, then hit l until you've highlighted the part you want to change, then hit c to start changing it.
- simias 6y agoOh I never thought about that either. Thank you.
- bobbyi_settv 6y agoI rarely actually do it because f and t motions, possibly with a number, can usually handle these cases. For example, c3tA to change up to but not including the third capital A after the current position
- tasuki 6y agoIf it's more than one 'A' I'd use visual mode. I'm always impressed people can accurately count up to like three ;)
- gnubison 6y agoc<num>l is equivalent to <num>s (unless you've installed a plugin that binds s to something else).