News for hackers. Stuff that matters.
Re:Vim 8.0 released by vegabook on Monday September 12, 2016 @09:21AM (#12479406)
this async thing was Neovim's main selling point, right? I mean cruft-removal is all well and good but vim works fast and fine for me so not important. What does Neovim now offer that this doesn't?
Re:Vim 8.0 released by tux1968 on Monday September 12, 2016 @09:32AM (#12479481)
Vim was in a virtual lock down of maintenance mode before Neovim came along and offered some competition. I'm happy to see Vim woken up out of its slumber, but let us not dismiss what Neovim offers or has already accomplished.
Re:Vim 8.0 released by flukus on Monday September 12, 2016 @07:51PM (#12484674)
The release history: https://en.wikipedia.org/wiki/Vim_(text_editor) doesn't looks pretty active to me.
Re:Vim 8.0 released by flukus on Monday September 12, 2016 @11:41PM (#12485488)
Edit - I mean does look pretty active.
Re:Vim 8.0 released by jpambrun on Monday September 12, 2016 @09:27AM (#12479455)
I think neovim just offered us VIM 8.0.
Re:Vim 8.0 released by baldfat on Monday September 12, 2016 @11:46AM (#12480687)
To be fair VIM developers have said they were all in the mix and coming. We even had Vim plug ins that pulled this off. So I really am not surprised.
Re:Vim 8.0 released by dominotw on Monday September 12, 2016 @09:27AM (#12479456)
'transform Vim into an embeddable text editor engine'

I think that was the main objective of the project. Would be nice to real vim in IntelliJ idea.

Re:Vim 8.0 released by stephenboyd on Monday September 12, 2016 @01:07PM (#12481492)
As a naive IntelliJ user, I found myself editing files with Vim in IntelliJ's terminal console.
Re:Vim 8.0 released by weitzj on Tuesday September 13, 2016 @03:03AM (#12486124)
I was amazed when I discovered the console and everything works. I can launch vim, neovim and tig(nurses git front-end) from within IntelliJ and all shortcuts just work. Even fish shell in vi mode or tmux. So yeah, I have the shell running in IntelliJ with tmux enabled and launch tig inside of it.
Re:Vim 8.0 released by dominotw on Tuesday September 13, 2016 @06:09PM (#12492680)
whoa! had no idea this was thing .
Re:Vim 8.0 released by micku on Monday September 12, 2016 @09:33AM (#12479501)
This. And the scripting language I suppose?
Re:Vim 8.0 released by thomasahle on Monday September 12, 2016 @09:41AM (#12479577)
Neovim is still a lot faster for me. A simple example is always commenting out a block <C-v>10jI#, which takes 5 seconds or so in vim (including 8.0), but is instant in neovim.
Re:Vim 8.0 released by 6502nerdface on Monday September 12, 2016 @10:02AM (#12479712)
The input sequence would be <C-v>10jI#<ESC> (I've just added escape at the end).

I'm guessing the delay you are referring to is the delay imposed by your terminal emulator (not vim) to detect the Escape key at the end that terminates visual block mode. If I'm right, you can quickly press "j" just after you press ESC, which should cancel the ESC-detection delay and cause your comment characters to appear instantly.

Edit: there's actually a few things that could be at play, including your terminal emulator, your screen/tmux (which is like another terminal editor, really), and vim's timeoutlen and ttimeoutlen settings.

Re:Vim 8.0 released by randlet on Monday September 12, 2016 @12:26PM (#12481064)
This is interesting! For me using <ESC> does indeed take a few seconds to complete commenting out the block. However, I have jk mapped to <ESC> and the commenting happens instantly using jk which makes sense in the context of your explanation.
Re:Vim 8.0 released by hsitz on Monday September 12, 2016 @01:06PM (#12481488)
It is interesting, I just tried pressing 'j' immediately after <esc> and the block prefixing does happen right when I press 'j'. The usual lag is just a second or two for me, though, using Gnome Terminal on Ubuntu. Also, there is no lag at all for me in gvim, even without pressing <esc>j.
Re:Vim 8.0 released by philh on Monday September 12, 2016 @11:26AM (#12480501)
I wouldn't expect the terminal emulator or screen/tmux to cause a 5s delay in this situation; and if they did, I'd expect them to cause it in neovim as well as in vim.
Re:Vim 8.0 released by cyphar on Monday September 12, 2016 @06:41PM (#12484269)
This does happen with neovim too. In fact, I had this issue in neovim even though I hadn't had it in vim. It was a one-line config change in my tmux.conf to fix it though, so no skin off my nose.
Re:Vim 8.0 released by ramblenode on Monday September 12, 2016 @04:45PM (#12483486)
You can also add this to your .vimrc:

  set noesckeys
Re:Vim 8.0 released by thomasahle on Monday September 12, 2016 @06:45PM (#12484292)
This worked! Sweet! Maybe neovim just has this as default..
Re:Vim 8.0 released by rakhimov on Monday September 12, 2016 @11:06AM (#12480302)
I'd recommend https://github.com/tpope/vim-commentary for commenting out code. Anyway, it's not a good practice.
Re:Vim 8.0 released by hackmiester on Monday September 12, 2016 @11:30AM (#12480553)
What would you recommend for turning off a section of code temporarily?
Re:Vim 8.0 released by OMGWTF on Monday September 12, 2016 @11:46AM (#12480685)
For C:

    #if 0
    ...code...
    #endif
Re:Vim 8.0 released by jaymon on Tuesday September 13, 2016 @04:41PM (#12492032)
You could try a plugin I wrote to quickly comment/uncomment blocks of code:

https://github.com/Jaymon/vim-commentify

It's a no frills plugin that only does one thing, but it does it pretty well.

Re:Vim 8.0 released by RBerenguel on Monday September 12, 2016 @11:37AM (#12480610)
Kill region, save, run/compile/read, undo if needed. With undo tree (or if you add commit to the process above) there is no need to comment just one region to turn off something.

Optionally, convert the region into a separate function/method and just don't call it while checking.

Re:Vim 8.0 released by pablasso on Monday September 12, 2016 @01:41PM (#12481835)
You still didn't explained why it wasn't a good practice. This just sounds impractical.
Re:Vim 8.0 released by RBerenguel on Monday September 12, 2016 @04:43PM (#12483471)
Commented code (as in, working code commented out, not comments in code) eventually rots/becomes cruft that at some point in time is going to bite you (or someone else in your team, or some maintainer in the future)
Re:Vim 8.0 released by ssalazar on Monday September 12, 2016 @02:29PM (#12482332)
Yeah, "not a good practice" (i.e. "the user is wrong" or "why would you want to do that?") is the lazy way of justifying software deficiencies.
Re:Vim 8.0 released by RBerenguel on Monday September 12, 2016 @04:45PM (#12483492)
I use emacs, so deficiencies on how vim handles anything do not mean much to me, actually.
Re:Vim 8.0 released by cschmidt on Monday September 12, 2016 @09:49AM (#12479636)
I believe it has a complete embedded terminal
Re:Vim 8.0 released by placeybordeaux on Monday September 12, 2016 @11:33AM (#12480585)
I've actually started using neovim as a default terminal paired with my standard shell. I personally never got that used to the commands for tmux or screen, and with neovim I get the exact commands I am expected as well as -send line to REPL- with https://github.com/kassio/neoterm
Re:Vim 8.0 released by zem on Monday September 12, 2016 @03:12PM (#12482737)
having lua as the native scripting language is pretty big too
Re:Vim 8.0 released by vegabook on Monday September 12, 2016 @03:39PM (#12482970)
Lula would be proud ;-)