jdonaldson/vaxe

:make Opens a new buffer of Assets.hx and loses current buffer

Closed this issue · 8 comments

Just as the title suggests, the :make command returns from the game with a new buffer of Assets.hx open over whatever file I used to have.

Sorry for the delay, what platform are you on?

Try this in your config, just a guess:

:set switchbuf=useopen,usetab

You can also use :make! to prevent jumping to errors.

Finally, you might want to try what I use, which is vim-dispatch:
https://github.com/tpope/vim-dispatch

It has a :Make command that executes asynchronously, letting you keep control of the editor. I recommend using it with tmux.

Since the OP didn't come back, I'll share some more info on the issue. This is my current setup:

OSX Mountain Lion
MacVim 7.4 (73)
spf13 <- my number one suspect...

The only change to spf13 defaults is the addition of vaxe itself. Using ":set switchbuf=useopen,usetab" doesn't seem to fix the problem. Using "make!", however does solve the problem.
Unfortunately, my VIM-fu is nil, so I'm not really sure why "not jumping to errors" solves an issue with a project that doesn't throw errors (just a trace() statement) :/

Edit: Using MacVim's CMD-B "Build" command also works.
Edit 2: Ok, the problem seems to be using trace() statements.

What's in the quickfix window? Does the trace register as an error or as info? (it should register as info).

screen shot 2014-08-21 at 7 48 57 pm

Actual errors seem to work just fine. If I run a program that doesn't throw any errors but issues a trace() statement and then I quit it with CMD-Q this is what happens:

screen shot 2014-08-22 at 4 05 44 pm

As soon as I press enter, a new empty buffer is created with the same name as the one I was editing.

Now I can't replicate the bug on a seemingly similar installation in other machine. There must be some sort of issue when using certain plugins but, at least in my case, it's hard to track down using a huge distro like I'm doing right now.

Sure sounds like it. I'm sorry I can't give much more advice on this... are both vim versions the same? There may be a bug in vim. I would also try disabling/enabling plugins one at a time until things break.

Otherwise, there's not much I can do from the plugin here, at least not "gracefully". I don't have many options when populating the quickfix list. Vim manages whether or not to open a file with the error.

I strongly suggest moving to an asynchronous "make" system for vim... vim-dispatch, etc. It'll give you more control over the editor focus, and stop the build operation from blocking the ui. It should've been part of vim all along.

Indeed. For what it's worth, the vim distro is exactly the same, the only difference being the underlying OSX version (Mavericks versus Yosemite preview) but I really don't believe that's the issue. In fact, I'm not finding vim distros to be very good. In any case, thanks for this great plugin! :)