autocmd

package
v0.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 20, 2020 License: BSD-3-Clause Imports: 15 Imported by: 0

Documentation

Overview

Package autocmd hooks the Neovim autocmd and run the go commands.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Register

func Register(ctx context.Context, p *plugin.Plugin, buildContext *buildctxt.Context, cmd *command.Command)

Register registers autocmd to Neovim.

:help rpcrequest()
:help rpcnotify()

Types

type Autocmd

type Autocmd struct {
	Nvim *nvim.Nvim
	// contains filtered or unexported fields
}

Autocmd represents a autocmd context.

func (*Autocmd) BufEnter

func (a *Autocmd) BufEnter(pctx context.Context, eval *bufEnterEval)

BufEnter gets the current buffer number, windows ID and set context from the directory structure on BufEnter autocmd.

func (*Autocmd) BufReadPre

func (a *Autocmd) BufReadPre(ctx context.Context, eval *bufReadPreEval)

BufReadPre gets user config variables and assign to global variable when autocmd BufReadPre.

func (*Autocmd) BufWritePost

func (a *Autocmd) BufWritePost(pctx context.Context, eval *bufWritePostEval) error

BufWritePost run the 'autosave' commands on BufWritePost autocmd.

func (*Autocmd) BufWritePre

func (a *Autocmd) BufWritePre(pctx context.Context, eval *bufWritePreEval)

BufWritePre run the commands on BufWritePre autocmd.

func (*Autocmd) VimEnter

func (a *Autocmd) VimEnter(ctx context.Context, cfg *config.Config)

VimEnter gets user config variables and assign to global variable when autocmd VimEnter.

func (*Autocmd) VimLeavePre

func (a *Autocmd) VimLeavePre(pctx context.Context)

func (*Autocmd) WinEnter

func (a *Autocmd) WinEnter(pctx context.Context, eval *winEnterEval) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL