3 ms·
IMO, the most important Vim keystrokes for editing code are: * %, which lets you hop back and forth between ()/{} pairs. Extremely useful when working with, sa
by thosakwe 7y ago
IMO, the most important Vim keystrokes for editing code are:
* %, which lets you hop back and forth between ()/{} pairs. Extremely useful when working with, say, Flutter.
* F/f/T/t (and ;/,), which let you jump to a specific character in the line, ahead or behind. This greatly sped me up, as I no longer needed to count out "okay, hop 16 characters to the left."
Also, another important thing is that Vim makes editing fast, not necessarily writing. There's not really much you can do to make writing faster in the first place, as you eventually have to type anything you write at least once in some form. But for editing, boy, is it great.
EDIT: Attempt to fix god-awful formatting
- jchw 7y ago> There's not really much you can do to make writing faster in the first place, as you eventually have to type anything you write at least once in some form. Well, that depends. It’s quite a bit like compression. If you are doing something repetitive, which unfortunately is still necessary in some conditions for good reasons, Vim is good at this (and so are most other modern code editors; multiple cursors are surprisingly powerful.) On the other hand you can always invent a shorthand. A popularized example would be emmet for writing XML, which is supported via plugin in most code editors.