LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   marking-yanking/deleting a portion of text not working in vim7 (https://www.linuxquestions.org/questions/linux-newbie-8/marking-yanking-deleting-a-portion-of-text-not-working-in-vim7-682211/)

vineet7kumar 11-09-2008 03:36 PM

marking-yanking/deleting a portion of text not working in vim7
 
The following steps for yanking a portion of text in vim are not working..

1. goto the start of the text portion
2. set mark using the command
ma
3. goto the end portion of the text
4. yank using
y'a

But while pulling using p it pulls the whole lines instead of the portion of the text.

What is the problem? Am I doing something wrong ??

Regards,
Vineet

x_terminat_or_3 11-09-2008 04:43 PM

hmm,

Try going to the start of the text you want to copy.

Make sure you are in `normal' mode (press ESC)

Then type v to switch on visual mode

Now use your cursor keys up or down (vi will highlight the text)

Once you have selected all the text you want to copy, press y

Go to the location you want the text pasted and press p

Easy as pie


All times are GMT -5. The time now is 10:29 PM.