PDA

View Full Version : about vim dd dw dl



peter__barnes
06-21-2012, 11:56 PM
each time ,when I delete some code,the copy buffer will be replaced by the deleted word.
for example:
1 #if 0
2 #include <stdio.h>
when I move to 1,press [yy],vim will copy this line to buffer,when I press [p],line 1 will be paste ,
but if I move to line 2,use [dd],the line 2 will replace the line 1 in buffer,and each time I press [p] key,line 2 will be paste,

I just want to paste line 1, how to configure it ?(my enviroment is fedora 15)

Shakti
06-22-2012, 06:48 AM
That is because in vim dd is equivalen to "cut entire line" while yy is "copy entire line". delete a line without editing the buffer you can use the following sequence: "_d
note that the quotationmark needs to be there (this selects the buffer you want to use)