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,…

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

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.


Print Share Comment Cite Upload Translate
APA
BigCoder | Sciencx (2024-03-29T04:45:47+00:00) » Tricks for Learning Vim Quickly. Retrieved from https://www.scien.cx/2021/09/18/tricks-for-learning-vim-quickly/.
MLA
" » Tricks for Learning Vim Quickly." BigCoder | Sciencx - Saturday September 18, 2021, https://www.scien.cx/2021/09/18/tricks-for-learning-vim-quickly/
HARVARD
BigCoder | Sciencx Saturday September 18, 2021 » Tricks for Learning Vim Quickly., viewed 2024-03-29T04:45:47+00:00,<https://www.scien.cx/2021/09/18/tricks-for-learning-vim-quickly/>
VANCOUVER
BigCoder | Sciencx - » Tricks for Learning Vim Quickly. [Internet]. [Accessed 2024-03-29T04:45:47+00:00]. Available from: https://www.scien.cx/2021/09/18/tricks-for-learning-vim-quickly/
CHICAGO
" » Tricks for Learning Vim Quickly." BigCoder | Sciencx - Accessed 2024-03-29T04:45:47+00:00. https://www.scien.cx/2021/09/18/tricks-for-learning-vim-quickly/
IEEE
" » Tricks for Learning Vim Quickly." BigCoder | Sciencx [Online]. Available: https://www.scien.cx/2021/09/18/tricks-for-learning-vim-quickly/. [Accessed: 2024-03-29T04:45:47+00:00]
rf:citation
» Tricks for Learning Vim Quickly | BigCoder | Sciencx | https://www.scien.cx/2021/09/18/tricks-for-learning-vim-quickly/ | 2024-03-29T04:45:47+00:00
https://github.com/addpipe/simple-recorderjs-demo