Use Virtual Replace for aligned text
gRHi<Esc>
Example
Normal mode on a literal tab followed by | value. The tab stop is 8 columns.
| valueCursor on line 1, column 1- gR Virtual Replace mode
- Hi<Esc> Hi takes the first two columns. The divider stays in column 9.
Hi | valueCursor on line 1, column 2Details & Vim help
Replace by screen columns to keep text aligned when a tab or wide character spans several columns.
Overwrite a label in column-aligned text.
On this line, ordinary R replaces the tab and the divider. Virtual Replace keeps the divider in its original screen column. It requires +vreplace.
Try it in Vim
- On a line containing a literal tab followed by | value, place the cursor on the tab and type gR.
- Type Hi.
- Press <Esc> to return to Normal mode.