From cc6ac3c064715233573fd45e6d5ba47d72d9fd83 Mon Sep 17 00:00:00 2001 From: Holger Rapp Date: Sat, 17 Oct 2015 14:49:57 +0200 Subject: [PATCH] Exit any snippets when entering a unite buffer. Fixes #578 --- pythonx/UltiSnips/snippet_manager.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pythonx/UltiSnips/snippet_manager.py b/pythonx/UltiSnips/snippet_manager.py index 3cb5e60..448daf8 100644 --- a/pythonx/UltiSnips/snippet_manager.py +++ b/pythonx/UltiSnips/snippet_manager.py @@ -374,6 +374,10 @@ class SnippetManager(object): 'autocmd CmdwinEnter * call UltiSnips#LeavingBuffer()') _vim.command( 'autocmd CmdwinLeave * call UltiSnips#LeavingBuffer()') + + # Also exit the snippet when we enter a unite complete buffer. + _vim.command('autocmd Filetype unite call UltiSnips#LeavingBuffer()') + _vim.command('augroup END') _vim.command('silent doautocmd User UltiSnipsEnterFirstSnippet')