Skip to content

Instantly share code, notes, and snippets.

@ds26gte
ds26gte / protectterm.vim
Last active April 29, 2024 10:09
Don't kill terminal buffers inadvertently when exiting Neovim
" Last modified 2017-11-30
" Dorai Sitaram
" By default, Neovim warns you only of unsaved file buffers
" before you exit, not of unclosed terminal buffers, which will
" be summarily killed. Unintentionally killing a terminal buffer
" can be frustrating, not only because of killed processes (which
" could be restarted) but also for the lost scroll history. This
" plugin prevents that loss.