Before: set buftype= silent w! After: set buftype=nofile silent call delete('[Vader-workbench]') Given tex (Environments: foo and bar): \begin{foo} Foo \end{foo} \begin{bar} Bar \end{bar} Do (Change env: foo -> baz): csebaz\ Expect tex (Verify): \begin{baz} Foo \end{baz} \begin{bar} Bar \end{bar} Do (Change env: foo -> bar (with completion)): cse\\\\ Expect tex (Verify): \begin{bar} Foo \end{bar} \begin{bar} Bar \end{bar} Before: After: