Yggdroot / indentLine

A vim plugin to display the indention levels with thin vertical lines
MIT License
4.13k stars 227 forks source link

error dected when vim startup #369

Closed ljhui closed 2 years ago

ljhui commented 2 years ago

I use vim-bootstrap to generate my vim config with some modifies, it works well in the past time, but recently vim throw out a error everytime when startup:

Error detected while processing BufWinEnter Autocommands for "*"..function <SNR>99_Setup[6]..<SNR>99_IndentLinesEnable[10]..<SNR>99_SetConcealOption:        
line    8:

this is my vimrc file, I have used :PlugUpdate update to latest indentLine version, the error still there. Temporarily, I have to comment Plug 'Yggdroot/indentLine' to let those errors disappear. I doesn't play well with vim, how to fix it?

davised commented 2 years ago

I'm having the same issue, just started recently.

vim --version
VIM - Vi IMproved 8.2 (2019 Dec 12, compiled Mar 09 2022 00:00:00)
Included patches: 1-4529
Modified by <bugzilla@redhat.com>
Compiled by <bugzilla@redhat.com>

I'm on fedora workstation version 35 if that matters.

ljhui commented 2 years ago

I'm having the same issue, just started recently.

vim --version
VIM - Vi IMproved 8.2 (2019 Dec 12, compiled Mar 09 2022 00:00:00)
Included patches: 1-4529
Modified by <bugzilla@redhat.com>
Compiled by <bugzilla@redhat.com>

I'm on fedora workstation version 35 if that matters.

same with you, my system is also fedora 35, the vim version actually is same

starit commented 2 years ago

same here, latest macbook pro (with m1 max chip)

prandelicious commented 2 years ago

Experiencing the same error here. Is there an alternative to this plugin?

mopig commented 2 years ago

Same error.

ljhui commented 2 years ago

in my fedora 35, I just use sudo dnf downgrade vim-enhanced --allowerasing to downgrade vim to 8.2.3404, after that, the error goes, so threre is some problems with indentLine to compatible with newer vim.

bignimbus commented 2 years ago

I have this same line in my vimrc and have seen the same error that you see. After inspecting this snippet in the source code:

https://github.com/Yggdroot/indentLine/blob/7753505f3c500ec88d11e9373d05250f49c1d900/after/plugin/indentLine.vim#L104

I tried changing 0 to "inc" in my vimrc. That appears to have resolved the issue. So try changing this:

" :(
let g:indentLine_concealcursor = 0

to this:

" :)
let g:indentLine_concealcursor = "inc"
Yggdroot commented 2 years ago

https://gist.github.com/ljhui/119df3dfcfd6a95d9bc2facc55b54f44#file-vimrc-L182

Why do you set let g:indentLine_concealcursor = 0? g:indentLine_concealcursor is a string, you can set let g:indentLine_concealcursor = '' or leave it alone.

ljhui commented 2 years ago

https://gist.github.com/ljhui/119df3dfcfd6a95d9bc2facc55b54f44#file-vimrc-L182

Why do you set let g:indentLine_concealcursor = 0? g:indentLine_concealcursor is a string, you can set let g:indentLine_concealcursor = '' or leave it alone.

this is auto-generated by vim-bootstrap ,all vim-bootstrap generated config files have this line, maybe vim-bootstrap still uses an out-dated customization . I should read the IndentLine readme first, actually this line cause the problem, after change , the error fixs, thanks all!

laurentgoudet commented 2 years ago

I've submitted a PR (https://github.com/editor-bootstrap/vim-bootstrap/pull/407) to fix it upstream; presumably this issue can be fixed as I doubt VIM plugins should sanitize their configs?