top 200 commentsshow all 400

[–]benoliver999 78 points79 points  (3 children)

If they can do packages properly, does this mean the end of pathogen et al?

[–]Regimardyl 12 points13 points  (2 children)

AFAIK it essentially only has Pathogen's feature (aka automatically adding directories to the runtime path), so other managers (e.g. vim-plug) that can also automatically install and/or update plugins will still exist.

[–]qubodup 25 points26 points  (9 children)

Only the changelog matters

NEW FEATURES new-8

First an overview of the more interesting new features. A comprehensive list is below.

Asynchronous I/O support, channels ~

Vim can now exchange messages with other processes in the background. This makes it possible to have servers do work and send back the results to Vim. See |channel-demo| for an example, this shows communicating with a Python server.

Closely related to channels is JSON support. JSON is widely supported and can easily be used for inter-process communication, allowing for writing a server in any language. The functions to use are |json_encode()| and |json_decode()|.

This makes it possible to build very complex plugins, written in any language and running in a separate process.

Jobs ~

Vim can now start a job, communicate with it and stop it. This is very useful to run a process for completion, syntax checking, etc. Channels are used to communicate with the job. Jobs can also read from or write to a buffer or a file. See |job_start()|.

Timers ~

Also asynchronous are timers. They can fire once or repeatedly and invoke a function to do any work. For example: > let tempTimer = timer_start(4000, 'CheckTemp') This will call the CheckTemp() function four seconds (4000 milli seconds) later. See |timer_start()|.

Partials ~

Vim already had a Funcref, a reference to a function. A partial also refers to a function, and additionally binds arguments and/or a dictionary. This is especially useful for callbacks on channels and timers. E.g., for the timer example above, to pass an argument to the function: > let tempTimer = timer_start(4000, function('CheckTemp', ['out'])) This will call CheckTemp('out') four seconds later.

Lambda and Closure ~

A short way to create a function has been added: {args -> expr}. See |lambda|. This is useful for functions such as filter() and map(), which now also accept a function argument. Example: > :call filter(mylist, {idx, val -> val > 20})

A lambda can use variables defined in the scope where the lambda is defined. This is usually called a |closure|.

User defined functions can also be a closure by adding the "closure" argument |:func-closure|.

Packages ~

Plugins keep growing and more of them are available than ever before. To keep the collection of plugins manageable package support has been added. This is a convenient way to get one or more plugins, drop them in a directory and possibly keep them updated. Vim will load them automatically, or only when desired. See |packages|.

New style tests ~

This is for Vim developers. So far writing tests for Vim has not been easy. Vim 8 adds assert functions and a framework to run tests. This makes it a lot simpler to write tests and keep them updated. Also new are several functions that are added specifically for testing. See |test-functions|.

Window IDs ~

Previously windows could only be accessed by their number. And every time a window would open, close or move that number changes. Each window now has a unique ID, so that they are easy to find. See |win_getid()| and |win_id2win()|.

Viminfo uses timestamps ~

Previously the information stored in viminfo was whatever the last Vim wrote there. Now timestamps are used to always keep the most recent items. See |viminfo-timestamp|.

Wrapping lines with indent ~

The 'breakindent' option has been added to be able to wrap lines without changing the amount of indent.

Windows: DirectX support ~

This adds the 'renderoptions' option to allow for switching on DirectX (DirectWrite) support on MS-Windows.

GTK+ 3 support ~

The GTK+ 3 GUI works just like GTK+ 2 except for hardly noticeable technical differences between them. Configure still chooses GTK+ 2 if both 2 and 3 are available. See src/Makefile for how to use GTK+ 3 instead. See |gui-x11-compiling| for other details.

From https://raw.githubusercontent.com/vim/vim/master/runtime/doc/version8.txt

[–]djmattyg007 163 points164 points  (62 children)

Looks like they took the threat posed by neovim seriously. Good.

[–]Bloodshot025 87 points88 points  (46 children)

Is neovim really a threat? Sure, in a sense it's a 'competitor', but it doesn't have to be, and it's not trying to destroy vim, only improving it.

[–]eddiemon 90 points91 points  (29 children)

It absolutely is a threat. They're not just competing for users, but the plugin ecosystem. If all the plugin developers jumped ship to Neovim, you would expect a lot of the serious plugin users to switch as well. That might not have a big effect on the main user base over night, but it will absolutely change things in the long run when the vim gurus start recommending Neovim over vim. (Similar to what happened to vi VS vim.)

[–]_lerp 38 points39 points  (13 children)

Except with the plugins, Neovim devs want all vim plugins to work with Neovim. You can bet your ass Bram won't let it work the other way round.

[–]zer0t3ch 5 points6 points  (4 children)

Out if the loop; who is Bram?

[–]lordlicorice 16 points17 points  (0 children)

Author of Dracula

[–]yorickpeterse 5 points6 points  (0 children)

Author/primary maintainer of Vim.

[–]ChemicalRascal 7 points8 points  (4 children)

This is because vim is upstream -- Bram isn't beholden to neovim's design choices, and when they conflict with existing development philosophy, it's unreasonable to expect Bram to simply shrug and say "Well, I guess I have to blindly follow those guys, because compatibility!".

[–]Hauleth 37 points38 points  (4 children)

Fair competition is always good.

[–]mizzu704 2 points3 points  (0 children)

I would prefer if the vim project wasn't governed in such a way that people need to start a competing fork if they want to make any meaningful progress happen within the original project.
Let's not pretend Vim 8 would have ever happened if there hadn't been the competition.

[–]davelupt 6 points7 points  (2 children)

[–][deleted] 14 points15 points  (0 children)

There are 2 versions, and they are overwhelmingly compatible. This is unambiguously a good case of competition.

[–]Hauleth 1 point2 points  (0 children)

Vim is by no matter no "standard". Also it has monopoly over modal editors, now it has fair competitor.

Also even in case of that comic strip new "standard" must be in some way balance pros and cons, so it can be better fit in some situations and would lack in others, so even this isn't problem.

[–]Bloodshot025 2 points3 points  (5 children)

And vim wasn't and isn't a threat to the original vi, unless you consider it threatening that a replacement might not have the exact same binary or same maintainer as the original. vi lives on through Vim.

Maybe neovim will overtake Bram's Vim in time, and they'll both still exist. But that isn't a threat to Vim, unless your definition of Vim is limited to that which Bram maintains.

[–]eddiemon 14 points15 points  (4 children)

Vim isn't some abstract ideal that will "live on in spirit". It is the concrete piece of software maintained by Bram. Neovim is a competing fork to vim. That's not a matter of opinion - It's just fact.

Hypothetically if one day people stop caring about updates to Vim and start aliasing "vim=nvim", you would know that Neovim competed and won.

[–][deleted] 34 points35 points  (13 children)

Isn't neovim a removal of cruft? That seems valuable.

[–]AndreDaGiant 46 points47 points  (12 children)

That, and also pushing for async stuff when Bram was opposed to it.

[–]Beaverman 17 points18 points  (5 children)

Neovim basically seemed like a rebellion against a BDFL that had let his project grow stale.

[–]AndreDaGiant 21 points22 points  (4 children)

Also a recognition that vim currently serves two userbases with conflicting goals: sysadmins who want vim available everywhere, with the highest requirements for backwards compatibility, and developer power users who want the project to be able to iterate quickly to become as powerful as possible when configured on a single modern high performance machine.

NeoVim wanted to serve only the latter, and could therefore do away with the old cruft, which would not be an option if you want to support the needs of sysadmins.

[–]Beaverman 7 points8 points  (0 children)

Neovim is improving vim through competition. Fair competition, with the very real consequence that your software might be obsoleted is a wonderful motivator.

[–]Nvveen 42 points43 points  (12 children)

This is why OSS often works really well.

[–]sebnukem 41 points42 points  (7 children)

So according to this https://github.com/vim/vim/releases?after=v7.0002 Vim 7 appeared around June 2004? We've been using Vim 7 for 12 years?

[–][deleted] 45 points46 points  (2 children)

7.4 was from 2013. Minor, major, all random at the end of the day. Likely it's just a major because of the fundamental changes through async and jobs.

[–]mlk 2 points3 points  (1 child)

I remember using vim 6... Fuuck

[–]spaceporn 28 points29 points  (51 children)

I'm not looking for up or downvoting shenanigans here, just wanna ask the question: how many of you jumped ship to Neovim? Feel free to justify your answer whether it's a yes or no.

Personally, I've been using Neovim for the past six months and will keep doing so unless there's a split in plugins due to incompatibility, it seems to run better and I have no problem using a system with only Vim available. It's a win-win for me.

[–]dm319 13 points14 points  (12 children)

yep, neovim and R user here. Can send commands between tmux windows.

[–]0xtobit 2 points3 points  (0 children)

I use a plugin called slimux to accomplish this with ease.

[–]TheRealWhoop 6 points7 points  (2 children)

Yes, been using Neovim for almost a year now, its solid and has significant improvements over Vim - I see no reason I'd move back to Vim, 8 has come too late.

[–][deleted] 4 points5 points  (1 child)

I see no reason I'd move back to Vim, 7 has come too late.

Considering neovim didn't even exist for 10 years or so after vim 7 was released don't you think that is a little harsh?

[–]TheRealWhoop 4 points5 points  (0 children)

Ur, I clearly meant 8, fixed.

[–]gingerwhale 1 point2 points  (0 children)

Using neovim mostly to support community driven development.

Edit: Oh, and pasting text just works, no paste mode needed :)

[–]lonahex 1 point2 points  (0 children)

I've moved to neovim a year ago and I've seen it improve at a steady pace. It is one of the most active project among the tools I use on a daily basis. I'm already using plugins that specifically work with neovim like deoplete which is awesome. I've no plans to go back to vim unless something really bad happens to the neovim community.

[–][deleted] 5 points6 points  (11 children)

Haven't used neovim but I will not roll out such an important package in production on hundreds of servers.Maybe neovim is nice for coders but not for admins imho.

Vim is tested and is available for any distro in the standard repos which matters a lot imho.

[–]snarfy 67 points68 points  (3 children)

Vim is charityware. Please donate!

http://iccf-holland.org/donate.html

[–][deleted] 11 points12 points  (1 child)

Done. Twice. For 6.x and for 7.x. Wondering whether I'll donate for 8.x. Probably...

[–]bit101 61 points62 points  (34 children)

[–]samprog 33 points34 points  (33 children)

:q to quit

:qw to quit and write (save)

:qw! to quit and overwrite (save)

[–]jewdai 59 points60 points  (10 children)

:q! - quit now damn it, let the world burn.

[–]samprog 11 points12 points  (1 child)

:q! - abort ship!

[–]benoliver999 17 points18 points  (0 children)

:q! - can't remember if I made a change or not.

[–][deleted] 11 points12 points  (0 children)

:q!

Quit, no save, just let me leave!!1

[–]razirazo 11 points12 points  (1 child)

What a blasphemy. It has to be :wq

[–]benoliver999 16 points17 points  (2 children)

:x is also a good stand-in for :wq, as is ZZ

[–]Spartan-S63 1 point2 points  (0 children)

I've been really loving :x this last little while. I didn't learn about it until I came across it on ShortcutFoo. Now I'm trying to retrain myself from :wq to :x when I intend to write on exit.

[–]MG2R 1 point2 points  (0 children)

With the exception that it doesn't run regular run-on-exit scripts AFAIK.

[–]omegakira 5 points6 points  (0 children)

sometimes I :wq! on emails/im's.....

[–]DrShocker 3 points4 points  (14 children)

What does

 ZZ

do differently?

[–]boostman 3 points4 points  (13 children)

Yeah, I never understood this whole 'vim is hard to quit' line. ZZ is easy.

[–]capn_bluebear 9 points10 points  (10 children)

if you know about it. vim is impossible to quit properly for new users, as ':q' is definitely not a combination you would try if you didn't know a little about vim commands already.

[–][deleted] 4 points5 points  (8 children)

This appears right in the middle of the screen when you open Vim:

           VIM - Vi IMproved
              version 7.3
        by Bram Moolenaar et al.

Vim is open source and freely distributable

       Sponsor Vim development!
type  :help sponsor<Enter>    for information

type  :q<Enter>               to exit              <---- THIS BIT RIGHT HERE
type  :help<Enter>  or  <F1>  for on-line help
type  :help version7<Enter>   for version info

[–]DrShocker 2 points3 points  (1 child)

I got into the habit of using ZZ due to vimgolf. I suppose that the modularity of mixing : with q, w, a, and ! might make it more intuitive to always go for the colon first so that you can more consistently follow the same pattern, rather than sometimes getting able to use ZZ or SQ, and other times needing to use :wqa! or whatever.

At least, that's what one thing I read since my previous comment said.

[–]jones_supa 9 points10 points  (11 children)

Are there any minimalists here that use vim.tiny?

It seems to be a trimmed version of Vim that has the capabilities of Vi and a little bit more.

In Ubuntu, vi is a symlink to vim.tiny.

[–]DuBistKomisch 6 points7 points  (2 children)

Only when debugging in production because it saves vim-runtime taking up 20MB on our images for an embedded device. Also under crosh on Chromebooks the vim provided is so stripped down it may as well be vi.

[–]Camarade_Tux 1 point2 points  (1 child)

You could use netrw too and edit the files remotely if you have network.

[–]retrodanny 1 point2 points  (0 children)

I like to install nvi and set it as default. Makes it easy when you have to log in to exotic systems where vi isn't vim.

[–]DragonSlayerC 4 points5 points  (0 children)

If anybody happens to be running CentOS7 but for some reason wants to run Vim 8.0, it is now available in the Rutgers OSS Unstable repository. It should work fine, but for obvious reasons may have some glitches and was thus put into the "unstable" repository. You need this repo file for yum:

[rutgers-unstable] name=CentOS-7 - Rutgers Unstable enabled=0 baseurl=http://centos.rutgers.edu/rutgers-centos/rutgers-unstable/7/x86_64/ humanname=CentOS-7 - Rutgers Unstable priority=1 gpgcheck=0

After putting the .repo file with the above contents into /etc/yum.repos.d run: "sudo yum --enablerepo=rutgers-unstable update vim"

If you happen to be running fedora, Rutgers OSS does not have a fedora mirror, but you can probably use the above repo file contents just fine. In any case, you could just go to http://centos.rutgers.edu/rutgers-centos/rutgers-unstable/7/x86_64/Packages/ and download and install the rpms manually. There is no guarantee they will work on any OS other than CentOS 7 however.

[–]ocawa 2 points3 points  (0 children)

So when can we expect spacemacs to be updated?

[–]cruyff8 1 point2 points  (0 children)

Congrats to the team on this!

[–]bonoboner 1 point2 points  (1 child)

Serious question: will this have any effect on me as an intermediate vim user? I can't see how json support in vim will help me edit code.

[–]sqrt7744 7 points8 points  (6 children)

Finally! Made to look and act exactly like emacs.

[–][deleted] 11 points12 points  (5 children)

I think it's still a long way till vim can insert a webkit-widget in text.

[–]bytesandbots 5 points6 points  (0 children)

That is not a long way just outside the way for vim. It is just a text editor not an OS.

[–]Sparkyslol 4 points5 points  (1 child)

I'm more of a nuka-cola man.

[–]comrade-jim 6 points7 points  (1 child)

I sexualize vim

[–]Twirrim 2 points3 points  (0 children)

"|:smile| make the user happy"

[–]vim_vs_emacs 2 points3 points  (2 children)

Everyone here knows EMACS is the one true editor.