Reputation: 13297
Occasionally I type in some identifier incorrectly, but don't notice and then repeat the exact same mistake by using SuperTab extension. In Sublime, I would use multi-cursor to quickly edit all the instances of this typo. Typing :%s/Identfier/Identifier/g
takes longer; how can I do the same quicker and more effectively?
Upvotes: 1
Views: 79
Reputation: 195039
there are following ways I can think of to save some typing:
on one Identfier
, press *
, then :%s//Identifier/g
:s
and <c-r><c-w>
on one Identfier
, press *
, then :%s//<c-r><c-w>/g
(after <c-r><c-w>
do correction)
on one Identfier
press *
, then press qqffii<esc>n@qq
then @q
:set spell
to enable spellchecking then:
on one Identfier
press *
, then press qq1z=n@qq
then @q
Upvotes: 5
Reputation: 4878
If it's fewer keystrokes you're after, with the cursor on the offending word, press *
followed by :%s//Identifier/g
.
Short of writing a special function to prompt for the replacement then replace all occurrences of the word under the cursor, I can't think of a more succinct way to do this.
Upvotes: 2