3 ms·
Useful Vim Commands
- bobbylarrybobby 4y agoThese are useful but I think there’s a lot of redundancy in the list because only specific sequences of keystrokes are listed instead of the more general vim count-destination-verb-adverb-noun syntax that produces them. For instance, when starting with a verb, `a` and `i` act on _all_ and _inside_, respectively, and what follows determines the boundary of those two regions. `da(` deletes everything between and including the current pair of parentheses. `cit` deletes everything between and excluding the current HTML tag and enters insert mode. `cs(]` changes the surrounding parentheses, replacing them with square brackets (this might require on a plugin?). Etc etc. Just like natural language, Vim’s command language has a finite syntax with only a handful of forms; once you learn them, you can substitute “parts of speech” and things will work as you expect.
- asicsp 4y agoNice. I don't remember coming across `+` movement before (move to the first non-whitespace character of the next line) I'm also doing a Vim tip series: https://learnbyexample.github.io/tips/#vim https://learnbyexample.github.io/tips/#vim (or, you can also check out my Vim Reference Guide ebook: https://learnbyexample.github.io/vim_reference/Introduction.html https://learnbyexample.github.io/vim_reference/Introduction....)
- pkrumins 4y agoI wrote a similar post the other day but with my top 10 vim commands: https://catonmat.net/top-10-vim-shortcuts https://catonmat.net/top-10-vim-shortcuts