문제

is there a keystroke to replace a region (series of characters, whatever) with a another character (for example whitespace)? I am not searching for c, because it deletes the existing characters and lets me enter new ones, which may be less or more characters. I want to replace exactly the deleted characters with another char as with R.

For example I have this:

one two three four

and want to replace it with:

one two ----- four

If the cursor is on the beginning of three, I'd like to enter a keystroke, a region (for a example w for end-of-word) and a replacing char (in this case -) to let vim replace all characters in that region with the given replacing char.

도움이 되었습니까?

해결책

you could try:

ver-

to replace selected part with -

same, if you want to replace / fill the "region" with space, you do:

verspace

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top