Acknowledgements
The original recipient of these tips was Ariana Promessi, who also edited and contributed to the final versions on this site. She in particular distilled the notion of “ephemeral nouns” which make their first appearance in the tip on Search.
Feedback from the r/vim community on Reddit also helped to improve the quality of the tips. There were some useful suggestions in particular from user /u/abraxasknister
whose prodding influenced the approach taken in the tip on Scrolling, and also inspired me to come up with the term vimlike to describe the class of editor whose users form the audience for these tips.
Reader srea
pointed out the text objects gn
and gN
which I didn’t know about. For reasons of symmetry it may be best to include these in the tip on Search, an inclusion I may make in a future revision. The use of the column
command in the tip on Aggregate Operations was contributed by D. Ben Knoble.
Bibliography
For every enterprising blogger who writes a few articles sharing valuable things they’ve learned over the years from sources usually unknown even to themselves, untold numbers of others labor unseen in the mines to create this value made visible on the surface. Everyone deserves to be recognized for the value they contribute, in ways small and large, and the truth is, a bibliography doesn’t come remotely close to doing this justice or even begin to reckon with the true scale and import of the problem to be solved. I’ve written elsewhere about better ways that we might do this, but until we get there, here are some resources and plugins that I can wholeheartedly recommend for further development. If you can think of others that should be included, just point them out in the comments and I am happy to add them.
Vim as a Language
- You Don’t Grok Vi
- a classic StackOverflow post by Jim Dennis
- mentions registers as objects in the grammatical sense
- Learn to speak vim — verbs, nouns, and modifiers!
- VimSpeak — this looks very cool
- While a picture is worth a thousand words, it could also be said that a formal grammar is worth a thousand explanations. Here are some worthy attempts at describing Vim’s grammar.
- Vim Grammar
- This points out that the
w
andW
nouns “modified” in text objects likeiw
andaW
are not the same as the nounsw
andW
indicated in motions. We can understand this in the context of Vim’s underlying noun of character ranges.
- This points out that the
- Vim Normal Mode Grammar
- very interesting article
- this one attempts to treat
0 $
etc as “motion verbs”, whereas the present series treats these as ways to indicate nouns, making the distinction that verbs are transformations of the text rather than of the perspective (cursor or view)
- A Grammar for Vim’s Normal Mode
- My own rough attempt that I made in the course of writing these tips. It encodes some of the things covered here, such as treatment of
C
andD
etc. as built-in macros.
- My own rough attempt that I made in the course of writing these tips. It encodes some of the things covered here, such as treatment of
- Vim Grammar
Vimlikes
I’m including here editors or extensions for other platforms whose stated goal is full emulation of Vim. I have not used many of these, though, so please comment if you have an opinion about them or know of others that should be included.
- Vim
- Neovim
- Emacs Evil
- VSCodeVim
- Sublime NeoVintageous
- Atom vim-mode-plus
- Personally, I use
- Emacs/Evil for coding, tinkering, the kitchen sink
- MacVim for notetaking, organization, LaTeX, mission-critical stuff
- Terminal Vim for one-off and remote edits
- I admire from afar: JetBrains products
Beginner
- Online interactive tutorial
- Vim Adventures — I love this concept
- If you’re just getting started setting up a vimrc file, this video by ThePrimeagen may be a good place to start
- Another interactive tutorial
- Vimtronner
- This looks awesome.
Further Development
- Advice from Bram himself
- Another way to edit registers
- Operator, the true power of Vim
- Using Ex mode as a REPL for vimscript
- Learn Vimscript the Hard Way
- Text processing Unix commands
- Some tips on text objects
- An excellent advanced tutorial
- Making Things Flow
Plugins
In general, for anything that extends your Normal mode vocab (e.g. new noun (motion + text object), new verb, etc.), adding it is a no-brainer. For other stuff, it’s a matter of personal preference.
- A community-curated collection of text objects
- VimAwesome — a hub for plugins, very well done
- Useful plugins
- Vimwiki
- my personal, entirely undocumented, organizing tool is based on Vimwiki
- Tagbar
- visualstar
- to search for a visual selection using
*
- especially useful in searching for text containing Unicode characters, which may not be easy to type via
/
- to search for a visual selection using
- matchit
- for
%
to match tags
- for
- YankRing
- I like the yank ring functionality in Emacs, this plugin apparently provides it for Vim
- Vimwiki
Blogs, Tips, Etc.
Standard Resources
- Community
- Mailing Lists
- More on Vim Built-in Help
- Practical Vim
- I haven’t had a chance to read this book but I’ve seen it highly recommended by many.
- There’s also Vimcasts, a video channel by the same author
Interesting
- VimGolf
- An essential Vim pastime!
- Unfortunately, it appears the site has been experiencing issues of late, and it sounds like they could use help with MongoDB to get it back up
- Vim has apparently raised over a million euro for charity. That’s pretty cool.
- A great interview with Bill Joy (one of the creators of Vi) from 1984
- In case you didn’t know, Ed is the standard text editor
“License”
This work is “part of the world.” You are free to do whatever you like with it and it isn’t owned by anybody, not even the creators. Attribution would be appreciated and is a valuable contribution in itself, but it is not strictly necessary nor required. If you’d like to learn more about this way of doing things and how it could lead to a peaceful, efficient, and creative world, and how you can help, visit drym.org.