Open zchee opened 5 years ago
/cc @justinmk My Interpretation is correct?
@zchee sure we could enhance remote/define.vim
. But AFAIK remote/define.vim
already manages autocmds as needed, so I don't know what the "once" feature would be used for. Does go-client have an API for defining generic autocmds?
@justinmk I will more detail comment later.
Just in case,
But AFAIK remote/define.vim already manages autocmds as needed
I said once
feature means ++once
arg on autocmd.
https://github.com/neovim/neovim/commit/3259e45f926bcde4052e8b989e039f6047c2b205
The garyburd styles remote#host#Register
usage for Go plugin is depends runtime/autoload/remote/host.vim
.
Anyway, will comment later.
I said
once
feature means++once
arg on autocmd.
Understood. But I don't see what it would be used for.
Just for confirm, in case of vim script, when register some func to CursorMoved
autocmd with ++once
, that func will called when only of first CursorMoved
event, right?
Yup, the autocmd gets removed after its first usage.
@mhinz Thanks, so describe to how to use in Go with pseudo code later.
Currently, there is no
Once
field onAutocmdOptions
. https://github.com/neovim/go-client/blob/805675898d92f6fc53018e83366ec9e58205c8ff/nvim/plugin/plugin.go#L277But not works even if adding that field (on local env) I think should be support and change nvim core
runtime/autoload/remote/define.vim
.https://github.com/neovim/neovim/blob/2a3bcd1ff883429a3dd17e7ae5ddc1396abbad17/runtime/autoload/remote/define.vim#L228