Yggdroot / indentLine

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

(Re-)setup indent guide lines on for missing autocommands #299

Closed ohcibi closed 4 years ago

ohcibi commented 4 years ago

The setup was not redone on BufEnter and TerminalOpen|TermOpen which made the plugin ignore the indentLIne_*Exclude and probably also the indentLine_FileType configuration option in some situations. Possibly a fix for #297

Yggdroot commented 4 years ago

BufEnter is almost a duplicate of BufWinEnter, the function will be called twice every time a buffer is entered. I don't want to have the slowdown.

ohcibi commented 4 years ago

@Yggdroot the exclude filetypes/buftypes feature is broken without it. Do you have another idea? Why is BufWinEnter needed? We could remove that since instead.

Sent with GitHawk

Yggdroot commented 4 years ago

BufWinEnter is necessary to support modeline.

ohcibi commented 4 years ago

Then we need to split up that functionality. BufWinEnter is not called in every necessary situation. The documentation clearly recommends BufEnter for filetype specific settings. Since this is about excluding file types it should be called there.

Sent with GitHawk

Yggdroot commented 4 years ago

So we can save the &shiftwidth and &tabstop to buffer-local variables when BufWinEnter is triggered. Use the variables when BufEnter is triggered.