> WTF are you talking about? Vim have may have many demerits but segfaults is not on that list. If segfaults are that frequent you described then people would have jumped ship already.
Vim is all segfaults once you introduce async, and it's highly unstable during any dev work. On any given day visit the Vim dev mailing list and scroll down. Today I see:
Scrolling in a c file segfaults: https://groups.google.com/forum/#!topic/vim_dev/teRV3RyDtzc
Referencing an old buffer seg faults: https://groups.google.com/forum/#!topic/vim_dev/Mssm8pKtnGM
Segfault opening a readme: https://groups.google.com/forum/#!topic/vim_dev/SE31YUccJN4
Segfault selecting a lot of text: https://groups.google.com/forum/#!topic/vim_dev/yzVqZ3qogho
Segfault on autocompletion: https://groups.google.com/forum/#!topic/vim_dev/lqcn57eRGGs
Segfault on tab switching: https://groups.google.com/forum/#!topic/vim_dev/Vc9Z8rfe22w
Just keep scrolling, the segfaults never stop.
> Though async future is not built-in there are several plugins for doing async operation, for example...
For your other point, some plugins fake async using a cursorhold hack that break vim for users who use leader keys. That is they insert fake key strokes. Vimproc actually quits on cursorhold:
https://github.com/Shougo/vimproc.vim/blob/master/autoload/v...
That's right thess plugins inserts keys to trigger autocommand. I would like you to go ahead and type a long vim command using leader keys and see if that works for you. When a plugin inserts keys while you are inserting keys everything stops and you have to start over.
Go ahead, go implement a clock with a plugin that updates every second. I bet that plugin fakes user interaction. It doesn't work.
Edit: Also nice on the downvotes, perhaps explain how my post is wrong in addition to downvoting. Everything I have said are matters of fact. Are my facts wrong?
I've been using vim pretty much daily, across many versions, over roughly two decades, and I literally do not recall encountering a segfault. I would be hugely surprised if "segfaults all the time" is a more typical experience for an individual user.
One neat thing I use it for is TTY capture from a target system (usually games console or embedded device) over a serial or network cable. Run your terminal program in emacs at the start of the day, and emacs will dutifully capture all the terminal output as you work. Search, save and manipulate TTY output using all the commands you know and love.
Well - except for `.'. Or `*'. emacs doesn't do those two...
Also you have zero knowledge of how Vimproc works. It spawns process or create socket connection in background and clients have access to it as a resource object from which client can read data during CursorMoved and CursorMovedI autocmd events. It is actually psudo-async but it works very well. I am using the plugins that have used Vimproc, even I used it in my PHP autocomplete plugin https://github.com/m2mdas/phpcomplete-extended (shameless plug) and it did not failed me yet. Also if you looked at the s:garbage_collect() method https://github.com/Shougo/vimproc.vim/blob/master/autoload/v... it is trying to release resource handles of the processes exited.
Also why should I need a clock inside vim? There is tmux/Screen status line for that. Please provide another valid use case.
BTW there is a plugin called CoVim https://github.com/FredKSchott/CoVim that implements pair-programming feature using default built-in Python binding.
>Referencing an old buffer seg faults: https://groups.google.com/forum/#!topic/vim_dev/Mssm8pKtnGM Fixed with 7.4.59. It is pretty clear, this is a problem, but I wonder how to reproduce it, because I have never seen it crash there when closing buffers. So there must be some additional step to trigger it, otherwise we would have seen a lot more segfaults.
> Segfault opening a readme: https://groups.google.com/forum/#!topic/vim_dev/SE31YUccJN4
probably caused by the new regexp-engine, that was introduced with 7.4 I am not entirely happy about including it and there seem to be still several bugs in it, but it is not even clear, if that crash has not already been fixed.
> Segfault selecting a lot of text: https://groups.google.com/forum/#!topic/vim_dev/yzVqZ3qogho A recurring issue, that seems to happen to me too once in a while. Nobody knows what the cause is so, it can't be fixed currently. Seem to be not a problem of Vim, but of some of the X libraries.
> Segfault on autocompletion: https://groups.google.com/forum/#!topic/vim_dev/lqcn57eRGGs might have already been fixed. The reporter does not mentioned, how to reproduce it or even what version he uses.
> Segfault on tab switching: https://groups.google.com/forum/#!topic/vim_dev/Vc9Z8rfe22w Not exactly sure, what causes this.
> Just keep scrolling, the segfaults never stop. It's not as bad as you make it sound. Usually segfaults are taken seriously by Bram and will be fixed soon, if the problem is clear. Second, even in your list, you needed to scroll back a couple of months. I wouldn't call that exactly an evidence, that Vim is full of segfaults.
Even though the code is a mess, full of nested ifdefs and uses a lot of global state variables, I have not often seen segfaults and I have been providing many patches in the last years and there are still many patches of mine in the todo list. Overall I am quite happy, with a Vi clone that is actively maintained and even further developed, although sometimes I wish for some more activities in fixing bugs and adding features. But Bram seems to be too busy to take a more active role.
Given the Macbook-heavy nature of HN, that's probably what leokun is talking about.
On the other hand I don't use very many plugins, esp. not plugins that have native extensions.
I can't comment on the code structure of Vim but it does not matter to me because end product is working fine for me for 5+ years. Also bad code structure did not stop continuous development of Vim. Just for example there were 1000 patches added to the core before Vim version was changed from 7.3 to 7.4 within 2 years. Important features like more python binding, lua bindings were added during this time. Even if you see the current patch log of 7.4 ftp://ftp.vim.org/pub/vim/patches/7.4/README 68 patches were added since 7.4 release.
Though async future is not built-in there are several plugins for doing async operation, for example vim-dispatch[1] and vimproc. Vimproc is more widely used. See Unite.vim[3] , neocomplete[4], VimShell[5] for demonstration. I would specially point to VimShell because with the help of it you can run REPL inside Vim and pass buffer content to it. Also there is YouCompleteMe[6] which provides FAST autocomplete.
[1](https://github.com/tpope/vim-dispatch/)
[2](https://github.com/Shougo/vimproc.vim/)
[3](https://github.com/Shougo/unite.vim)
[4](https://github.com/Shougo/neocomplete.vim)
[5](https://github.com/Shougo/vimshell.vim)
[6](https://github.com/Valloric/YouCompleteMe/)