2 min read

Daily Dispatch 23 - VI Improved (VIM)

Daily Dispatch 23 - VI Improved (VIM)

So I’ve been playing around with Vim, the improved version of VI from old operational systems.


It’s been very challenging so far, I haven’t really wrapped my head around all the neat commands, and switching from the 3 modes (VISUAL, NORMAL, INSERT) is still taking some time.

But as soon I have more confidence on what I’m doing around with VIM, I might drop a post about it.

So far what I’ve learned, I learned from Fireship and some playing around on VSCodeVim extension alongside with LearnVim.

So there are three basic modes when editing with vim.

  • Visual -> some magical mode I’ve barely played with. (Selection and editing text)
  • Normal -> where you feel lost because typing doesn’t seem to work. (Moving around and editing)
  • Insert -> regular text editor (type text)

So why is the Normal mode not just text mode? Some research indicated that when dealing with code, people tend to spend most of the time editing or navigating it, NOT writing it.

So Vim came up with the idea of different modes of operation that allows your keyboard to manipulate all the text as needed, and navigate easily.

Here’s some commands on Normal mode:

  • :q -> exit vim (hahahha I remember rebooting computers because I couldn’t exit it)
  • hjkl (left, down, up, right)
  • iIaA – editing in line
  • xr – making changes while in command mode
  • w – move to beginning of next word
  • y – yank (copy)
  • p – paste
  • w –  to move word by word
  • b – to move backwards word by word
  • W –  to move word by WORD
  • B – to move backwards WORD by WORD
  • e – to jump to the end of a word
  • ge – to jup to the end of the previous word
  • E is like e but operates on WORDS
  • gE is like ge but operates on WORDS
  • Previous command – : then ctrl+p shows your previous command, i.e., moving backward through your vim command history. ctrl+n moves forward.

That is it for today I believe, I hope I can get to multi-line editing soon.