Reputation: 810
I have file:
word some other word
(10 spaces after word)
I want to replace word without change line length
Example:
new word some other word
(6 spaces after word)
Is it posible in vim?
I now only one solution c
l
8
but I should know length of new word
to do it.
Upvotes: 1
Views: 68
Reputation: 40947
You can use R to enter Replace mode. This allows you to type new word
"over" word
without modifying the amount of space. The downside of this is if you wanted to replace a longer word with a shorter word you would have to "blank" out the extra characers from the old word.
See :help R
and :help gR
for more info.
Upvotes: 2