November 9, 2020 - 1 minute read

Day 6 : Vim Crash Course

This is part of the #LinuxUpSkillChallenge. Don't forget to also check out the Official Instructions and the Reddit posts.

Objectives of the day

  1. Dealing with files

vim filename - create/open file

:w - save

:w newfilename - save as

:q! - close file and trash all changes (the ! forces the command)

:wq - save and close

  1. Navigation

gg - BOF


  1. Vim modes: Normal, Insert, Visual, Command. Check out the freecodecamp post for more details.

  2. Editing

d - Cut (delete)

y - Copy (yank)

p - Paste

u to undo the last command

CRTL + R - Redo

/ - Find

:%s/old/new/gc - Replace all occurrences of old for new, globally inside the file, and prompt a confirmation for every replacement

  1. To learn more, please check:

vimtutor - VIM own tutorial

VIM Adventures

VimScript on

For more detail on how I did each day, check out my log on Reddit. Follow me on Twitter for daily updates.