LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Reply
  Search this Thread
Old 09-14-2016, 05:17 PM   #1
sigint-ninja
Member
 
Registered: Feb 2011
Location: Republic Of Ireland
Distribution: Debian,Centos,Slackware
Posts: 508

Rep: Reputation: 29
vim basic questions


hi guys,

found a nice vim cheat sheet
but some isnt clear to me

whats the difference between y and yy?

also can you select multiple lines to copy and paste?

thanks
 
Old 09-14-2016, 05:22 PM   #2
Timothy Miller
Moderator
 
Registered: Feb 2003
Location: Arizona, USA
Distribution: Debian, EndeavourOS, OpenSUSE, KDE Neon
Posts: 4,005
Blog Entries: 26

Rep: Reputation: 1521Reputation: 1521Reputation: 1521Reputation: 1521Reputation: 1521Reputation: 1521Reputation: 1521Reputation: 1521Reputation: 1521Reputation: 1521Reputation: 1521
Rather than explain, here's a wiki article on how to copy and paste in vim

http://vim.wikia.com/wiki/Copy,_cut_and_paste

It explains it much better than I (IMO).

Last edited by Timothy Miller; 09-14-2016 at 05:24 PM.
 
Old 09-14-2016, 07:31 PM   #3
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,321
Blog Entries: 28

Rep: Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141
To yank a series of lines, for example to yank lines 16 through 22:

Code:
Esc   <-------To enter command mode
:16,22y
Hacker Public Radio has a series on vim that you might find useful.

Full Disclosure: Two of the shows are mine.

Last edited by frankbell; 09-14-2016 at 07:33 PM.
 
Old 09-14-2016, 09:19 PM   #4
grail
LQ Guru
 
Registered: Sep 2009
Location: Perth
Distribution: Manjaro
Posts: 10,006

Rep: Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191
My advice would be to find a better cheat sheet. There is also the vimtutorial which is available with the installation.
 
Old 09-15-2016, 05:22 AM   #5
aragorn2101
Member
 
Registered: Dec 2012
Location: Mauritius
Distribution: Slackware
Posts: 567

Rep: Reputation: 301Reputation: 301Reputation: 301Reputation: 301
Hi,

Check this out: http://vimcasts.org/

This site has videos and lots of examples. With Vim, if you show some patience, you can reach a point where you don't need a cheat sheet.

Cheers.
 
  


Reply



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
[SOLVED] Basic question concerning vim ADX Linux - Newbie 4 07-19-2011 07:30 PM
GnuCash, KMyMoney - basic, basic questions - please help if you can. brjoon1021 Linux - Software 3 10-20-2008 06:27 PM
basic questions on hostname and domain name + related postfix questions Moebius Linux - Newbie 7 09-04-2007 11:50 AM
Basic VIM question tambrao Linux - Newbie 1 09-07-2006 04:33 PM
general vim questions. jkassemi Linux - Software 8 11-09-2005 12:30 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:13 AM.

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