vim - 可否在粘帖时保持垂直方向对齐?
系统粘帖板里有如下内容。
1 2 3 4 5 6 7 8 9 10 11 12 | <code>home
help
variables
vi compatibility
modelines
word&line completion
searching
text selection
markets
indenting
reformatting
</code>
|
我想复制到文件成下面的格式。
1 2 3 4 5 6 7 8 9 10 11 12 | <code> home
help
variables
vi compatibility
modelines
word&line completion
searching
text selection
markets
indenting
reformatting
</code>
|
请问,有无偷懒的办法?
第一次光标在行首,使用 "+p 粘帖的结果
1 2 3 4 5 6 7 8 9 10 11 12 | <code>home
help
variables
vi compatibility
modelines
word&line completion
searching
text selection
markets
indenting
reformatting
</code>
|
第二次光标在第五列,使用 "+p 粘帖的结果
1 2 3 4 5 6 7 8 9 10 11 12 | <code> home
help
variables
vi compatibility
modelines
word&line completion
searching
text selection
markets
indenting
reformatting
</code>
|
可否一次粘帖成这样?
第一次粘帖的结果,运行 %s/^/ /g
第二次粘帖的结果,运行 1,$s/^/ /g
都可以得到下面的结果,我想偷懒一次就做到这样的结果,请问,可以做到吗?
1 2 3 4 5 6 7 8 9 10 11 12 | <code> home
help
variables
vi compatibility
modelines
word&line completion
searching
text selection
markets
indenting
reformatting
</code>
|