LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 04-12-2006, 10:10 AM   #1
Valhalla
Member
 
Registered: Nov 2004
Location: Atlanta
Distribution: Gentoo 2005.1, Ubuntu 5.10
Posts: 267

Rep: Reputation: 30
Silly vim question


One of my friends suggested that I start learning vim, and because I have an abundance of time on my hands, I decided I would, and have since enjoyed learning immensly. However, one of the commands I came across that would be useful is yanking or cutting text into registers. The instruction manual said that if I wanted to yank a line into register a, I would just hit ayy. However, this throws me into insert mode at the end of the line and inserts yy. Similarly, b already means something else as well. Did I misunderstand the instructions, or is there an extra step involved. I was fairly certain there are 26 named registers that correspond to letters. Anyway, thanks for any help.
 
Old 04-12-2006, 10:25 AM   #2
geeman2.0
Member
 
Registered: Feb 2005
Location: Ontario, Canada
Distribution: Gentoo, Slackware
Posts: 345

Rep: Reputation: 30
The human mind tends to ignore quotation marks in commands because it looks like the command is being quoted.

You need to type "ayy
Not ayy.

Then to paste, "ap

a on its own of course means append and insert mode.
 
Old 04-12-2006, 10:25 AM   #3
anon237
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
Hi,

That (ayy) should be "ayy.

To place buffer content (a in this example) before cursor: "aP
To place buffer content after cursor: "ap

BTW: They are called buffers, not registers

Hope this clears things up.

Last edited by anon237; 04-12-2006 at 02:09 PM.
 
Old 04-12-2006, 02:38 PM   #4
Valhalla
Member
 
Registered: Nov 2004
Location: Atlanta
Distribution: Gentoo 2005.1, Ubuntu 5.10
Posts: 267

Original Poster
Rep: Reputation: 30
Thank you both. A whole bunch of things just got much easier.
 
  


Reply

Tags
buffer, vi, vim


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
Really silly question... godhugh Linux - Newbie 1 01-04-2005 11:29 AM
silly question bruj3w Slackware 3 08-20-2004 12:51 PM
silly question ramu_ak Linux - General 2 03-24-2003 09:45 AM
Silly Question MattB Linux - Software 1 06-05-2002 11:30 PM
very silly question jayakrishnan Linux - General 12 04-08-2002 04:59 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

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

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