Vim tips that will change your life

No matter how much you know about Vim, there's still more to learn. Here are a few features it took me far too long to discover, that I will now aggresively sell to you.

Vim is objectively the best code editor there is. [Editor's note: Opinions are those of the author. Honeybadger remains neutral in the vim/emacs/sublime holy war]

No matter how much you know about Vim, there's still more to learn. Here are a few features it took me far too long to discover, that I will now aggresively sell to you.

Ctrl+C

Vim users! Are you tired of reaching all the way up to the ESC key to leave insert mode?! THERE'S GOT TO BE A BETTER WAY! Starting now, you can use Ctrl+C to exit insert mode anytime you want! But wait! There's more! Using Ctrl+C requires no extra configuration! It comes out of the box with Vim!

:x

Are you a two-keystroke slave? Kill two birds with one stone and save yourself THOUSANDS of nanoseconds over the course of your life by using :x instead of:wq when saving and quitting! That's right, :x is the exact equivalent of :wq. Put that in your pipe and smoke it (not literally).

Vundle

Are you still installing plugins the old-fashioned way? With Vundle, you can install any Vim plugin in just seconds by adding a simple configuration directive! Want to try vim-rails? No problem. Does FuzzyFinder look interesting to you? Throw it on the pile! With Vundle, the world is your oyster!

Jumping among blank lines

Using j and k to move among lines can feel at times like jogging through waist-deep water. Why not take the express lane? Pressing { and } will allow you to move upward and downward, respectively, from blank line to blank line.

Cleaning up improperly indented code

Let's face it, your co-workers are idiots. The success of your employer rests squarely on your shoulders and you don't have all day to spend fixing the poorly structured code written by the protohumans with whom you're forced to collaborate. Using the magic wand of = in Vim, you can select any block of text (Shift+V then up/down), hit the = key, and presto! Your code will be beautifully indented before you can say "passive aggression"!

What to do next:
  1. Try Honeybadger for FREE
    Honeybadger helps you find and fix errors before your users can even report them. Get set up in minutes and check monitoring off your to-do list.
    Start free trial
    Easy 5-minute setup — No credit card required
  2. Get the Honeybadger newsletter
    Each month we share news, best practices, and stories from the DevOps & monitoring community—exclusively for developers like you.
    author photo

    Starr Horne

    Starr Horne is a Rubyist and Chief JavaScripter at Honeybadger.io. When she's not neck-deep in other people's bugs, she enjoys making furniture with traditional hand-tools, reading history and brewing beer in her garage in Seattle.

    More articles by Starr Horne
    Stop wasting time manually checking logs for errors!

    Try the only application health monitoring tool that allows you to track application errors, uptime, and cron jobs in one simple platform.

    • Know when critical errors occur, and which customers are affected.
    • Respond instantly when your systems go down.
    • Improve the health of your systems over time.
    • Fix problems before your customers can report them!

    As developers ourselves, we hated wasting time tracking down errors—so we built the system we always wanted.

    Honeybadger tracks everything you need and nothing you don't, creating one simple solution to keep your application running and error free so you can do what you do best—release new code. Try it free and see for yourself.

    Start free trial
    Simple 5-minute setup — No credit card required

    Learn more

    "We've looked at a lot of error management systems. Honeybadger is head and shoulders above the rest and somehow gets better with every new release."
    — Michael Smith, Cofounder & CTO of YvesBlue

    Honeybadger is trusted by top companies like: