Skip to content

Commit

Permalink
MatchIt: add :packadd for Vim 8
Browse files Browse the repository at this point in the history
  • Loading branch information
mhinz committed Jan 4, 2017
1 parent 0ff0df8 commit 54f75b7
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1830,12 +1830,18 @@ Vim comes bundled with a plugin called matchit.vim which is not enabled by
default. It makes `%` also cycle through HTML tags, if/else/endif constructs in
VimL etc. and introduces a few new commands.

To always load the plugin, put this in your vimrc:
#### Installation for Vim 8

```vim
if !exists('g:loaded_matchit')
runtime macros/matchit.vim
endif
" vimrc
packadd! matchit
```

#### Installation for Vim 7 and older

```vim
" vimrc
runtime macros/matchit.vim
```

Since the documentation of matchit is pretty extensive, I suggest also doing the
Expand All @@ -1847,6 +1853,8 @@ following once:
:helptags ~/.vim/doc
```

#### Small intro

The plugin is ready to use now. See `:h matchit-intro` for the supported
commands and `:h matchit-languages` for the supported languages.

Expand Down

0 comments on commit 54f75b7

Please sign in to comment.