vim中复制多行

复制5到1024行之间的数据到第100行后

这儿有3种方案:

// 1 with co
:12, 1024 co 100

// 2 with co and  mark
ma // goto line 12 
mb // line 1024 
mc // line 100
:`a,`b co `c

// 3 with y
:12, 1024 y
p // goto line 100

More about co and m,see :h co and :h mark

more

  • delete mutiple lines with d
:12, 1024 de
  • move mutiple lines, with m[ove]
:12, 1024 m 100

Also more about de and m[ove],see :h de and :h move

comments powered by Disqus