I have a script which performs some action and then pipes the stdout
to Neovim so that I can look at it with syntax highlighting and do all the other nice things I can do with vim.
However, as this is a temporary file just used for inspecting the (possibly very long) output of the command, I almost never want to actually save the file. When I :q
to exit, I get E37: No write since last change (add ! to override)
as expected.
I've tried :set ro
but I still get E37
when exiting. I could of course train myself to just use :q!
for this particular scenario, but I'd rather come up with a better solution.
Is there some argument I can pass to nvim
in my script that will prevent E37
when I :q
?