Skip to content

Session 03

Topic 1: Interfaces

  • terminal
  • SSH
  • Zsh
  • editors πŸ‘ˆ
  • Git
  • AI

Today

Editors

  1. VS Code
  2. Vim keybindings

Why editors matter

Your editor is your workplace

  • you spend hours/day inside it
  • editing β‰  typing β†’ navigation, refactoring, thinking
  • small frictions β†’ big productivity loss
  • a good editor setup results in fewer bugs, faster thinking

β†’ the editor shapes how you think, debug, and experiment πŸ§ͺ

What makes a β€œgood” editor?

  • syntax, structure awareness 🎨
  • fast navigation, search 🧭
  • integrated tools (terminal, debugger, Git) ⚑
  • extensible, customizable βš™οΈ

VS Code

Why VS Code stands out

  • cross-platform
  • large extension ecosystem
  • has extensions for most languages
    (Python, C/C++, Go, …)
  • SSH & remote development (via extension)
  • Git integration

β€”

β†’ probably the most popular editor
… it is also owned by Microsoft

VS Code productivity shortcuts

wiki β†’ VS Code

Hands-on
  • Ctrl+p β€” jump to any file
  • Ctrl+Shift+p β€” command palette
  • multi-cursor editing (Alt+Click)
  • integrated terminal

VS Code with SSH

  • Remote-SSH extension: edit code on the cluster
  • same GUI, same shortcuts
  • debug locally, run remotely
Hands-on

connect VS Code via SSH to Matrix

Vim editor

Vim - why bother?

πŸ’¬

Brilliant keybindings

  • when coding, typing text happens rarely … but
  • browsing, inspecting, and modifying happens often
  • using only the keyboard is the key to efficiency
  • Vim let’s us edit code at the speed of thought

Vim works everywhere

  • no installation: it comes with the 🐧 OS
  • runs everywhere: laptop, SSH, remote data centers
  • BYO Vim config: just copy ~/.vimrc file elsewhere
  • instant startup, zero GUI dependencies
  • themes, plugins

β†’ frictionless editing in the terminal

Edit at the speed of thought

🧠 β†’ ⌨️

  • Vim is a β€œlanguage for editing”
  • modal editing: different modes for different intentions
  • operator + motion model: β€œwhat you do + where”
  • don’t move the cursor to edit, describe the edit
Example
dw     β†’ delete "d" + word "w"
ci(    β†’ change "c" + inside parentheses "i("
yip    β†’ yank/copy "y" + an entire paragraph "ip"

Vim configuration

wiki β†’ Vim β†’ Configuration

vim wiki/vim.md  # to quit Vim, type: ":q" <Enter>
Hands-on (on Matrix)
vim ~/.vimrc  # switch mode: "i" (insert mode)
              # type text as usual
              # switch back: <Esc> (insert to normal mode)

Vim commands

Vim has modes:

  • Normal β†’ navigate & issue commands
  • Insert β†’ type text
  • Visual β†’ select text
  • Command β†’ save, quit, search, …

Vim in 60 seconds

# Typing: Normal mode β†’ Insert mode β†’ Normal mode
i     β†’ enter Insert mode, then type
Esc   β†’ back to Normal mode
# Move around (in Normal mode)
h     β†’ left
j     β†’ down
k     β†’ up
l     β†’ right
# Save & quit commands (in Normal mode)
:w    β†’ save
:q    β†’ quit
:wq   β†’ save and quit
:q!   β†’ quit without saving

What you can learn today (wiki β†’ Vim)

  • w , b , e β€” three kinds of word-wise movement
  • gg or G β€” go to the top or bottom of a file
  • { or } β€” paragraph jumps (forward or backward)
Editing
  • ci" or ci( β€” change inside quotes or parentheses
  • . β€” repeat last change
  • u β€” undo
  • Ctrl-r β€” redo

Hands-on using the Vim graphical cheat sheet

  • copy, delete, paste
  • visual mode
  • repeat, undo
  • search
  • indentation

Key takeaways

  • editors are force multipliers ⚑
  • invest early in editor skills – the payoff compounds for years

Vim

  • stay on the β€œhome row” ⌨️
  • speed comes from composability – not shortcuts 🧩
  • broader picture: Vim keybindings are universal 🌍
    β†’ use inside any IDE (VS Code) / Email client / …

Looking ahead

  • version control is all you need to avoid code chaos
  • Git – move fast without loosing trust in your work
  • safe experimentation and collaboration

Prepare for the next session 🌱

sessions/04-todo