7 ms·
Could someone sell me on why I should switch to this from regular Vim?
by luke2m 5y ago
Could someone sell me on why I should switch to this from regular Vim?
- cturtle 5y agoI've been using the nightly builds for a while now, and the language server support works very well, but for me the most exciting part of Neovim is Lua. Lua isn't the headlining feature of v0.5, but the API has still grown a lot since the last release. As an example of why I love Lua support, I wrote a small file finding plugin for myself because I wasn't satified with the many alternatives (not a huge fan of fuzzy-matching). It took only a couple days to have a working plugin, and it has been fun to extend it with new features over the last month. The Lua API is relatively straightforward, and it really lowers the bar for writing plugins and small helper functions to add to your config. Switching from Vim is not necessary, but Lua support alone was enough to convince me to give it a try, and is the main reason I have stayed with Neovim.
- ratorx 5y agoIntegrated LSP is quite nice (and the ecosystem around it is just getting started), but it’s not the thing I’m most excited about. My favourite new thing is actually tree-sitter. Currently it’s being hyped for better syntax highlighting (which is nice), but I’m most excited about defining text objects on language constructs. I really don’t like trying to shoehorn words, sentences and paragraphs to deal with parameters, scopes, functions etc. Having language-aware text objects for these is really neat. I don’t think it’s anything that would be impossible to get working in Vim, but being built-in is pretty nice.
- jay-aye-see-key 5y agoTree-sitter based text-objects are one of my favourite parts of neovim 0.5 too. Now I can have class, function, parameter, and comment text-objects that can be manipulated as easily as words or paragraphs. This plugin sets it all up and has some examples: https://github.com/nvim-treesitter/nvim-treesitter-textobjects https://github.com/nvim-treesitter/nvim-treesitter-textobjec...
- humility 5y agolots of stuff. but mainly: * ease of getting started. nvim is just vim, you can bring over your vim config and it'll just work. * integrated lsp. you could have vscode like auto completion natively * tree-sitter. google it to believe it and much, much more
- thiht 5y ago> tree-sitter. google it to believe it After Googling I have no idea what it is, it's a parser but for what? Syntax highlighting? That doesn't seem so impressive
- e12e 5y agohttps://tree-sitter.github.io/tree-sitter/ https://tree-sitter.github.io/tree-sitter/ Yes, but it enables many tools to cooperate on highlighting/"understanding" synntax.
- njharman 5y agoMy vim config includes bunch of customization for bunch of plugins written in vimscript. Will that just work?
- kellyjprice 5y agoProbably. I have not had any problems switching between the two. It's meant to be a drop in replacement, but I'm not sure how perfect that is.
- arp242 5y agoCompatibility was a goal at the start, but now it seems to be on a "best effort" basis at best. It's very much non-perfect because opening anything in neovim with my Vim config gives me a forest of errors and loads of things don't work, including some pretty basic stuff like expression mappings. See my other comment in this thread as well.
- arp242 5y ago
- jamal-kumar 5y agoThere's a few really cool things. The built in LSP is pretty clean compared to clunky nodejs or python plugins which I've found to clog down on huge codebases. The syntax engine has been improved by a tree-sitter algo, so it's way more robust with the syntax hilighting. And while I haven't messed with this yet you can do the whole config file in Lua now, which sounds pretty powerful. The improved tree-sitter code parsing also allows for stuff like this which you won't find fully implementable in mainline Vim yet: https://github.com/nvim-telescope/telescope.nvim https://github.com/nvim-telescope/telescope.nvim
- vlunkr 5y agoOriginally the big selling points (IMO) were that it supported async plugins and an embedded terminal. Vim added both of those in version 8. For whatever reason this issue bugs me enough to keep me from switching https://github.com/neovim/neovim/issues/1496 https://github.com/neovim/neovim/issues/1496. I tend to open things like :!tig and neovim can't do it.
- daliusd 5y agoOne friend tried to switch from neovim to vim and found that vim is slower even if everything works. Otherwise no reason to switch.
- gorjusborg 5y agoTo me, there are two big things: 1. Development model (vim=Bram, neovim=communitiy of people) 2. Movement to a more accessible language for writing plugins
- arp242 5y agoIt's true that "all patches go through Bram", but Vim has other maintainers as well and there's loads of people working on it. I had several patches merged with feedback from several non-Bram maintainers, with faster than average turnaround times I might add (i.e. several days or less before it ended up merged in Vim).
- pasabagi 5y agoWell, a lot of people have come up with good reasons, but for me, it really comes down to the old repairman's adage: there are two kinds of people, those that piss in lifts, and those that do not. Now, pretty much any programmer can read a lua program, and it takes about an hour to learn, whereas I think the most flattering honest word anybody has ever used to describe vimcsript as is 'pathological'. For the second kind of person, vimscript is like some combination between russian roulette and vogon poetry, bomb defusal and surreal nightmare. For the first kind of people - I don't know, there are probably some upsides, but honestly, who does that? Do you? That's what you have to ask yourself. And more, if you're not that kind of person today, do you want to become that person?
- gooseyard 5y agoI did it a while back to see if I would notice anything different. I moved to vim a few years ago on a whim after using emacs for decades, so I am far from a vim power user, but with the modest configuration I use, I couldn't tell any difference, so I figured I would keep using it until I ran into a situation where neovim failed in some way that vim didn't. So far (maybe 6 months?) I haven't run into any issues, and I don't think I've added any plugins to my setup that would only work with neovim. This is all to say, it's probably a fairly easy experiment to switch with a fairly low risk of issues if you switch back. I'm probably a bad neovim reviewer though since I'm not really keen to try the LSP stuff. I wind up working in a lot of different languages and inevitably I feel like getting accustomed to completion working well in language A only to have it fail with B is more annoying than having no completion at all. I'm curious whether I'll wind up using anything which is only possible in neovim.
- ufo 5y agoOne small thing I prefer about neovim is that the default settings are better. For example, syntax highlighting is enabled. https://neovim.io/doc/user/vim_diff.html#vim-differences https://neovim.io/doc/user/vim_diff.html#vim-differences
- akkartik 5y agoThat's actually a negative for an existing user like me. Every time I upgraded to Neovim I ran into breakage with my configuration. Eventually I burned out and returned to Vim. Neovim may well be taking the right approach. Capture by existing users has its own costs. But we should be clear-eyed about its intended audience.
- Snelius 5y agoNo, you should not. Original vim is unbeatable.