Method: Neovim::Plugin::DSL#autocmd

Defined in:
lib/neovim/plugin/dsl.rb

#autocmd(event, options = {}, &block) ⇒ Object

Register an nvim autocmd. See :h autocmd.

Parameters:

  • event (String)

    The event type. See :h autocmd-events

  • options (Hash) (defaults to: {})

    Autocmd options.

  • &block (Proc, nil)

    The body of the autocmd.

Options Hash (options):

  • :pattern (String)

    The buffer name pattern. See :h autocmd-patterns.

  • :eval (String)

    An nvim expression. Gets evaluated and passed as an argument to the block.



65
66
67
# File 'lib/neovim/plugin/dsl.rb', line 65

def autocmd(event, options={}, &block)
  register_handler(:autocmd, event, options, block)
end