New To Vim? Read This First
- Why This Guide Was Written
- How To Transition To Vim From Using A Different Text Editor
- How To Read This Guide
- More Help
- Syntax
- Vimrc
- Future, Errors, Questions
- I Want More Vim Tricks
- Thank Yous
Ch01. Starting Vim
- Installing
- The Vim Command
- Exiting Vim
- Saving A File
- Help
- Opening a File
- Arguments
- Opening Multiple Windows
- Suspending
- Starting Vim The Smart Way
Ch02. Buffers, Windows, and Tabs
- Buffers
- Exiting Vim
- Windows
- Tabs
- Moving In 3D
- Using Buffers, Windows, and Tabs The Smart Way
Ch03. Searching Files
- Opening And Editing Files
- Searching Files With Find
- Find And Path
- Searching In Files With Grep
- Browsing Files With Netrw
- Fzf
- Setup
- Fzf Syntax
- Finding Files
- Finding In Files
- Other Searches
- Replacing Grep With Rg
- Search And Replace In Multiple Files
- Learn Search The Smart Way
Ch04. Vim Grammar
- How To Learn A Language
- Grammar Rule
- Nouns (Motions)
- Verbs (Operators)
- Verb And Noun
- More Nouns (Text Objects)
- Composability And Grammar
- Learn Vim Grammar The Smart Way
Ch05. Moving In A File
- Character Navigation
- Relative Numbering
- Count Your Move
- Word Navigation
- Current Line Navigation
- Sentence And Paragraph Navigation
- Match Navigation
- Line Number Navigation
- Window Navigation
- Scrolling
- Search Navigation
- Jump
- Learn Navigation The Smart Way
Ch06. Insert Mode
- Ways To Go To Insert Mode
- Different Ways To Exit Insert Mode
- Repeating Insert Mode
- Deleting Chunks In Insert Mode
- Insert From Register
- Scrolling
- Autocompletion
- Executing A Normal Mode Command
- Learn Insert Mode The Smart Way
Ch07. The Dot Command
- Usage
- What Is A Change?
- Multi-line Repeat
- Including A Motion In A Change
- Learn The Dot Command The Smart Way
Ch08. Registers
- The Ten Register Types
- Register Operators
- Calling Registers From Insert Mode
- The Unnamed Register
- The Numbered Registers
- The Small Delete Register
- The Named Register
- The Read-Only Registers
- The Alternate File Register
- The Expression Register
- The Selection Registers
- The Black Hole Register
- The Last Search Pattern Register
- Viewing The Registers
- Executing A Register
- Clearing A Register
- Putting The Content Of A Register
- Learning Registers The Smart Way
Ch09. Macros
- Basic Macros
- Safety Guard
- Command Line Macro
- Executing A Macro Across Multiple Files
- Recursive Macro
- Appending A Macro
- Amending A Macro
- Macro Redundancy
- Series Vs Parallel Macro
- Learn Macros The Smart Way
Ch10. Undo
- Undo, Redo, And UNDO
- Breaking The Blocks
- Undo Tree
- Persistent Undo
- Time Travel
- Learn Undo The Smart Way
Ch11. Visual Mode
- The Three Types Of Visual Modes
- Visual Mode Navigation
- Visual Mode Grammar
- Visual Mode And Command-line Commands
- Adding Text On Multiple Lines
- Incrementing Numbers
- Selecting The Last Visual Mode Area
- Entering Visual Mode From Insert Mode
- Select Mode
- Learn Visual Mode The Smart Way
Ch12. Search And Substitute
- Smart Case Sensitivity
- First And Last Character In A Line
- Repeating Search
- Searching For Alternative Words
- Setting The Start And End Of A Match
- Searching Character Ranges
- Searching For Repeating Characters
- Predefined Character Ranges
- Search Example: Capturing A Text Between A Pair Of Similar Characters
- Search Example: Capturing A Phone Number
- Basic Substitution
- Repeating The Last Substitution
- Substitution Range
- Pattern Matching
- Substitution Flags
- Changing The Delimiter
- Special Replace
- Alternative Patterns
- Substituting The Start And The End Of A Pattern
- Greedy And Non-Greedy
- Substituting Across Multiple Files
- Substituting Across Multiple Files With Macros
- Learning Search And Substitution The Smart Way
Ch13. The Global Command
- Global Command Overview
- Inverse Match
- Pattern
- Passing A Range
- Normal Command
- Executing A Macro
- Recursive Global Command
- Changing The Delimiter
- The Default Command
- Reversing The Entire Buffer
- Aggregating All TODOs
- Black Hole Delete
- Reduce Multiple Empty Lines To One Empty Line
- Advanced Sort
- Learn The Global Command The Smart Way
Ch14. External Commands
- The Bang Command
- Reading The STDOUT Of A Command Into Vim
- Writing The Buffer Content Into An External Command
- Executing An External Command
- Filtering Texts
- Normal Mode Command
- Learn External Commands The Smart Way
Ch15. Command-line Mode
- Entering And Exiting The Command-line Mode
- Repeating The Previous Command
- Command-line Mode Shortcuts
- Register And Autocomplete
- History Window And Command-line Window
- More Command-line Commands
- Learn Command-line Mode The Smart Way
Ch16. Tags
- Tag Overview
- Tag Generator
- Tags Anatomy
- The Tag File
- Generating Tags For A Large Project
- Tags Navigation
- Tag Priority
- Selective Tag Jumps
- Autocompletion With Tags
- Tag Stack
- Automatic Tag Generation
- Generate A Tag On Save
- Using Plugins
- Ctags And Git Hooks
- Learn Tags The Smart Way
Ch17. Fold
- Manual Fold
- Different Fold Methods
- Indent Fold
- Marker Fold
- Syntax Fold
- Expression Fold
- Diff Fold
- Persisting Fold
- Learn Fold The Smart Way
Ch18. Git
- Diffing
- Vim As A Merge Tool
- Git Inside Vim
- Plugins
- Vim-fugitive
- Git Status
- Git Blame
- Gdiffsplit
- Gwrite And Gread
- Gclog
- More Vim-Fugitive
- Learn Vim And Git The Smart Way
Ch19. Compile
- Compile From the Command Line
- The Make Command
- Compiling With Make
- Different Make Program
- Auto-compile On Save
- Switching Compiler
- Creating A Custom Compiler
- Async Compiler
- Plugin: Vim-dispatch
- Learn Compile The Smart Way
Ch20. Views, Sessions, And Viminfo
- View
- Sessions
- Viminfo
- Using Views, Sessions, And Viminfo The Smart Way
Ch21. Vimrc
- How Vim Finds Vimrc
- What To Put In My Vimrc?
- Basic Vimrc Content
- Organizing Vimrc
- Running Vim With Or Without Vimrc And Plugins
- Configure Vimrc The Smart Way
Ch22. Vim Packages
- Pack Directory
- Two Types Of Loading
- Organizing packages
- Adding Packages The Smart Way
Ch23. Vim Runtime
- Runtime Path
- Plugin Scripts
- Filetype Detection
- File Type Plugin
- Indent Files
- Colors
- Syntax Highlighting
- Documentation
- Lazy Loading Scripts
- After Scripts
- $VIMRUNTIME
- Runtimepath Option
- Learn Runtime The Smart Way
Ch24. Vimscript Basic Data Types
- Data Types
- Following Along With Ex Mode
- Number
- Float
- String
- List
- Dictionary
- Special Primitives
- Learn Data Types The Smart Way
Ch25. Vimscript Conditionals And Loops
- Relational Operators
- If
- Ternary Expression
- Or
- And
- For
- While
- Error Handling
- Learn conditionals the smart way
Ch26. Vimscript Variables And Scopes
- Mutable And Immutable Variables
- Variable Sources
- Variable Scopes
- Using Vim Variable Scopes The Smart Way
Ch27. Vimscript Functions
- Function Syntax Rules
- Listing Available Functions
- Removing A Function
- Function Return Value
- Formal Arguments
- Function Local Variable
- Calling A Function
- Default Argument
- Variable Arguments
- Range
- Dictionary
- Funcref
- Lambda
- Method Chaining
- Closure
- Learn Vimscript Functions The Smart Way