Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 11-09-2008, 04:36 PM   #1
Registered: Aug 2005
Posts: 75

Rep: Reputation: 15
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
3. goto the end portion of the text
4. yank using

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 ??

Old 11-09-2008, 05:43 PM   #2
Registered: Mar 2007
Location: Plymouth, UK
Distribution: Fedora Core, RHEL, Arch
Posts: 342

Rep: Reputation: 38

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


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Shell script to remove certain portion of the text kushalkoolwal Programming 4 08-25-2008 12:17 AM
yanking/pasting text across vim sessions derzok Linux - Software 2 08-08-2008 06:00 PM
colors changed after vim6->vim7 upgrade hedpe Linux - Software 4 10-12-2006 05:42 PM
Only load last portion of a file, instead of the whole really big text file 1veedo Linux - General 2 02-20-2006 07:34 PM
Deleting text between two different patterns activeco Linux - General 7 09-13-2005 07:05 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:10 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration