50 useful Vim commands
From VimTricks:
Here are 50 useful Vim commands that work in normal mode. Many of these can be combined and modified to produce dozens more. Use these as inspiration for your own repeatable workflows.
From VimTricks:
Here are 50 useful Vim commands that work in normal mode. Many of these can be combined and modified to produce dozens more. Use these as inspiration for your own repeatable workflows.
After many years of gradual improvement Vim now takes a big step with a major release. Besides many small additions the spotlight is on a new incarnation of the Vim script language: Vim9 script.
One of Neovim’s major draws is that you can avoid Vim script altogether and use Lua instead. It looks like the Vim team is addressing the two major complaints folks have with Vim script: performance and its obscure syntax:
The main goal of Vim9 script is to drastically improve performance. This is accomplished by compiling commands into instructions that can be efficiently executed. An increase in execution speed of 10 to 100 times can be expected.
A secondary goal is to avoid Vim-specific constructs and get closer to commonly used programming languages, such as JavaScript, TypeScript and Java.
Legacy scripts will continue to work, of course. The Vim team has no plans to drop legacy support in the foreseeable future. Learn more about Vim9 script here or with :help vim9
inside Vim itself.
When you start Vim with the
--clean
option, it shows up in “vanilla” mode. No plugins, no configuration, just back to the roots. I have collected a ton of configuration statements over the years, some of them dating from MS-DOS or Windows 3.1. Here is the deal: I will start from scratch to find a good starting-point configuration with just the plugins available in Fedora 35. Will I survive a week of coding? I’ll find out!
How Lukáš Zapletal dropped from 35 Vim plugins to just six.
This week Neovim core maintainer TJ DeVries joins Jerod and guest co-host Nick Nisi (from JS Party) to follow-up on our Vim episode with a conversation dedicated to Neovim. TJ tells us why Neovim was created in the first place, how it differs from Vim, why Lua is awesome for configuration and plugins, what LSPs are all about, the cool tech inside tree-sitter, and how he’s writing his own fuzzy file finder for Neovim called Telescope.
We had a lot of fun recording the Vim with me series alongside episode 450, so I thought, “Hey, let’s keep it going!” We have Nick Nisi for you today. Nick is a regular panelist on JS Party, co-hosted our upcoming Neovim episode of The Changelog, and is personally responsible for the #vimparty
channel of Changelog’s community Slack.
(If you have any requests of people you’d like to see Vimming with me, let us know in the comments!)
Julia stuck around after our Vim interview to share some of her Vim setup with me. She shows off the Visual Mode feature that I learned on the pod and shared her love of macros as well!
Gary stuck around after our Vim interview to share some of his Vim setup with me. If you’ve never seen Gary use Vim, this is a must-watch. The guy moves at the speed of thought. 🏃♂️
Suz stuck around after our Vim interview to share some of her Vim setup with me. She created an epic plugin that lets her Twitch audience comment on specific lines while she’s editing. Definitely worth a 👀!
On this special edition of The Changelog, we tell Vim’s story from the mouths of its users. Julia Evans, Drew Neil, Suz Hinton, and Gary Bernhardt join Jerod Santo for a deep and wide-ranging discussion about “the best text editor that anyone ever wrote.”
This is such a cool idea (inspired by Limelight), written in Lua, and using TreeSitter for better dimming. Will plugins like this start pulling normal Vim users over to Neovim?
Here’s a sneak peek of our upcoming episode of The Changelog (plus bonus videos) starring Julia Evans, Drew Neil, Suz Hinton, and Gary Bernhardt!
The gang talks about thier favorite software and hardware as developers. Brian Douglas joins to share his unique and open GitHub Actions flow.
Nick, and Kball are joined by Mike Hartington to talk about Ionic, the state of web components, developer tooling, and more!
Did you know that this fuzzy finder - fzf, can do a lot more than you thought? Oh yeah, the fuzzy search is just the tip of the iceberg here. It is like wine; the more you leave it on your computer, the more flavor and sweetness it accumulates from that command-line. Let’s dive in and find out how you can increase your productivity with fzf inside Vim.
“Thank you! But our princess is in another buffer!”
Command (line? I’ve never called it that) mode is indeed where much of Vim’s power lies. In this post on Thoughtbot’s blog, German Velasco explains search and replace, command repetition, ranges, and more.
Vimpeccable is a plugin for Neovim that allows you to easily replace your vimscript-based
.vimrc
with a lua-based one instead. Vimpeccable adds to the existing Neovim lua API by adding new lua commands to easily map keys directly to lua.
All of the power and customization of Vim without the inscrutable and othewise compulsory Vimscript? Sign me up! (metaphorically… I’m far too lazy to customize Vim anymore than I already have.)
If you use Vimium (a Chrome extension which provides keyboard shortcuts for navigation and control in the spirit of the Vim editor) and you’re on macOS, Vimac is a no-brainer. You can scroll windows with HJKL
keys, perform clicks using hint letters, and even perform right (and double) clicks with your keyboard.
Learn the good parts of Vim.
This book from Igor Irianto is in progress with 11 of 20 chapters are ready to read as of right now.
Nikola Đuza makes a compelling case for the powerful text editor that developers love (or love to hate):
What Vim is excellent at is navigating, making some changes, and repeating the process. The process most call editing (not to be confused with writing). Most developers tend to overlook this fact, but this is one of the strong selling points of Vim. Developers are more prone to reading code, jumping from file to file, making small incisions in the code, and writing code all the time.
A nice history of Vim and what it got right:
To better understand why and how Vim got (and is) so popular, it is best to look into the roots of how it all started. Before
vim
, there wasvi
, beforevi
there wased
. What are all these two or three letter words, and what is the story behind it? Let us dive in and figure out.
With VimWiki, you can organize notes and ideas, manage to-do lists, write documentation, maintain a diary, and more. Everything is exportable to HTML.
If you’re setting out to win friends and influence people with your vim
skills, you might as well do it in 3D…
Yaron Wittenstein recaps the editor holy wars then tells his personal journey with the two editors and how he found a happy place somewhere in-between:
emacs has a very popular vim emulation named evil (branded as The extensible vi layer for Emacs). I was skeptical at first but gave it a try, and surprisingly things went smooth.
Vim-clap is different than previous finders because it uses the new floating_win
(NeoVim) and popup
(Vim) interface. File lookup and switching have long been what keep me out of Vim as my daily driver (clunky UIs, slow results). Nothing beats Sublime Text in this category, in my opinion.
But this looks pretty awesome. I might have to give this a test drive and see if it wins me back.