๐ Vim Editor Cheat Sheet
๐ Specialized Vim Learning Site: vimate
Master the basics through this dedicated platform:
๐ ๏ธ Essential Vim Operations
๐ File Operations
| Operation | Command |
|---|---|
| Open file | :e |
| Save file | :w |
| Quit | :q |
| Force quit | :q! |
๐ Mode Switching
| Operation | Command |
|---|---|
| Enter Insert mode | i |
| Insert at line start | I |
| Insert at line end | A |
| Insert new line below | o |
| Return to Normal mode | Ctrl + [ / Esc |
๐ก Pro Tip
Keyboard layouts vary - train yourself to use Ctrl+[ instead of Esc for smoother workflow!
๐ Cursor Navigation
| Operation | Command |
|---|---|
| Scroll down | Ctrl + f |
| Scroll up | Ctrl + b |
| Jump to first line | gg |
| Jump to last line | G |
โ๏ธ Line Joining
Press J (Shift+j) on the line you want to join
๐ Advanced Vim Techniques
โ๏ธ Cut/Paste Specific Ranges
- Move to starting line
- Set mark with
ms - Move to ending line
- Delete marked area with
d ' s - Paste with
p
๐ Batch Indentation
Shift + v(visual line mode)- Select target lines
Shift + >(indent right)
๐ Full-file Indentation
Shift + vโShift + g(select all lines)>>(indent entire file)
๐ Interactive Replace
:%s/old_text/new_text/gc
๐งฉ Plugin Management
๐ Vundle Plugin Setup
git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim
After launching Vim, execute:
:PluginInstall
๐ Python Development Setup
โก JEDI-VIM Installation
Autocompletion powerhouse for Python
git clone --recursive https://github.com/davidhalter/jedi-vim.git ~/.vim/bundle/jedi-vim
Add to your .vimrc:
Plugin 'davidhalter/jedi-vim'
๐ป CLI Coding Mastery
Transform terminal sessions into IDE-like environments with:
Vim + JEDI = PyCharm-level completions in console! โก