mtth / scratch.vim

Unobtrusive scratch window
MIT License
395 stars 32 forks source link

Don't close scratch buffer while in the buffer #9

Closed mattn closed 9 years ago

mtth commented 9 years ago

This is a major part of the :ScratchInsert command though (otherwise it becomes equivalent to :Scratch<CR>i). Rather than disable it entirely, could you protect this with an option (e.g. named g:scratch_insert_autohide)?

mattn commented 9 years ago

Which is default value? 0 or 1 ?

mtth commented 9 years ago

1 (keeping the current default behavior).

mattn commented 9 years ago

done

mtth commented 9 years ago

Looks good, thanks. One last thing before I merge this, could you add a corresponding section in the documentation (there should be a small change inside the :ScratchInsert section too)?

mattn commented 9 years ago

Sorry, I couldn't make it small.

mattn commented 9 years ago

Please wait merging. Found problem.

mattn commented 9 years ago

Fixed the problem. autocmd! InsertLeave <buffer> reset all-InsertLeave events which is registered in another plugins.

mtth commented 9 years ago

Indeed - great catch. Thanks for the PR!