LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
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, 11:10 AM   #1
Valhalla
Member
 
Registered: Dec 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, 11: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, 11:25 AM   #3
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374
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 druuna; 04-12-2006 at 03:09 PM.
 
Old 04-12-2006, 03:38 PM   #4
Valhalla
Member
 
Registered: Dec 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 12:29 PM
silly question bruj3w Slackware 3 08-20-2004 01:51 PM
silly question ramu_ak Linux - General 2 03-24-2003 10:45 AM
Silly Question MattB Linux - Software 1 06-06-2002 12:30 AM
very silly question jayakrishnan Linux - General 12 04-08-2002 05:59 AM


All times are GMT -5. The time now is 02:35 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration