![]() Unfortunately, that takes a lot of time because suddenly you’ve one line too much, so you’ve to scroll a line up again, means moving the cursor all through the window to the top again. When I wrote “ align the last line of the block on the end of the window“, then you can use your cursor keys to move to the bottom of the window to scroll down. Our fancy little Vim now cuts the text from your current cursor position until the end of the window. Put the cursor on the first line of the block.Align the last line of the block on the end of the window.What about cutting the whole block so you can paste it later? That might work for deleting a couple of lines, but isn’t very sexy. afterwards) several times until you’ve deleted all the lines in question. If you’re a newbie, you might press dd (or. Let’s say you want to cut some bits from a file and you don’t know if it’s 40, 41 or even 42 lines. The nice thing about motions is, you can combine them – and this is where the magic happens. Now that’s nice, but only used for jumping it’s not very powerful. In my opinion, these three normal command keys are really useful if applied correctly: Something I’ve learned in the past and what I’m using regularly today, is the use of the predefined “marks” of the window. Of course these are some basic motions and you might already know them very well □ But there’s more! What you see gg jumps to the first line in the buffer.^ jumps to the first non-blank character in line (nice for indent text).Of course, there are some simply and basic motions, such as: Vim motions and marks cannot only be helpful to jump to a specific location, but also to select, copy-paste and delete text passages. This time I’d like to talk about some some useful tips how to move through a file. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |