coverpage
Title Page
Dedication
About Packt
Why subscribe?
Packt.com
Contributors
About the author
About the reviewer
Packt is searching for authors like you
Preface
Who this book is for
What this book covers
Download the example code files
Conventions used
Get in touch
Reviews
Getting Started
Technical requirements
Let’s start a conversation (about modal interfaces)
Installation
Setting up on Linux
Setting up on MacOS
Using Homebrew
Downloading a .dmg image
Setting up on Windows
Unix-like experience with Cygwin
Installing Cygwin
Using Cygwin
Visual Vim with gVim
Verifying and troubleshooting the installation
Vanilla Vim vs gVim
Configuring Vim with your .vimrc
Common operations (or how to exit Vim)
Opening files
Changing text
Saving and closing files
A word about swap files
Moving around: talk to your editor
Making simple edits in insert mode
Persistent undo and repeat
Read the Vim manual using :help
Summary
Advanced Editing and Navigation
Technical requirements
Installing plugins
Organizing workspace
Buffers
Plugin spotlight – unimpaired
Windows
Creating deleting and navigating windows
Moving windows
Resizing windows
Tabs
Folds
Folding Python code
Types of folds
Navigating file trees
Netrw
:e with wildmenu enabled
Plugin spotlight – NERDTree
Plugin spotlight – Vinegar
Plugin spotlight – CtrlP
Navigating text
Jumping into insert mode
Searching with / and ?
Searching across files
ack
Utilizing text objects
Plugin spotlight – EasyMotion
Copying and pasting with registers
Where do the registers come in?
Copying from outside of Vim
Summary
Follow the Leader - Plugin Management
Technical requirements
Managing plugins
vim-plug
Honorable mentions
Vundle
Do it yourself
Pathogen
Profiling slow plugins
Profiling startup
Profiling specific actions
Deeper dive into modes
Normal mode
Command-line and ex modes
Insert mode
Visual and select mode
Replace and virtual replace mode
Terminal mode
Remapping commands
Mode – aware remapping
The leader key
Configuring plugins
Summary
Understanding the Text
Technical requirements
Code autocomplete
Built-in autocomplete
YouCompleteMe
Installation
Using YouCompleteMe
Navigating the code base with tags
Exuberant Ctags
Automatically updating the tags
Undo tree and Gundo
Summary
Build Test and Execute
Technical requirements
Working with version control
Quick-and-dirty version control and Git introduction
Concepts
Setting up a new project
Cloning an existing repository
Working with Git
Adding files committing and pushing
Creating and merging branches
Integrating Git with Vim (vim-fugitive)
Resolving conflicts with vimdiff
Comparing two files
vimdiff and Git
git config
Creating merge conflict
Resolving a merge conflict
tmux screen and Vim terminal mode
tmux
Panes are just like splits
Windows are just like tabs
Sessions are invaluable
tmux and Vim splits
Screen
Terminal mode
Building and testing
Quickfix list
Location list
Building code
Plugin spotlight: vim-dispatch
Testing code
Plugin spotlight – vim-test
Syntax checking code with linters
Using linters with Vim
Plugin spotlight – Syntastic
Plugin spotlight – ALE
Summary
Refactoring Code with Regex and Macros
Technical requirements
Search or replace with regular expressions
Search and replace
Operations across files using arglist
Regex basics
Special regex characters
Alternation and grouping
Quantifiers or multis
More about magic
Magic
No magic
Very magic
Applying the knowledge in practice
Renaming a variable a method or a class
Reordering function arguments
Recording and playing macros
Editing macros
Recursive macros
Running macros across multiple files
Using plugins to do the job
Summary
Making Vim Your Own
Technical requirements
Playing with the Vim UI
Color schemes
Browsing the color schemes
Common issues
The status line
Powerline
Airline
gVim-specific configuration
Keeping track of configuration files
Healthy Vim customization habits
Optimizing your workflow
Keeping .vimrc organized
Summary
Transcending the Mundane with Vimscript
Technical requirements
Why Vimscript?
How to execute Vimscript
Learning the syntax
Setting variables
Surfacing output
Conditional statements
Lists
Dictionaries
Loops
Functions
Classes
Lambda expressions
Map and filter
Interacting with Vim
File-related commands
Prompts
Using :help
A word about style guides
Let's build a plugin
Plugin layout
The basics
Housekeeping
Improving our plugin
Distributing the plugin
Where to take the plugin from here
Further reading
Summary
Neovim
Technical requirements
Why make another Vim?
Installing and configuring Neovim
Checking health
Sane defaults
Oni
Neovim plugin highlights
Summary
Where to Go from Here
Seven habits of effective text editing
Modal interfaces everywhere
A Vim-like web browsing experience
Vimium and Vimium-FF
Alternatives
Vim everywhere else
vim-anywhere for Linux and macOS
Text Editor Anywhere for Windows
Recommended reading and communities
Mailing lists
IRC
Other communities – learning resources
Summary
Other Books You May Enjoy
Leave a review - let other readers know what you think
更新时间:2021-06-10 18:52:02