tpope / vim-sleuth

sleuth.vim: Heuristically set buffer options
https://www.vim.org/scripts/script.php?script_id=4375
1.92k stars 86 forks source link

Do not run sleuth if buftype == terminal / prompt / popup #78

Closed fedorenchik closed 2 years ago

fedorenchik commented 2 years ago

If buftype == terminal / prompt / popup there's no need to run sleuth on them. Maybe can add check in autocmd for buftype?

Background: I often use terminals in vim, and sometimes, if terminal buffer name contains special characters (such as '[', ']', '=') I get error message:

Error detected while processing function BufFilePost Autocommands for "*"..function <SNR>60_Init[7]..<SNR>60_Detect:
E944: Reverse range in character class

vim-sleuth version: commit b14a41a07 Vim version: 8.2.3517 GTK3 GUI OS: Manjaro Gnome

tpope commented 2 years ago

Please provide the full error message, including the part that looks like line 123.