VIM tips and tricks multiple copy and paste with buffer

1341 views
Skip to first unread message

ElectroMech

unread,
Aug 5, 2008, 12:15:49 AM8/5/08
to vglug
Hi,

I would like to share small tips for VIM.

It is to keep copy of the multiple text in to buffer and if needed we can paste it.

---
Let us start small tutorial.
------My file looks like below-------
  1 # .bashrc
  2         
  3 # User specific aliases and functions
  4
  5 alias rm='rm -i'
  6 alias cp='cp -i'
  7 alias mv='mv -i'
  8
  9 # Source global definitions
 10 if [ -f /etc/bashrc ]; then
 11         . /etc/bashrc
 12 fi

--------end of file.-----------

move to Line starting no 3
press   "ayy
this will copy line no. 3 into buffer call "a"

Again move to line no 5.
press "b3yy 
to copy 3 lines

Now move to line no. 9 and to paste buffer b

press "bp
it will paste the buffer of "b"

if you press "ap
will paste buffer all "a"

Like wise you can combine lots of thing where copy and paste can be used.

Like visual mode, v V and ctrl+v etc.etc.


Thanx.

--
Nilesh Vaghela
ElectroMech
Redhat Channel Partner and Training Partner
16, Sun Rise complex,
Nr. Mansi cross Road,
Satellite Rd, Ahmedabad
25, The Emperor, Fatehgunj, Baroda.
www.electromech.info

Sham Arsiwala

unread,
Aug 5, 2008, 12:22:41 AM8/5/08
to VG...@googlegroups.com
that's really great sir.
--
Regards
SHAM ARSIWALA.
Senior System & Network Administrator
Electromech
Baroda.

PULIN SHAH

unread,
Aug 5, 2008, 2:44:05 AM8/5/08
to VG...@googlegroups.com
hi
 
 
I would like to know  how do i install Xen Server.
 
Anybody can guide me
 
 


 
On Tue, Aug 5, 2008 at 9:45 AM, ElectroMech <elect...@electromech.info> wrote:

Nirmal Pathak

unread,
Aug 5, 2008, 2:55:02 AM8/5/08
to VG...@googlegroups.com
Hi

On Tue, Aug 5, 2008 at 12:14 PM, PULIN SHAH <spul...@gmail.com> wrote:
hi
 
 
I would like to know  how do i install Xen Server.
 
Anybody can guide me

Please start new mail thread with new subject line and post your query.
I would like you to first search VGLUG for solution which you need then post your queries so that we do not repeatedliy give solution to same qureies.
 

Have Fun!
--
Nirmal D Pathak.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
I was born free!
No Gates and Windows can restrict my Freedom!!

Enjoy Linux!
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Reply all
Reply to author
Forward
0 new messages