LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   vim basic questions (https://www.linuxquestions.org/questions/linux-newbie-8/vim-basic-questions-4175589448/)

sigint-ninja 09-14-2016 05:17 PM

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

Timothy Miller 09-14-2016 05:22 PM

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).

frankbell 09-14-2016 07:31 PM

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.

grail 09-14-2016 09:19 PM

My advice would be to find a better cheat sheet. There is also the vimtutorial which is available with the installation.

aragorn2101 09-15-2016 05:22 AM

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.


All times are GMT -5. The time now is 06:18 PM.