This article is about some of the little tricks that I use in Vim. None of them are deep dives, and I encourage you to learn more about whatever’s interesting. They also aren’t connected to each other. But that’s fine. In total, they’re more than enough to help a lot.

I’ve been writing code in vim for the past several years, and in this post I’d like to share some tips on configuring a development environment. This post contains some notes on configuration that would have helped me when I first started using vim and working on my own config. I hope that as a result of reading this, you will be able to improve your workflow with some new features and make the development process easier and more convenient.

In this article, we will look at common tasks that occur when editing code and try to automate and improve them using vim. Each section contains a brief description of the problem, a proposed solution, overview of alternatives, a full code listing for the configuration, and a screenshot or animated screencast with a demonstration. At the end, additional links to useful plugins and resources will be provided.

Most of the tasks come down to installing and properly configuring one or more plugins. I assume that you are an experienced vim user and already use one of the plugin managers.

All of these tips are applicable in both vim and neovim. Also, despite the title, some of these tips can be applied not only to C++, but also to your favorite language.

Read More

Sweet cheatsheet for beginners.

This library will add Vim motions and operators to all your input fields on OS X. Why should Emacs users have all the fun?

Dec 26, 2020

If you spend a lot of time typing plain text, writing programs or HTML, you can save much of that time by using a good editor and using it effectively. This paper will present guidelines and hints for doing your work more quickly and with fewer mistakes.

The open source text editor Vim (Vi IMproved) will be used here to present the ideas about effective editing, but they apply to other editors just as well. Choosing the right editor is actually the first step towards effective editing. The discussion about which editor is the best for you would take too much room and is avoided. If you don’t know which editor to use or are dissatisfied with what you are currently using, give Vim a try; you won’t be disappointed.

Read More

Question: Why does Vim use hjkl and not the arrow keys for navigation?

Common Explanation: It keeps your fingers on the home row.

Historical Explanation: Bill Joy developed vi on the ADM-3A, which didn’t have dedicated arrow keys. If you look at the ADM keyboard, it put the arrow keys on the hjkl keys. So Joy used that same logic for vi, which led to Vim.

It all started out innocently enough. You experimented with it once or twice in your first year of college, but Nano and Pico were easier—closer to what you had already been using during high school on the Windows machines and Macs. But as time went on and you got more experience under your belt in the college-level computer science courses, you started to notice something: All of the really great programmers—the kind who churned out 4 line solutions for an assignment that took you 10 pages of code to complete; the kind who produced ridiculously over-featured class projects in a day while you struggled with just the basics for weeks—none of them used Nano or Pico.

Staying late one night to finish an assignment that was due at midnight…

Read More
Nov 22, 2020

Practice (and show off) your vim skills playing snake

Nov 3, 2020

Hello Vim users,

29 years ago the very first version of Vim was built and distributed.
And Vim is more popular than ever before! So, what’s going on these days?


A community for vim users.

Created on Oct 17, 2020
By @root