welcome to

Introduction to and Exit from vim

with nyakob (they/them/jakob) :3

this is one of the official Vim logos

07 Nov '26, maschinenraum

slides: http://jakob.ruckel.de/slides/vim/

<slide page="1/27" what="introduction to and exit from vim" who="nyakob" when="07 nov '26" where="maschinenraum" />

editing text…

  • way back when: punch cards, editing “offline”, i.e., not at the computer
<slide page="2/27" what="introduction to and exit from vim" who="nyakob" when="07 nov '26" where="maschinenraum" />

the dawn of the text editor

  • 1960: Colossal Typewriter on the PDP-1, considered to be the first text editor ever
  • input and output media: teletype or punched tape
    • screens with text were not common
  • CT has two modes: control mode and text input mode 👀


brochure (left) and CT memorandum (right) from the Computer History Museum’s collection

<slide page="3/27" what="introduction to and exit from vim" who="nyakob" when="07 nov '26" where="maschinenraum" />

the dawn of the text editor (cont’d)

  • Colossal Typewriter workflow:
    1. define some region of text you want to edit a2000 b2005
    2. text is from tape into memory (the “buffer”)
    3. “type-out” buffer to teletype ]
      • hello
    4. move start of buffer a2002
    5. enter text mode >
    6. type “ww”
    7. punch out buffer to tape > p
    8. your tape now contains “hewwo”
<slide page="4/27" what="introduction to and exit from vim" who="nyakob" when="07 nov '26" where="maschinenraum" />

the evolution of the text editor

  • 1960: Colossal Typewriter (PDP-1, John McCarthy and Roland Silver at BBN)
  • 1961–1962: Expensive Typewriter (PDP-1, Steve Piner and Peter Deutsch at MIT)
    • Peter Deutsch is also known for Smalltalk, Ghostscript, REPL
  • fun fact: the PDP-1 also had “Expensive Desk Calculator”
    Expensive Desk Calculator in the PDP-1 Program Library, Computer History Museum

    and “Expensive Planetarium” a.k.a. “Spacewar!”, one of the first computer games ever

  • 1965–1967: QED “quick edit” (SDS-940, Peter Deutsch, Butler Lampson and Dana Angluin at UC Berkely)
<slide page="5/27" what="introduction to and exit from vim" who="nyakob" when="07 nov '26" where="maschinenraum" />

QED at Bell Labs

  • Ken Thompson had used QED at Berkely
  • 1966: Thompson joins Bell Labs and ports QED to CTSS and, later, to Multics
  • then, Dennis Ritchie ports QED to GCOS
  • new features:
    • search and replace with regular expressions (regexes)
      • one of the first applications of regexes, ever
      • one of the first uses of just-in-time (JIT) compilation for the automata evaluating regexes
    • edit multiple files at the same time
    • write commands into a buffer and execute them (programmability)

further reading: Dennis Ritchie, “An incomplete history of the QED Text Editor”

<slide page="6/27" what="introduction to and exit from vim" who="nyakob" when="07 nov '26" where="maschinenraum" />

QED Example Session

*READ FROM /bee.txt/.
81 WORDS.
*=3
*1/
According to all known laws of aviation, there is no way a bee should be able to fly.
*1,$SUBSTITUTE /cat/ FOR /bee/.
3
*2SUBSTITUTE /paws/ FOR /wings/.
1
*WRITE ON /bee_fixed.txt/.
81 WORDS.
*FINISHED.
<slide page="7/27" what="introduction to and exit from vim" who="nyakob" when="07 nov '26" where="maschinenraum" />

More QED

Our new text file contains:

According to all known laws of aviation, there is no way a cat should be able to fly.
Its paws are too small to get its fat little body off the ground.
The cat, of course, flies anyway because cats don't care what humans think is impossible.
  • I used this implementation by Lynne Hawkins, which is based on the 1968 DARPA Manual for QED.
  • there’s also a “quick” mode where we would have entered the substitution commands as: *1,$S/cat/bee/. and *2S/paws/wings/. 👀
  • ! the order of the terms in the substitution is backwards from what’s typical today
  • * is the prompt, . confirms a command
<slide page="8/27" what="introduction to and exit from vim" who="nyakob" when="07 nov '26" where="maschinenraum" />

ed

Thompson and Ritchie in front of a PDP-11, ca. 1970,Computer History Museum

Teletype Model 33 ASR, ArnoldReinhold, CC BY-SA 3.0, via Wikimedia Commons
<slide page="9/27" what="introduction to and exit from vim" who="nyakob" when="07 nov '26" where="maschinenraum" />

em (editor for mortals)

  • enter: video terminals (VUDs).
  • 1975: George Coulouris develops em at Queen Mary College in London
“I explained that ‘em’ was an extension of ‘ed’ that gave key-stroke level interaction for editing within a single line, displaying the up-to-date line on the screen […]”
“By the way, ‘em’ stands for ‘editor for mortals’ - I christened it that after Ken Thompson visited our lab at QMC while I was developing it and said something like: ‘yeah, I’ve seen editors like that, but I don’t feel a need for them, I don’t want to see the state of the file when I’m editing’.”

read more here

<slide page="10/27" what="introduction to and exit from vim" who="nyakob" when="07 nov '26" where="maschinenraum" />

en, ex and vi

  • 1976: Coulouris visits UC Berkely and brings a copy of em (which he uses on a teletype)
  • a PhD student named Bill Joy is impressed and wants to show em to the people at Berkely with access to VDU terminals
  • Joy and Chuck Haley develop an improved version called en
  • 1977-ish: Haley graduates Joy develops en into ex
  • later, ex gets a “visual mode” called vi
    • that is, we have full screen text editing!!
  • vi came bundled for free with BSD Unix
    • Emacs, at the time, cost a lot of money

further reading

<slide page="11/27" what="introduction to and exit from vim" who="nyakob" when="07 nov '26" where="maschinenraum" />

ex and vi (cont’d)

  • joy developed vi on a Lear Siegler ADM-3A VDU
  • note the arrow keys on hjkl 👀

Chris Jacobs, CC BY-SA 3.0, via Wikimedia Commons

https://vintagecomputer.ca/lear-siegler-adm-3a-terminal/
<slide page="12/27" what="introduction to and exit from vim" who="nyakob" when="07 nov '26" where="maschinenraum" />

Stevie and vim

  • 1988: a Dutch man named Bram Moolenaar buys a Commodore Amiga
  • he knows vi (probably from university) and wants something like it on his computer
  • there is a vi clone called Stevie (Tim Thompson, 1987)
  • Moolenaar uses this as a base for vim, the vi imitation
  • 1992: vim is ported to Unix and renamed to vi improvement
  • big new features:
    • undo multiple things, not just the last one
      • undo with u, redo with Ctrl+R
    • syntax highlighting, auto-indentation and much more
<slide page="13/27" what="introduction to and exit from vim" who="nyakob" when="07 nov '26" where="maschinenraum" />

Vim

  • software license: charityware.
    • “Vim is free, but it’s worth something”
    • Moolenaar suggested donating to charity if you agree with this
  • vim spread on fish disks, collections of free software distributed on diskettes sold for the cost of materials
<slide page="14/27" what="introduction to and exit from vim" who="nyakob" when="07 nov '26" where="maschinenraum" />

Vim today

<slide page="15/27" what="introduction to and exit from vim" who="nyakob" when="07 nov '26" where="maschinenraum" />

Neovim

  • this probably says something about the state of vim’s codebase…

  • 2014: Thiago de Arruda sends a patch to add multithreading to vim
    • the vim maintainers reject this
    • de Arruda decides to create a fork of vim, called Neovim
      • he launched a fundraiser and collects 34&hairsp;000 USD to fund initial development
  • other big features:
    • support for Lua scripting
    • LSP support
      • !! if a programming language has tooling for VS Code, chances are you can use that tooling in neovim !!
<slide page="16/27" what="introduction to and exit from vim" who="nyakob" when="07 nov '26" where="maschinenraum" />














</history>
<slide page="17/27" what="introduction to and exit from vim" who="nyakob" when="07 nov '26" where="maschinenraum" />

Let’s (finally) Install neovim

see also Neovim installation docs

Linux: yay -S neovim or sudo apt install neovim or sudo apk add neovim …

mac: brew install neovim

windows: winget install Neovim.Neovim

alternatively, download a binary from the releases page

nice to have: append alias vim=nvim to your shell’s rc, e.g.,

echo "alias vim=nvim" >> ~/.bashrc
<slide page="18/27" what="introduction to and exit from vim" who="nyakob" when="07 nov '26" where="maschinenraum" />

first steps

i’ve prepared an abridged version of vim-tutor:

git clone https://mae.rs/git/vim  # or download https://mae.rs/git/vim.zip
cd vim
./tutor/run

<slide page="19/27" what="introduction to and exit from vim" who="nyakob" when="07 nov '26" where="maschinenraum" />

config

i’ve prepared a very simple config. install it as follows:

mkdir -p ~/.config/nvim
mv init.lua ~/.config/nvim/

let’s look at it!

vim ~/.config/nvim/init.vim

<slide page="20/27" what="introduction to and exit from vim" who="nyakob" when="07 nov '26" where="maschinenraum" />

Plugins

  1. install a package manger
  2. add the following to init.lua:
    vim.cmd([[
     call plug#begin()
     Plug 'mason-org/mason.nvim'
     Plug 'WhoIsSethDaniel/mason-tool-installer.nvim'
     Plug 'neovim/nvim-lspconfig'
     call plug#end()
    ]])
    
  3. restart vim, type :PlugInstall and Enter
<slide page="21/27" what="introduction to and exit from vim" who="nyakob" when="07 nov '26" where="maschinenraum" />

LSP

  1. create a file ~/.config/nvim/lua/lsp.lua:
    require("mason").setup()
    require("mason-tool-installer").setup({
     ensure_installed = {
         "pyright",
     },
    })
    vim.lsp.enable("pyright")
    
  2. add require("lsp") to your init.lua, somewhere after plugin installation
  3. feel free to check my lsp.lua
<slide page="22/27" what="introduction to and exit from vim" who="nyakob" when="07 nov '26" where="maschinenraum" />

blink.cmp

  1. in init.nvim
    Plug 'saghen/blink.lib'  " plugin section
    Plug 'saghen/blink.cmp'  " plugin section
    require("blink")         " further below
    
  2. copy advanced-config/lua/blink.lua to ~/.config/nvim/lua/blink.lua:
  3. start vim and run
    :PlugInstall
    :lua require('blink.cmp').build():pwait()
    
<slide page="23/27" what="introduction to and exit from vim" who="nyakob" when="07 nov '26" where="maschinenraum" />

fzf

Plug 'junegunn/fzf.vim'
""" FZF
nnoremap <silent> <leader>f :GFiles<CR>
nnoremap <silent> <leader>F :Files<CR>

note: you can switch tabs with gt and gT in normal mode

<slide page="24/27" what="introduction to and exit from vim" who="nyakob" when="07 nov '26" where="maschinenraum" />

Recommendation: HJKL Everywhere

  • remap capslock + hjkl to the arrows
    • this makes it very comfortable to choose things from dropdowns, autocomplete URLs in your browser, edit commands in your shell, …
  • xmodmap for Linux
    • save to ~/.config/xmodmap and load with xmodmap ~/.config/xmodmap
    • add the following to your shell’s rc file (stops the letter D from randomly appearing in your shell):
        bindkey "^[[1;2C" forward-word
        bindkey "^[[1;2D" backward-word
      
  • AHK script for Windows
<slide page="25/27" what="introduction to and exit from vim" who="nyakob" when="07 nov '26" where="maschinenraum" />

more plugins

  1. airline gives u a cool status bar:
  2. vim-polyglot for syntax highlighting
  3. UltiSnips for macros (good for tex)
  4. vimtex for live-ish tex editing 1. markdown-preview.nvim for (you won’t believe this) previewing markdown files
  5. conform for auto-formatting
<slide page="26/27" what="introduction to and exit from vim" who="nyakob" when="07 nov '26" where="maschinenraum" />
<slide page="27/27" what="introduction to and exit from vim" who="nyakob" when="07 nov '26" where="maschinenraum" />