You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Cursor is left in the command line while compiling #38
...and because compiling takes a while, it prevents me from navigating around in my source file for a fraction of a second after I save, and leaves unsightly escape codes sitting there.
This was traditionally a shortcoming of just how vim plugins work. There was no facility for running tasks in the background, so everything was synchronous.
That's all changed in the last year or so, but to my shame I haven't taken the time to make any contributions to this plugin to bring it up to the state of the art.
I use a plugin called neomake to run background jobs like this, although I believe there are other options out there.
I have some configuration in my dotfiles (which I'll provide the relevant snippet from shortly) that uses the guts of this script via neomake to achieve what I think you're after: compilation in the background, and population of the loc-list with any warnings/errors.
There are a few ways to set this up but the bottom line is you need the erlang_check.erl script somewhere accessible on disk, have this plugin disabled, and to have the neomake plugin installed.
Then you'll want to have something like the following in your .vimrc/init.vim:
With this all in place, you should be able to run :Neomake flycheck in an erlang file and it should compile it in the background and put warnings/errors in the location-list sensibly.
LMK how it works out, and I'll help where I can. I'm normally in #vim-erlang on freenode so if IRC is your thing feel free to ask in there and I will answer when I can. Otherwise, feel free to reply here and we'll get you up and running.
Thanks. If I've gotta do that, I might just go back to my syntastic + syntaxerl setup that I had until recently. Though using erlang_check might be better than syntaxerl. I'll have a play with it.
Activity
sanmiguel commentedon Dec 14, 2017
This was traditionally a shortcoming of just how vim plugins work. There was no facility for running tasks in the background, so everything was synchronous.
That's all changed in the last year or so, but to my shame I haven't taken the time to make any contributions to this plugin to bring it up to the state of the art.
I use a plugin called
neomaketo run background jobs like this, although I believe there are other options out there.I have some configuration in my dotfiles (which I'll provide the relevant snippet from shortly) that uses the guts of this script via neomake to achieve what I think you're after: compilation in the background, and population of the loc-list with any warnings/errors.
sanmiguel commentedon Dec 14, 2017
There are a few ways to set this up but the bottom line is you need the
erlang_check.erlscript somewhere accessible on disk, have this plugin disabled, and to have theneomakeplugin installed.Then you'll want to have something like the following in your
.vimrc/init.vim:With this all in place, you should be able to run
:Neomake flycheckin an erlang file and it should compile it in the background and put warnings/errors in the location-list sensibly.LMK how it works out, and I'll help where I can. I'm normally in #vim-erlang on freenode so if IRC is your thing feel free to ask in there and I will answer when I can. Otherwise, feel free to reply here and we'll get you up and running.
Cheers!
Michael
rlipscombe commentedon Dec 14, 2017
Thanks. If I've gotta do that, I might just go back to my syntastic + syntaxerl setup that I had until recently. Though using erlang_check might be better than syntaxerl. I'll have a play with it.