20

Jan 09

How to copy data in VI editor

vi first  <span style="color: green;">edit source file</span>
<span style="color: teal;">then move your cursor to start of selection</span>
ma       <span style="color: green;">mark current position with letter a</span>
<span style="color: teal;">then move your cursor to end of selection</span>
y'a     <span style="color: green;">yank to buffer x from current position to mark a</span>
:e other  <span style="color: green;">edit target file</span>
<span style="color: teal;">move cursor to where you want the data</span>
p       <span style="color: green;">put from buffer x</span>

No comments yet, be the first.

Leave a Reply