|
|
|
|
|
by jimnotgym
3399 days ago
|
|
Exactly the kind of thing I have read. But nothing explaining how it achieves that So it has keyboard shortcuts, and I guess I could add those to another editor... Is it one of those things you just have to take someones word for it, have a go with it and see? |
|
For example, in another editor you might have ctrl-K to delete a line (dd in vim) , but what about deleting 4 lines? in vim, it's 4dd.
Or you might want to delete from the start of a block to the end... The motion for block in vim is %, so to delete a block, you'd do "d%". Similarly, deletion to the end of the line is d$
In visual block mode (ctrl-v) you can select a bunch of text and apply an action (eg. a simple replace, which would be :s/foo/bar) on only that text.
Even if you just learn a bit at the surface, the free composability of motions with actions makes even classic vi (which doesn't even support arrow keys for moving around) extremely comfortable to use, and most of the time you don't need to twist your hands into uncomfortable chords involving multiple modifier keys.