neoclide / coc.nvim

Nodejs extension host for vim & neovim, load extensions like VSCode and host language servers.
Other
24.15k stars 953 forks source link

Programmatical cancel/abort of cursors/range session through editor.action.cancelRanges #5052

Open LucHermitte opened 1 week ago

LucHermitte commented 1 week ago

Issue to trace the feature request discussed in https://github.com/neoclide/coc.nvim/discussions/4986

Is your feature request related to a problem? Please describe.

There is no programmatically way to cancel a cursors/range session.

Describe the solution you'd like

Support for the following would be perfect

:call CocAction('runCommand', 'editor.action.cancelRanges')

Describe alternatives you've considered

I know feedkeys() could be used, but I'd rather avoid feeding <esc> if I could.

Additional context

My main use case would be to replace an internal the dependence in my plugins to implement named-placeholders. See the discussion in #4986