How to fill a line with character x up to column y using Vim

前端 未结 9 660
野的像风
野的像风 2020-12-23 18:17

How can I fill the remainder of a line with the specified character up to a certain column using Vim? For example, imagine that the cursor is on column four and I want to fi

9条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-23 18:31

    You can insert first your dashes and then go to the first character and enter your text in replace mode: 80i-Esc0R

    if you don't want to type the text, first delete the line with 0D, use 80i-Esc to insert the dashes and 0RCTRL+r " to paste the contents of the unamed register in replace mode.

提交回复
热议问题