Linux - NewbieThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Hello, I am a newbie and I just started last week to work with Linux. When using vi editor I am stuck on figuring out a command to move down x lines at a time. For example, if I have a 24 lines of text on the vi screen/page. How I could move 11 lines at the time? thank you for your help!
With most keys in vi, you can simply type a number and then hit a key to do that action that many times. Eg: typing "11" followed by the down arrow would move down 11 lines, "11" followed by "dd" would cut 11 lines, etc.
Sorry about being a pain in the butt guys. English is my second language and sometimes I can't communicate the way I would like. What I am asking is if here are 50 lines of text on a vi screen/page. What would be the command to move down 14 lines at a time.
Thank you guys!
Cut and past 14 lines?
(position the cursor at the first line from the 14 you want to move), 14, dd, (position the cursor at the line after which you want them pasted), p
:,+13m+15
: enter command mode
,+13 is an address, format: from,to. from is now the current line (empty), to is +13 lines, altogether 14 lines
m is the command move
+15 is the location, where do you want to move it (sometimes called movement operator, http://vim.wikia.com/wiki/Moving_around)
Sorry about being a pain in the butt guys. English is my second language and sometimes I can't communicate the way I would like. What I am asking is if here are 50 lines of text on a vi screen/page. What would be the command to move down 14 lines at a time.
Thank you guys!
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.