vim - Advanced Text Editor in Linux

From the Linux Essential Commands cheat sheet · File Viewing & Editing · verified Jul 2026

vim - Advanced Text Editor

Powerful modal text editor with steep learning curve

bash
# Edit file
vim file.txt

# Basic commands:
# i - Enter insert mode
# Esc - Exit insert mode
# :w - Save
# :q - Quit
# :wq - Save and quit
# :q! - Quit without saving
# dd - Delete line
# yy - Copy line
# p - Paste
✅ Extremely powerful once learned
💡 Press i to start editing, Esc to exit insert mode
🔍 Type :q! to exit without saving changes
⚡ vimtutor command provides interactive tutorial
editortextadvanced

Continue with Linux Essential Commands

Save the full cheat sheet or work through every related task.

More Linux tasks

Back to the full Linux Essential Commands cheat sheet