Link Search Menu Expand Document

VIM Editor

Table of contents

Basic VIM command - case sensitive

G -> to the last line of the file gg -> start the line i -> insert esc -> finish editing w -> jump between words O o -> start or end the line V -> start visual edit D -> delete :wq -> save & quit :q! -> quit no saving 2u -> undo

Search and replace

:%s/search/replace/g
  • %s to search, g to execute
  • This command is for the entire file
:8,10 s/search/replace/g
  • This is to search within range of 8-10