How to use Vim editor on Chromebook

Start (command mode): vim filename

Show line numbers: :set number

Quit: :q :q! + enter

Save: :w

Save & exit: :wq

Insert mode: i

Command mode: Escape

Delete a line: dd

Delete 3 lines: 3dd

Undo / Redo: u / Ctrl + r

Search: /search + enter

Next match: m

Previous match: M

Pattern / replace greedy replace all :%s pattern / replace gc Copy, cut and paste https://vim.fandom.com/wiki/Copy,_cut_and_paste

Updated May 26,2020: Linux on Chromebook comes with vimtutor, an interactive command line tutorial. Just type vimtutor in your terminal. Source: https://www.freecodecamp.org/news/7-vim-tips-that-changed-my-life/

Written on March 16, 2020