Introduction to Vim                                             
                                                                                                                                
                                                                                                                                
                                                                                                                                
                                                           2026-06-13                                                           
                                                                                                                                
                                                                                                                                
                                                                                                                                
                                                                                                                                
                                                                                                                                
                                                                                                                                
                                                                                                                                
                                                                                                                                
                                                                                                                                
                                                        Edoardo Nannotti                                                        
                                                                                                                                
                                                                                                                                
                                                                                                                                
                                                                                                                                
                                                                                                                                
                                                    What is Vim?                                                    
                                                                                                                                
                                                                                                                                
                                                                                                                                
           A FLOSS terminal text editor which is:                                                                               
                                                                                                                                
              •  🚀  Lightweight — opens instantly, runs anywhere                                                                
              •  🧠  Ergonomic   — keyboard-driven, no mouse needed                                                              
              •  🔧  Composable  — small primitives combine exponentially                                                        
              •  🌍  Ubiquitous  — pre-installed on Unix-like systems                                                            
              •  🧩  Extensible  — massive plugin ecosystem                                                                      
                                                                                                                                
                                                                                                                                
                                                                                                                                
                                                                                                                                
                                                                                                                                
                                                                                                                                
                                                                                                                                
                                                                                                                                
                                                                                                                                
                                                                                                                                
                                                                                                                                
                                                                                                                                
                                                                                                                                
                                                                                                                                
                                                                                                                                
                                                                                                                                
                                                                                                                                
                                                                                                                         2 / 13 
                                                                                                                                
                                                                                                                                
                                                                                                                                
                                             Vi(m) is everywhere                                             
                                                                                                                                
                                                                                                                                
                                                                                                                                
                                                                                                                                
                                                                                                                                
                                                                                                                                
                                                                                                                                
                                                                                                                                
                                                                                                                                
                                                                                                                                
                                                                                                                                
                                                                                                                                
                                                                                                                                
            Vi in a Docker container running Alpine Linux                                                                       
                                                                                                                                
           ——————————————————————————————————————————————————————————————————————————————————————————————————————————           
                                                                                                                                
                                                                                                                                
                                                                                                                                
                                                                                                                                
                                                                                                                                
                                                                                                                                
                                                                                                                                
                                                                                                                                
                                                                                                                                
                                                                                                                                
                                                                                                                                
                                                                                                                         3 / 13 
            Vi in the BusyBox shell (Ubuntu boot failure environment)                                                           
                                                                                                                                
                                                                                                                                
                                                 (Neo)Vim as IDE                                                 
                                                                                                                                
                                                                                                                                
                                                                                                                                
                                                                                                                                
                                                                                                                                
                                                                                                                                
                                                                                                                                
                                                                                                                                
                                                                                                                                
                                                                                                                                
                                                                                                                                
                                                                                                                                
                                                                                                                                
                                                                                                                                
                                                                                                                                
                                                                                                                                
                                                                                                                                
                                                                                                                                
                                                                                                                                
                                                                                                                                
                                                                                                                                
                                                                                                                                
                                                                                                                                
                                                                                                                                
                                                                                                                                
                                                                                                                                
                                                                                                                                
            LazyVim (www.lazyvim.org), a preconfigured Neovim setup                                                      4 / 13 
                                                                                                                                
                                                                                                                                
                                                                                                                                
                                                         History                                                         
                                                                                                                                
                                                                                                                                
                                                                                                                                
                                                                                                                                
                                           1976      1991           2014                                                        
                                        ────┬─────────┬───────────────────────────────                                          
                                            └─ vi ────┼───────╶╶╶╶╶╶╶╶╶╶╶╶╶╶╶╶╶╶╶╶╶╶╶╶                                          
                                                      └─ vim ────────┬────────────────                                          
                                                                     └─ neovim ───────                                          
                                                                                                                                
                                                                                                                                
              •  vi laid the fundamentals.                                                                                      
              •  vim added multiple buffers, window splits, syntax highlight, vimscript, plugins.                               
              •  neovim added async jobs, built-in LSP support, Lua scripting.                                                  
                                                                                                                                
                                                                                                                                
                                                                                                                                
                                                                                                                                
                                                                                                                                
                                                                                                                                
                                                                                                                                
                                                                                                                                
                                                                                                                                
                                                                                                                                
                                                                                                                                
                                                                                                                                
                                                                                                                                
                                                                                                                         5 / 13 
                                                                                                                                
                                                                                                                                
                                                                                                                                
                                           Vim is a modal editor                                           
                                                                                                                                
                                                                                                                                
                                                                                                                                
              1. Open a file                                                                                                    
              2. Write "hello"                                                                                                  
              3. Save and exit                                                                                                  
                                                                                                                                
                                                                                                                                
                                          INSERT   NORMAL  COMMAND                                                              
                                                     ┯                                                                          
                                            ╷◀── i ──┘                                                                          
                                            │                                                                                   
                                          hello                                                                                 
                                            │                                                                                   
                                            └─ Esc ─▶╷                                                                          
                                                     │                                                                          
                                                     └─ : ──▶ wq                                                                
                                                                                                                                
                                                                                                                                
           [demo: demos/hello_world.txt]                                                                                        
                                                                                                                                
                                                                                                                                
                                                                                                                                
                                                                                                                                
                                                                                                                                
                                                                                                                                
                                                                                                                                
                                                                                                                         6 / 13 
                                                                                                                                
                                                                                                                                
                                                                                                                                
                             Some example commands (normal mode)                             
                                                                                                                                
                                                                                                                                
                                                                                                                                
              •  6gg      go to line 6                                                                                          
              •  dw       delete one word                                                                                       
              •  ci(…     replace inside brakets with …                                                                         
              •  j        go down                                                                                               
              •  .        repeat last command                                                                                   
                                                                                                                                
           [demo: demos/intro.js]                                                                                               
                                                                                                                                
                                                                                                                                
                                                                                                                                
                                                                                                                                
                                                                                                                                
                                                                                                                                
                                                                                                                                
                                                                                                                                
                                                                                                                                
                                                                                                                                
                                                                                                                                
                                                                                                                                
                                                                                                                                
                                                                                                                                
                                                                                                                                
                                                                                                                                
                                                                                                                                
                                                                                                                         7 / 13 
                                                                                                                                
                                                                                                                                
                                                                                                                                
                                                                                                                                
                                                                                                                                
                                                                                                                                
                                                                                                                                
                                                                                                                                
                                                                                                                                
                                                                                                                                
                                                                                                                                
                                                                                                                                
                                                                                                                                
                                                                                                                                
                                                                                                                                
                                                                                                                                
                                                                                                                                
                                                                                                                                
                                                                                                                                
                                                                                                                                
                                                                                                                                
                                                                                                                                
                                                                                                                                
                                                                                                                                
                                                                                                                                
                                                                                                                                
                                                                                                                                
                                                                                                                                
                                                                                                                                
                                                                                                                                
                                                                                                                                
                                                                                                                         8 / 13 
                                                                                                                                
                                                                                                                                
                                                                                                                                
                      The core philosophy: editing as a language                      
                                                                                                                                
                                                                                                                                
                                                                                                                                
              •  [count] <operator> <motion|text object>                                                                        
                                                                                                                                
           ██ Operators                                                                                                         
                                                                                                                                
           d delete          c change                                                                                           
           y yank (copy)     …                                                                                                  
                                                                                                                                
           ██ Motions                                                                                                           
                                                                                                                                
           w  word           b word backward                                                                                    
           fx find next x    …                                                                                                  
                                                                                                                                
           ██ Text objects                                                                                                      
                                                                                                                                
           i( inside (…)     i" inside "…"                                                                                      
           at around XML tag …                                                                                                  
                                                                                                                                
           [demo: demos/intro.js]                                                                                               
                                                                                                                                
                                                                                                                                
                                                                                                                                
                                                                                                                                
                                                                                                                                
                                                                                                                                
                                                                                                                         9 / 13 
                                                                                                                                
                                                                                                                                
                                                                                                                                
                                            Less trivial example                                            
                                                                                                                                
                                                                                                                                
                                                                                                                                
           /regex    search a regex (after cursor)                                                                              
           fd        find next literal d char                                                                                   
           v         enter visual mode                                                                                          
           f,        find next literal , char                                                                                   
           "ay       yank selection into the a register                                                                         
           n         go to next match of last /regex search                                                                     
           qq        start recording macro into the q register                                                                  
           di"       delete inside "…"                                                                                          
           "aP       paste from the a register (before cursor)                                                                  
           :new      open a new split window                                                                                    
           p         paste                                                                                                      
           V         enter linewise visual mode                                                                                 
           :!cmd     filter selection with shell command cmd                                                                    
           y$        yank till the end of line                                                                                  
           :q!       quit window and discard changes                                                                            
           p         paste                                                                                                      
           zfl       set a fold on the current line                                                                             
           q         stop recording macro                                                                                       
           n         go to next match of last /regex search                                                                     
           @q        run macro stored in the q register                                                                         
           :g/re/c   run :c on each line matching regex re                                                                      
                                                                                                                                
           [demo: demos/external.css]                                                                                           
                                                                                                                                
                                                                                                                        10 / 13 
                                                                                                                                
                                                                                                                                
                                                                                                                                
                                                           Recap                                                           
                                                                                                                                
                                                                                                                                
                                                                                                                                
              •  Modes (normal, insert, command, …)                                                                             
              •  Command-mode commands (:wq, :q!…)                                                                              
              •  Operators (d, c, y, zf, …)                                                                                     
              •  Motions (w, b, ^, $, fx, gg…)                                                                                  
              •  Text objects (i(, a", …)                                                                                       
              •  Repeat last command (.)                                                                                        
              •  Macros (qx, @x)                                                                                                
              •  Registers ("xy, "xp, :reg, …)                                                                                  
              •  Window splits (:new, :sp, :vsp)                                                                                
              •  Search (/regex, n, N)                                                                                          
              •  External shell commands (:!cmd)                                                                                
              •  Global (:g/regex/cmd)                                                                                          
              •  Folding (zf, za)                                                                                               
              •  Undo/redo (u, ^R)                                                                                              
                                                                                                                                
                                                                                                                                
                                                                                                                                
                                                                                                                                
                                                                                                                                
                                                                                                                                
                                                                                                                                
                                                                                                                                
                                                                                                                                
                                                                                                                                
                                                                                                                        11 / 13 
                                                                                                                                
                                                                                                                                
                                                                                                                                
                                                       Resources                                                       
                                                                                                                                
                                                                                                                                
                                                                                                                                
              •  :help <term>                                                                                                   
                 ◦  in-vim manual about a search term                                                                           
              •  vimtutor                                                                                                       
                 ◦  vim tutorial, in your terminal right now                                                                    
              •  https://vim-adventures.com                                                                                     
                 ◦  gamified vim tutorial (partially free)                                                                      
              •  https://www.vim-hero.com                                                                                       
                 ◦  another vim tutorial (partially free)                                                                       
              •  google.com/search?q=vim+cheatsheet                                                                             
                 ◦  compact charts of most useful Vim commands                                                                  
                                                                                                                                
                                                                                                                                
                                                                                                                                
                                                                                                                                
                                                                                                                                
                                                                                                                                
                                                                                                                                
                                                                                                                                
                                                                                                                                
                                                                                                                                
                                                                                                                                
                                                                                                                                
                                                                                                                                
                                                                                                                                
                                                                                                                        12 / 13 
                                                                                                                                
                                                                                                                                
                                                                                                                                
                                                      Thank you!                                                      
                                                                                                                                
                                                                                                                                
                                                                                                                                
                                                                                                                                
                                         :wq                                                                                    
                                                                                                                                
                                                                                                                                
                                                                                                                                
                                                                                                                                
                                                                                                                                
                                                                                                                                
                                                                                                                                
                                                                                                                                
                                                                                                                                
                                                                                                                                
                                                                                                                                
                                                                                                                                
                                                                                                                                
                                                                                                                                
                                                                                                                                
                                                                                                                                
                                                                                                                                
                                                                                                                                
                                                                                                                                
                                                                                                                                
                                                                                                                                
                                                                                                                                
                                                                                                                        13 / 13