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

[Bug] Recursive macro doesn't work with bullets.vim loaded #94

Open
mawkler opened this issue Mar 13, 2021 · 2 comments
Open

[Bug] Recursive macro doesn't work with bullets.vim loaded #94

mawkler opened this issue Mar 13, 2021 · 2 comments

Comments

@mawkler
Copy link

mawkler commented Mar 13, 2021

This recursive macro didn't work and after some investigation I found out that removing bullets.vim solves the issue. I have no clue why, but here's how to reproduce it:

  1. Use the following .vimrc/init.vim:

    call plug#begin('~/.vim/bundle')
    Plug 'dkarter/bullets.vim'
    call plug#end()
  2. Create a new file that contains the following line:

    1,2,3,4,5,6
    
  3. Execute the following commands on that line, which creates a recursive macro in register q: _qqqqqf,a<CR><Esc>@qq, and immediately after that press @q to call the macro.

  4. The file is unchanged. However, without bullets.vim, the file will look like this:

    1,
    2,
    3,
    4,
    5,
    6
    

Output of :version:

NVIM v0.5.0-dev+1133-g0869cbd55
Build type: RelWithDebInfo
LuaJIT 2.1.0-beta3
Compilation: /usr/bin/cc -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 -O2 -g -Og -g -
Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -W
shadow -Wconversion -Wmissing-prototypes -Wvla -fstack-protector-strong -fno-c
ommon -fdiagnostics-color=always -DINCLUDE_GENERATED_DECLARATIONS -D_GNU_SOURC
E -DNVIM_MSGPACK_HAS_FLOAT32 -DNVIM_UNIBI_HAS_VAR_FROM -DMIN_LOG_LEVEL=3 -I/ho
me/runner/work/neovim/neovim/build/config -I/home/runner/work/neovim/neovim/sr
c -I/home/runner/work/neovim/neovim/.deps/usr/include -I/usr/include -I/home/r
unner/work/neovim/neovim/build/src/nvim/auto -I/home/runner/work/neovim/neovim
/build/include
Compiled by runner@fv-az49-948

Features: +acl +iconv +tui
See ":help feature-compile"

   system vimrc file: "$VIM/sysinit.vim"
  fall-back for $VIM: "/share/nvim"

The same error appears in Vim as well.

@daviewales
Copy link

I've hit something similar. I don't think recursion is the problem. Rather, bullets.vim seems to remove newlines if they are inserted by a macro.

For example, with the following .vimrc:

call plug#begin('~/.vim/plugged')
Plug 'dkarter/bullets.vim'
call plug#end()

And the following macro defined (note that ^[ is a literal ESC, not the characters ^ and [):

o```^[

If I run the macro on a line of text, I would expect to see:

line of text
```

But instead I see:

line of text```

If I disable bullets.vim, I get the expected result.

@mawkler
Copy link
Author

mawkler commented Oct 20, 2023

I've switched to autolist.nvim instead and it works great :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants