3 ms·
If you think of vim as a language to edit text it becomes a lot easier to remember how to do something... if you just try to memorize a bunch of incantations it
by weaksauce 6y ago
If you think of vim as a language to edit text it becomes a lot easier to remember how to do something... if you just try to memorize a bunch of incantations it will be awful.
for instance in normal mode where you issue commands to edit text(opposed to insert mode which is akin to any other editor where it's mostly just typing information into the document) you can issue something like delete a(round) word and it deletes the word `daw`. or delete inner word `diw`. want to change a word? change d to c and it deletes the word and leaves you in insert mode to type. all of the commands are very composable and form a "language" to edit text that's a lot more approachable than you'd think. one fun one is something like `ci'` or `ci"` which will if you are on a line with an open and closing " or ' will search forward in the line for a " or ' and delete what's inside that and leave you in insert mode to make your edits....
some more fun reading: https://gist.github.com/nifl/1178878 https://gist.github.com/nifl/1178878