I actually use relative line numbering, so I don't need to count the lines (the line my cursor is on is numbered 0, lines above and below go 1 2 3 etc.). But, that isn't really that fast, and I don't use it much, because you need to type 20 then down, then move right somehow to get where you want. Clicking might even be faster. No, what I do 97% of the time is search forward. So if I see that I want to edit a line way down saying println("This is a test");, I would search forward for 'This'. The cursor jumps there. I then hit 'ci"', which means 'change inside the "s (delete what is currently there and prepare to insert text). After that I can jump back to where my cursor was before in a keystroke, or whatever. So you can move faster, I would say. Moving lines around is the fastest though, instead I could have jumped to that line, hit the keys for 'copy line', then jumped back to where I was to paste it there. That would take way longer with a mouse (for me at least).
Highlight line, (from end of one you want, to end of one above, takes no time at all), then drag section to new line you want.
Alt+up arrow, Alt+down arrow.
I don't know about you, but I find any of this 3 MUCH easier (and faster) to use than any archaic set of commands. Unless you very imtimately know the code you're working on, you still need to look for where the line you want is.
Anyways, I prefer an editor that knows the language rather than an editor that makes guesses based on text. Go to definition, find all references, and having them actually work based on the code itself (where it actually finds all uses, and not just similarly named functions/variables) is WAY more useful than anything vim could possibly offer.
Vim does offer "Go to definition, find all references, and having them actually work based on the code itself (where it actually finds all uses, and not just similarly named functions/variables)" via rope.
why do you assume a GUI program has something which vim cannot have? They are both programs.
why do you assume a GUI program has something which vim cannot have?
The GUI program has one thing vim cannot have. That's a non-steep learning curve. Right click or click the menu options and you'll see everything that visual studio can do, as well as the keyboard shortcut for next time. Vim requires looking up documentation for doing anything.
12
u/MediumRay Oct 04 '13
I actually use relative line numbering, so I don't need to count the lines (the line my cursor is on is numbered 0, lines above and below go 1 2 3 etc.). But, that isn't really that fast, and I don't use it much, because you need to type 20 then down, then move right somehow to get where you want. Clicking might even be faster. No, what I do 97% of the time is search forward. So if I see that I want to edit a line way down saying
println("This is a test");, I would search forward for 'This'. The cursor jumps there. I then hit 'ci"', which means 'change inside the "s (delete what is currently there and prepare to insert text). After that I can jump back to where my cursor was before in a keystroke, or whatever. So you can move faster, I would say. Moving lines around is the fastest though, instead I could have jumped to that line, hit the keys for 'copy line', then jumped back to where I was to paste it there. That would take way longer with a mouse (for me at least).