Register autocmds once

This commit changes the autocmd registration in vimwiki so that
registration happens once rather than once per extension.

Instead of the following,

    autocmd BufEnter *.md call s:setup_buffer_enter()
    autocmd BufEnter *.mdown call s:setup_buffer_enter()

We'll now only run,

    autocmd BufEnter *.md,*.mdown call s:setup_buffer_enter()

This probably has no effect on performance but it makes for a simpler
implementation.
This commit is contained in:
Abhinav Gupta
2019-08-18 13:47:19 -07:00
parent 28d78b0d39
commit 152a7bfdf1
2 changed files with 29 additions and 27 deletions

View File

@ -3457,6 +3457,7 @@ Contributors and their Github usernames in roughly chronological order:
- Alexander Gude (@agude)
- Jonny Bylsma (@jbylsma)
- Shaedil (@Shaedil)
- Abhinav Gupta (@abhinav)
==============================================================================