DISCLAIMER: The docker features and the build script in this repository were built by AI. I put this together for a presentation in less than 24 hours, review that code before executing as it has not been fully reviewed yet.
Link to the PowerShell Wednesday's video: Andew learns VIM on a whim with Mason Moser
Move around with arrow keys, or with Vim movement keys:
h= leftj= downk= upl= right
Basic exit commands:
- Close current window:
:q<Enter> - Exit Vim without saving:
:qa!<Enter>(careful, all changes are lost)
- Normal mode
Escalways gets you back to normal modeienters insert modeventers visual mode- Modes are shown at the bottom-left status area
- You run most Vim commands from normal mode
- Insert mode
- This is where you type text normally
- Visual mode
- Beginners use this less at first
- Useful for selecting text, then doing something with that selection
In normal mode, most editing actions are:
Command + Count + Motion
Example:
dddeletes a full line (same operator pressed twice applies to the whole line)
d= deletec= changey= yank (we do not "copy" in Vim, we "yank"... cute right?)v= visual modex= delete one character.= repeat last command
w= move forward by wordb= move back by wordl= move right by letter0= very beginning of line (column 0)^= first non-whitespace character on the line$= end of line
dw= delete wordd$/D= delete to end of linedt<char>= delete up to a specific charactercw= change wordC= change to end of lineci"/ci{/ci(= change inside delimitersdi"/di(= delete inside delimiters
Buffers are where deleted/yanked text goes automatically.
Types you should know:
- Default buffer: acts like your automatic clipboard
- Other automatic buffers: Vim keeps a few histories for you automatically
- Named buffers: you can intentionally store text in named slots for later use
Quick example:
ddto delete a line- Move cursor
pto put (paste) it below
- Go to top of file:
gg - Go to bottom of file:
G - Go to line:
{number}G - Jump by word:
w - Jump back by word:
b - Jump quickly by count:
20j(move down 20 lines) - Match bracket/brace/paren:
% - Find text:
/searchTerm(this is your Vim version ofCtrl+F) - Scroll half page down/up:
Ctrl+d/Ctrl+u - Jump to next/previous paragraph-ish block:
Shift+}/Shift+{ - Center cursor line on screen:
zz
- Show line numbers:
:set number - Show relative numbers:
:set relativenumber
The full guided exercises live in learn_VIM_Motions_for_PowerShell.ps1.
Beginner progression:
- Movement and positioning
- Start/end of line (
0,^,$) - Top/bottom/specific line (
gg,G,{n}G) - Navigation helpers (
20j,Ctrl+d,Ctrl+u,Shift+},Shift+{,zz)
- Start/end of line (
- Basic edits
- Delete character (
x) - Line ops (
dd,yy,cc,p) - Undo/redo (
u,Ctrl+r) - Open new lines (
o,O)
- Delete character (
- Operator + motion fluency
dw,D,C,cw,dt<char>,.
- Search and structure
/search (replace the usual editorCtrl+Fflow)%matching delimiters- Inside delimiters (
ci",ci{,di()
- Productivity and formatting
- Duplicate lines (
yy,p) - Visual line mode (
V) and indent/dedent (>,<) - Number increment/decrement (
Ctrl+a,Ctrl+x) - Case toggles (
~,gUU,guu) - Substitute in file (
:%s/old/new/g)
- Duplicate lines (
If you are brand new, run the guided installer script first:
buildNeovimInAnyOS.ps1
What it covers:
- Detects OS and available package manager
- Confirms install command before running
- Handles common elevation/admin cases
- Checks whether
nvimis inPATH - Offers optional health check
- Offers optional starter config install (with backup if config exists)
- Provides troubleshooting tips if something fails
Official Neovim install docs:
If you want a containerized Neovim environment (local Docker or GitHub Codespaces):
- See
README.docker.md
- Learn to type faster: https://www.keybr.com/
- Official Neovim install instructions: https://neovim.io/doc/install/
- Game to learn basic VIM motions: https://vim-adventures.com/
- Manbearpiet's intro blog post: https://manbearpiet.com/posts/nvim/
- Manbearpiet's Neovim config repository: https://github.com/Manbearpiet/kickstart.nvim/tree/master#
- Jake Hildreth's Locksmith2 repository: https://github.com/jakehildreth/Locksmith2/tree/main
This repository is intended for sharing and collaboration. Please keep it safe to publish:
- Do not commit credentials, keys, tokens, or
.envfiles with real values. - Use
.env.exampleas a placeholder template only. - Keep machine-local/editor runtime files out of version control.
This repo includes gitleaks scanning in CI (.github/workflows/secret-scan.yml) and supports local pre-commit scans (.pre-commit-config.yaml).
To enable local scans:
- Install pre-commit:
pip install pre-commit
- Install hooks:
pre-commit install
- Run scan manually:
pre-commit run --all-files
