DEV Community ๐Ÿ‘ฉโ€๐Ÿ’ป๐Ÿ‘จโ€๐Ÿ’ป

Cover image for Tricks for Learning Vim Quickly
BigCoder
BigCoder

Posted on

Tricks for Learning Vim Quickly

Vim is very powerful and fast editor, on the other hand it's so powerful that some people might prefer not to use it. It's available on every machine, even through an SSH connection and bindings can be used in any popular IDE.

If youโ€™re learning Vim, there are two mistakes you can make:
The first is to jump right in. The second is to avoid doing anything.

The correct approach is to learn Vim incrementally. Learn one trick at a time, then practice it until itโ€™s second nature.

Here are tricks that will help you learn Vim quickly.

Practice

Practice makes perfect. Vim works differently than you are used to. You can practice online using vim.is, which makes you learn vim keybindings very quickly.

I recommend learning vim first before using it, because it works so different than say notepad. But the advantage is higher productivity, moving around the text quickly, recording and replaying keystrokes and lots more.

Enable vim keybindings

There are extensions for your web browser like Vimium. Get used to the vi-like keybindings by surfing the web. There's also qutebrowser. Qutebrowser is a Chromium fork but uses Vi-like key bindings.

Enable vi keybindings in bash

Write the command to enable vi keybindings in bash. You can then use the vi keybindings inside your commands.

set -o vi
Enter fullscreen mode Exit fullscreen mode

Then you can use keys like b, w, 5w and all the other vi keybindings you use inside the commands.

Enable vi keybindings in other apps

There are many applications which support vi keybindings. Some notable ones are ranger, vifm, feh.

For Windows users, you can enable vim keybindings in visual studio, word, outlook using viemu.

Quick tricks

To open a file, type the command vim file. To quit vim, press ZQ. To edit a file, press i or insert. To return to command mode, press the esc key. Press :w to save the file.

Top comments (0)

Thank you.

ย 
Thanks for visiting DEV, weโ€™ve worked really hard to cultivate this great community and would love to have you join us. If youโ€™d like to create an account, you can sign up here.