Skip to content
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

Not behaving as expected when using [count]o #479

Open
gabs712 opened this issue Oct 16, 2024 · 0 comments
Open

Not behaving as expected when using [count]o #479

gabs712 opened this issue Oct 16, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@gabs712
Copy link

gabs712 commented Oct 16, 2024

Description

Using [count]o or [count]O on normal mode generates undesirable result with pairs.

Mapping bug

No response

Steps to reproduce

Typing 3ovim.keymap.set('n', '', '', { desc = ''<Esc> on normal mode generates:

vim.keymap.set('n', '', '', { desc = ''
vim.keymap.set('n', '', '', { desc = ''
vim.keymap.set('n', '', '', { desc = ''})})})

It only works as expected when closing all pairs manually (3ovim.keymap.set('n', '', '', { desc = '' })<Esc>):

vim.keymap.set('n', '', '', { desc = '' })
vim.keymap.set('n', '', '', { desc = '' })
vim.keymap.set('n', '', '', { desc = '' })

It would be preferable to have some option to disable autopairs when using o/O, like"disable_in_macro".

Minimal config

require('nvim-autopairs').setup({
      disable_filetype = {
        'TelescopePrompt',
        'spectre_panel',
        'harpoon',
      },
      disable_in_macro = true,
      disable_in_replace_mode = true,
      disable_in_visualblock = true,

      map_cr = true,
      map_bs = true,
      map_c_h = true,
      map_c_w = true,
    })
@gabs712 gabs712 added the bug Something isn't working label Oct 16, 2024
@gabs712 gabs712 changed the title Not working as expected when using [count]o Not behaving as expected when using [count]o Oct 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant