Modern Vim

Book description

Turn Vim into a full-blown development environment using Vim 8's new features and this sequel to the beloved bestseller Practical Vim. Integrate your editor with tools for building, testing, linting, indexing, and searching your codebase. Discover the future of Vim with Neovim: a fork of Vim that includes a built-in terminal emulator that will transform your workflow. Whether you choose to switch to Neovim or stick with Vim 8, you'll be a better developer.

A serious tool for programmers and web developers, no other text editor comes close to Vim for speed and efficiency. Make Vim the centerpiece of a Unix-based IDE as you discover new ways to work with Vim 8 and Neovim in more than 20 hands-on tips.

Execute tasks asynchronously, allowing you to continue in Vim while linting, grepping, building a project, or running a test suite. Install plugins to be loaded on startup - or on-demand when you need them - with Vim 8's new package support. Save and restore sessions, enabling you to quit Vim and restart again while preserving your window layout and undo history. Use Neovim as a drop-in replacement for Vim - it supports all of the features Vim 8 offers and more, including an integrated terminal that lets you quickly perform interactive commands. And if you enjoy using tmux and Vim together, you'll love Neovim's terminal emulator, which lets you run an interactive shell in a buffer. The terminal buffers fit naturally with Vim's split windows, and you can use Normal mode commands to scroll, search, copy, and paste. On top of all that: Neovim's terminal buffers are scriptable.

With Vim at the core of your development environment, you'll become a faster and more efficient developer.

What You Need:

You'll need a Unix-based environment and an up-to-date release of Vim (8.0 or newer). For the tips about running a terminal emulator, you'll need to install Neovim.

Publisher resources

View/Submit Errata

Table of contents

  1.  Acknowledgments
  2.  Introduction
    1. How This Book Is Structured
    2. A Note on Vim Versions
    3. Other Software Requirements
    4. Notation for Simulating Vim on the Page
    5. Minimal Configuration
    6. Using Factory Settings
    7. Downloading the Examples
  3. 1. Get Modern Vim
    1. Tip 1. Installing Vim 8
    2. Tip 2. Switching to Neovim
    3. Tip 3. Enabling Python Support in Neovim
  4. 2. Installing Plugins
    1. Tip 4. Understanding Scripts, Plugins, and Packages
    2. Tip 5. Installing Plugins to Your Package
    3. Tip 6. Managing Plugins with minpac
  5. 3. Opening Files
    1. Tip 7. Finding Files Using Fuzzy Path Matching
    2. Tip 8. Finding Files Semantically
    3. Tip 9. Jumping to an Alternate File
  6. 4. Working with the Quickfix List
    1. Tip 10. Running a Build and Navigating Failures
    2. Tip 11. Switching Compilers
    3. Tip 12. Linting the Current File
    4. Tip 13. Searching Files with Grep-Alikes
    5. Tip 14. Running Tests and Browsing Failures
  7. 5. Neovim’s Built-In Terminal Emulator
    1. Tip 15. Grokking Terminal Mode
    2. Tip 16. Running Programs in a Terminal Buffer
    3. Tip 17. Managing Windows That Contain Terminal Buffers
    4. Tip 18. Using Normal Mode Commands in a Terminal Buffer
    5. Tip 19. Sending Commands to a Terminal Buffer
    6. Tip 20. Applying Customizations to Your Shell in a Terminal Buffer
    7. Tip 21. Avoiding Nested Neovim Instances
    8. Tip 22. Using an Existing nvim Instance as the Preferred Editor
  8. 6. Sessions
    1. Tip 23. Saving and Restoring Sessions
    2. Tip 24. Making Undo Persist Between Sessions
    3. Tip 25. Restarting Terminal Processes When Resuming a Session
  9. 7. Configuring Vim
    1. Tip 26. Using Autocommands to Respond to Events
    2. Tip 27. Respecting Project Conventions
    3. Tip 28. Setting Buffer-Local Configuration Per Project
  10. A1. What’s Next for Modern Vim?
    1. Integrating with the Language Server Protocol
    2. What’s Next for Vim 8
    3. What’s Next for Neovim
  11.  Bibliography

Product information

  • Title: Modern Vim
  • Author(s): Drew Neil
  • Release date: May 2018
  • Publisher(s): Pragmatic Bookshelf
  • ISBN: 9781680502626