Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Every time you launch a process from inside vim (like grepping multiple files, generating tags for a large project, etc) it totally freezes the user interface. You can not execute any long task in the background, which is really annoying. So having a multi threaded Vim is very much overdue.

There is an ongoing discussion on the vim-dev mailing list regarding a proposed patch by Thiago Arruda [1]. I have no opinion on the technical merit of the patch, but as a user, I would warmly welcome a move in that direction.

[1] https://groups.google.com/forum/#!topic/vim_dev/65jjGqS1_VQ



GUI apps should be multi-threaded. But, process handling is OS task. Unix already provides facility for backgrounding of processes.

:!long-process&


I agree, but how do you get notified that 'long-process' finished running?

Even if you poll using CursorHold-like hacks the user still needs to type something.


:!{ long-process ; notify-send "done" ; } &


All that does is display a popup on the desktop, it does nothing to notify/callback to the vimscript code that started the process


Yes. For many things that's what you want. I wasn't trying to say "this will meet all needs and make this entire discussion irrelevant"; I was posting lest anyone find it interesting/useful.


I think there are some use cases, like getting the syntax highlighting being processed by vim in another thread, that would help the responsiveness (or feeling of) if this was supported natively.


Wouldn't a simple fix be writing a little stub that acts like the Tee command line utility? It would immediately hand back to Vim and pipe onwards the command you sent it.

Could be a temporary kludge at least until OP gets going.


I am actually using vim-dispatch[1] that works fairly well.

[1] https://github.com/tpope/vim-dispatch




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: