-
Notifications
You must be signed in to change notification settings - Fork 398
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Macro tracking issue #564
Comments
I think we can't support macro correctly. (If anyone have any ideas, please let me know.
I think the nvim-cmp should stop working in executing the macro. |
Hey, firstly thanks for the great work @hrsh7th. Then to my question: is there currently a way to deactivate this behavior? Meaning stopping nvim-cmp from executing in the macro as you mentioned? Currently this prevents me from using any macros that include the symbols mentioned in #551 As far as I can remember I would like to help, but sadly I do not know how to fix this. Maybe if others still need this behavior and as a quickfix until someone else figured out a better way, add a flag to disable macro execution? |
By the way, the |
There is no need for those autocommands, you can simply do cmp.setup({
enabled = function()
return vim.fn.reg_recording() == ''
end,
}) |
@dmitmel good to know, sadly enabling/disabling cmp does not seem to work. I am guessing it is because the The events allow for a (at least for me) dirty way of unsetting these mappings when starting the macro, and it seems like nvim-cmp just rebinds them afterwards (but could be that this results in other problems - didnt try it out much yet). In case anyone is interested (use at your own risk): augroup HandleNvimCmpOnMacro
autocmd!
autocmd RecordingEnter * for symbol in [',', '.', '('] | execute('silent! iunmap ' . symbol) | endfor
augroup END Of course if there is a better solution then I would be glad to throw this snippet away. |
Hm... we should define mapping as expr. and we should do something by returning |
@hrsh7th Is this issue solved? Or why was it closed? What is the solution? I still have the problem that I can not record any linebreaks in my macros when I have this enabled:
|
Probably handled in #800 now. |
#551
#558
The text was updated successfully, but these errors were encountered: