Vim Survival Kit
Edit on any server with modes, save-quit, and search-replace.
- vim basics
- vim save quit
- vim search
- vim replace
- server edit
Vim Survival Kit
Edit on any server with modes, save-quit, and search-replace.
Commands
| Command | What it does |
|---|---|
i and Escape | Enter insert mode, back to normal |
write file | Save command |
quit without saving | Force quit command |
save and quit | Write-quit command |
search and next match | Slash search with n and N keys |
substitute range | Search-replace across lines |
Example
vim config.yml
# press i to edit, Esc to stop
# :%s/old/new/g then :wq
FAQ
How do I exit vim?
Escape, then :wq to save and quit, or :q! to abandon changes.
How do I replace across a file?
Use the percent-range substitute with the g flag, previewing with the n flag first.
คำถามที่พบบ่อย
How do I exit vim?
Escape, then :wq to save and quit, or :q! to abandon changes.
How do I replace across a file?
Use the percent-range substitute with the g flag, previewing with the n flag first.
Linux
Linux Files and Directories
Navigate, create, move, and inspect files with core commands.
Linux Permissions
Read ls output, chmod, chown, and sudo without breaking access.
Linux Text Processing
cat, head, cut, sort, uniq, and awk for daily data shaping.
Linux grep and find
Find files by name, age, and size; search inside them fast.