The VimL Primer by Benjamin Klein

The VimL Primer by Benjamin Klein

Author:Benjamin Klein
Language: eng
Format: epub
Tags: Pragmatic Bookshelf
ISBN: 978-1-68050-040-0
Publisher: The Pragmatic Bookshelf, LLC


In actuality, every autocommand we write is included in an autocommand group. By default, new autocommands are placed in the default group. In fact, when we define a new group, we’re essentially laying out a break from the default group: all of the autocommands declared before our group begins are part of the default group, the ones declared after it begins are part of our group, and the ones declared after our group ends are back to being in the default group. If we’re declaring several related autocommands, it’s a good idea to collect them in our own group.

Like the autoload system, autocommand groups serve a dual purpose. By separating autocommands into groups, we can execute a group’s autocommands specifically. This means that, similar to how we declare functions, we can override previously defined autocommands before we declare new ones. A standard practice in defining autocommand groups is to start by deleting or clearing all previous commands that might be part of the group, like so:

​ ​augroup​ nameOfOurGroup



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.