Skip to content

User autocommands broken after commit 00ed2f1 #2166

@clason

Description

@clason

Description

The latest commit 00ed2f1 broke user autocommands; specifically the line

autocmd User <buffer> VimtexEventInitPost call vimtex#syntax#core#init_post()

(removing the <buffer> avoids the error).

Steps to reproduce

Use the following mini.vim (to avoid interference from installed packages):

let rtp = $VIMRUNTIME
let packpath = $VIMRUNTIME .. '/site'
set nocompatible
let &runtimepath  = '~/.local/share/nvim/site/pack/packer/start/vimtex,' . &runtimepath
let &runtimepath .= ',~/.local/share/nvim/site/pack/packer/start/vimtex/after'
filetype plugin indent on
syntax enable
  1. nvim --clean -u min.vim test.tex
  2. :doautocmd User Foo

(These steps are pointless but minimal; they reproduce similar errors from the builtin LSP client and Telescope when opening tex buffers, for example.)

Actual behavior

Error detected while processing User Autocommands for "<buffer=1>":
E492: Not an editor command: VimtexEventInitPost call vimtex#syntax#core#init_post()

VimtexInfo

Vim version: NVIM v0.6.0-dev+249-g086631cd9

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions