I’m having trouble saving a file in vim. After I save it, the window becomes empty, as if it lost the file. The title on the tab reads
_highlight.sass, in `box-shadow`
The file does save with the changes I’ve made. But it’s annoying having to reopen it every time. Saving other files does work fine. It’s only this one file, and I don’t know why.
Here are the file contents
https://gist.github.com/0f29da34719075bdc686
I found that opening two tabs of the file, saving one makes the tab not go empty when I save it. But it does lose syntax highlighting.
You are likely to have some weird autocommand (or, more likely, bug in plugin(s) which help you work with sass (if I understood correctly) file) on
BufWrite(Pre|Cmd|Post)?event. Try doingand do
s<CR>then<CR><CR><CR>until you see what causes the issue. After you got itverbose autocmd [group] [Event [pattern]]will help you determine where it was defined.If you are familiar with debugging, there is also
n<CR>which stands fornext(s<CR>isstep). May be useful to dos<CR>once (until you should see the first autocommand then), thenn<CR><CR><CR>… Plain<CR>repeats previous debug action if debugging command was what you ran previously.