Friday, September 4, 2015

Re: Random file opening for what reason?

On Friday, September 4, 2015 at 9:05:28 AM UTC-5, Daryl Lee wrote:
> I've been using Vim since the 1990s, and I have just encountered a problem I never saw before. A friend asked me to have a look at some code he has inherited and can't quite figure out. So I did what I always do: created a simple Makefile so I could do
>
> :make test
>
> and work on the code without ever having to really exit Vim. When the program runs to completion and I hit "Enter" to get back into the source file, I get a new buffer named "05" for no obvious reason (see attached screenshot). However, when I run the equivalent command directly with the ! Vim colon command, I do not get this behavior. Also, when I run "make test" from the Unix command line, the program APPEARS to run correctly, but I'm acutely aware that the OS cleans up after the program and recovers resources that the program should have cleaned up itself. I checked, and the program returns 0, rather than some unexpected error code.
>
> I'm almost certain that the root cause is something in the program that runs amok and messes up something within Vim.
>
> The reason I'm posting here is to find out if anyone has any idea what might cause Vim to do the equivalent of ":e 05", when returning from the colon 'make' command.

This sounds like something in the output of the make command has an "05" in it which is in a place that Vim expects a file name.

Search for "05" in your make output, and compare it to Vim's 'errorformat' setting.

If you don't care that much about fixing the issue and just need a workaround, use ":make! test" instead of ":make test" to avoid jumping to the first error recognized by Vim and use ":copen" to view the full list for navigating the errors.

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments: