-
workspace.registerAutocmd({
event: 'InsertCharPre',
pattern: '<buffer>',
arglist: ['v:char'],
callback: (character) => {
}
}) will :au InsertCharPre
--- Autocommands ---
coc_dynamic_autocmd InsertCharPre
<buffer=3>
call coc#rpc#notify('doAutocmd', [5, v:char]) However, I want to modify workspace.registerAutocmd({
event: 'InsertCharPre',
pattern: '<buffer>',
arglist: ['v:char'],
callback: (character) => {
character = ''
}
}) exe vim command cannot, too. workspace.registerAutocmd({
event: 'InsertCharPre',
pattern: '<buffer>',
arglist: ['v:char'],
callback: (character) => {
workspace.nvim.command("let v:char = ''");
workspace.nvim.executeLua('vim.v.char = ""');
}
}) How to do something like autocmd InsertCharPre <buffer> let v:char='' ? Thanks! |
Beta Was this translation helpful? Give feedback.
Answered by
Freed-Wu
Jun 25, 2024
Replies: 1 comment
-
OK, this work for me: arglist: ['v:char', "execute(\"let v:char = ''\")"],
callback: async (character, _) => { |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
Freed-Wu
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
OK, this work for me: