
Neovim v0.4.0 - blindseer
https://github.com/neovim/neovim/commit/e2cc5fe09d98ce1ccaaa666a835c896805ccc196
======
vhakulinen
I'll just leave a shameless plug for my neovim GUI project here:
[https://github.com/vhakulinen/gnvim](https://github.com/vhakulinen/gnvim). It
has a WIP PR[1] for implementing multigrid support, which would allow features
such as scrollbars.

There are many other GUIs too, such as oni/oni2, gonvim, neovim-gtk and
neovim-qt. Extensive list can be found here:
[https://github.com/neovim/neovim/wiki/Related-
projects#gui](https://github.com/neovim/neovim/wiki/Related-projects#gui)

1:
[https://github.com/vhakulinen/gnvim/pull/95](https://github.com/vhakulinen/gnvim/pull/95)

~~~
rjzzleep
I just tried this. I get rendering artifacts when scrolling.

BUT! The scroll speed is absolutely wonderful. I've tried all the UIs and
always find myself going back to the terminal, but this is something else.

Although I have to say fvim looks tempting as well and vimr(I'm not on MacOS
anymore).

For those people mocking vim users and bragging about their IDE's. With
languageserver and the other kind of refactoring daemons available for a whole
host of languages nowadays these editors are much closer to IDE's than ever
before.

The only things that are not really first class citizens are IMHO:

1\. refactoring(outside of C++ and Java)

2\. profiling

3\. breakpoints

EDIT: I'm quite happy with the tmux setup I have but thanks for the
suggestions. The main problem I see with neovim is that the separation of the
python library while nice for update iterations causes issues with virtual
environments.

~~~
pnako
I'm not going to mock you, but why not just use an IDE with a vi(m) mode or
plugin in the first place, if you really want all those features?

Modern IDEs are following a platform + plugins architecture that is probably
as flexible but more robust than whatever you can tape together around vim.

~~~
feanaro
vim modes in IDEs are often inadequate (if this is not immediately obvious,
you probably just don't use vim as fully as possible). The IDEs are often
(too) complex in the sense of a hodgepodge of GUI options and menus which are
hard to navigate. You often can't put the IDE configuration in a version
control system easily. IDEs are often sluggish. The plugin system for vim is
superior to most IDEs.

It's not that using an IDE with a vim mode is not a possible viable
alternative, but it's a game of trade-offs, as usual.

~~~
pvinis
I agree completely. For me, for now, I have vscode with vim emulation. I find
that it's more convenient to have everything vscode has + vim keys for a lot
of things, than have all of vim + try to make vim do what I like from vscode.

I really hope in the future I'll find the time to do that, but for now I am
content. It's always a trade-off.

~~~
cagmz
Have you noticed any sluggishness when using Vim commands in VS Code? I use
nvim + tmux as my go to and it's pretty responsive (still has trouble catching
up to me sometimes) but I often have to wait for VS Code.

~~~
pvinis
I have to wait sometimes, but normally it's fast. It's only when (I think)
somehow the vim emulation bugs out that I need to wait a couple of seconds or
just hit esc 5 times. Thankfully it's not often.

------
Aissen
I want to take a moment to thank the Neovim authors, as a VIM user. Thanks to
you, VIM has felt the pressure and greatly improved, including the vim 8 async
plugin feature (which has now trickled-down in all distros).

I can now use coc.nvim and ccls to have an IDE-like experience inside vim,
which really helps reducing further the write-compile-test-fix loop.

~~~
NilsIRL
Why are you still using VIM if you like Neovim's features? (this is not a
rhetorical question)

~~~
Aissen
Never attempted to make the move (friction, sizeable vimrc). I've mostly been
using the distro builds, which for neovim often meant an outdated version.

I can also admit that I've benefited from the project, even if I've never used
it. Like everyone using Firefox is currently benefiting from WebRender,
despite never moving to Servo.

We often find criticisms of forks in OSS (waste of resource, we should work
together through a common goal), but the truth is that this flawed mechanism
allows for innovation and experimentation. Which is also why the BigCos that
ship different competing products (say, messaging apps), are often the most
innovative because it prevents (some kind of) in-fighting and cookie licking.

~~~
linsomniac
Agreeing with another response: I have a vimrc that I've accumulated over
something like 20 years, I kept putting off switching to Neovim because I
anticipated it would be a headache, and in the end it only required something
like half an hour to make the switch, probably less. I would classify it as
"easy peasy".

------
cygned
The most interesting fact about this release - from my personal point of view
- is that I don’t care. I am usually very interested in updates to software I
use often. nvim/vim is a program I use every day but I never had the feeling
that it was lacking anything. I never ran into bugs. I don’t even have the
feeling that I will grasp all of its features anyway not to mention the
countless plugins. And I expect this upgrade to be stable and frictionless as
in recent years. A tremendous achievement compared to all the other programs I
have the pleasure to work with.

~~~
noxToken
Somewhat off-topic, but that's how I feel about Sublime Text 3. It's fast.
It's snappy. It handles MB-sized files with ease. I use it for text editing,
small scripting (shell scripting, JS), repetitive text transformations that
can be reduced to a macro, and things of that sort. Anything heavier goes into
an IDE.

------
spraak
> nvim_open_win: create floating windows (and external, for supporting UIs)

I've been running 0.4.0 since it came out for this feature.

Also I recommend you check out coc.vim for the best completer. It uses the
same language server protocol that VS Code uses (and many of the plugins for
coc.vim are forked fr VS Code plugins)

~~~
blux
Are there any good alternatives for coc.vim? I do not like the NodeJS
dependency.

~~~
L0stLink
I have been using LanguageClient-neovim[0]. It is great, the main difference I
have observed between LanguageClient-neovim and coc.vim is that
LanguageClient-neovim provides a more vim centered UX (e.g. it automatically
populates location/quickfix list with errors, warnings and hints which enables
quickly jumping between error locations) while coc.vim provides a great out-
of-the box experience but feels like VSCode strapped to nvim (It has its own
extension ecosystem based on VSCode extensions) - I greatly appreciate the
effort by coc.vim's developer, he has done great work and coc.vim defiantly
has its advantages[1] over LanguageClient-neovim. LanguageClient-neovim
requires a lot of customization in order to fit it to your work flow but once
it is done, the experience feels a lot more native. On the topic of which,
LanguageClient-neovim feels lighter and faster to me and has the added
advantage of being usable without any external dependencies (because it is a
compiled binary). I highly recommend checking it out.

tl;dr:

coc.vim is for those looking for a VSCode like experience out of nvim (stuff
works out of the box requiring minimal customization, installing plugins to
get the required functionality) where LanguageClient-neovim is for those who
prefer a vim centric approach (extremely minimal, manually customizing
everything to get it to fit you workflow).

If you are interested in LanguageClient-neovim you can checkout my
config[2][3] you might find it helpful .

[0] [https://github.com/autozimu/LanguageClient-
neovim](https://github.com/autozimu/LanguageClient-neovim)

[1] It shows documentation for completion list items in a floating window
similar to VSCode.

[2] [https://github.com/L0stLink/anvil](https://github.com/L0stLink/anvil)

[3]
[https://github.com/L0stLink/anvil/blob/master/settings/Langu...](https://github.com/L0stLink/anvil/blob/master/settings/LanguageClient-
neovim.vim)

~~~
blux
Thank you for the elaborate answer, seems like LanguageClient-neovim will be a
perfect fit!

~~~
L0stLink
No problem, LanguageClient-neovim can be a bit overwhelming at first and if
you are like me, you might need to rely on the included docs and GitHub
issues, but it is well worth it. I am in my spare time working on getting
floating window documentation working for completion items once that is done,
I will have no need to keep coc.vim installed as backup.

------
nurettin
The vim tricks I got used to in the past 15 years are neat for a quick remote
edit, however, nowadays I enjoy RAM eating smart editors like vs code and
intellij which makes me satisfyingly efficient without remembering to use my
shortcuts.

What I do is mostly refactoring, finding files by name or contents and moving
cursor to places I've been in which provides seamless navigation between files
as well.

~~~
WorldMaker
It's possible to get a best of both worlds setup if you try. Have you tried
the Vim plugin for VS Code?

The VS Code plugin is interesting in context of this Neovim update because it
will actually use parts of Neovim as a "native library" to speed some
operations (mostly ex commands), if Neovim is installed.

[https://github.com/VSCodeVim/Vim](https://github.com/VSCodeVim/Vim)

~~~
Koshkin
> _a best of both worlds_

Or the worst.

------
asdkhadsj
Here's a random question for Vim users who might know Kakoune...

What can be done to make Vim behave like Kakoune? Odd question, I know. As a
former Vim user, I switched to Kakoune about a year ago and absolutely love
it. The multi cursor behavior, and selection before action combined to make a
really excellent and visual experience.

With that said, after 15 years in the Terminal, I tire of it. I want a GUI.
Neovim has made some great advancements to getting users out of the Terminal
(should they want that), and I envy Neovim users! Yet, I can't get away from
Kakoune.

Is there any hope? Appreciate any replies, thank you.

~~~
diehunde
Can you elaborate a bit further on why you prefer Kakoune over Vim ? Thanks.

~~~
asdkhadsj
So, I used Vim for years - but frankly I only used what I needed. I never
played vim-golf extensively, so please don't take what I say as the reasons I
enjoy Kakoune as evidence of shortcomings in Vim. With that said:

Kakoune's multi-cursor support sort of blew my mind when I first started using
it. Combined with the always selection first model of Kakoune, it means you
can plop down 10 cursors, navigate around, select, reduce and etc all of them
separately will actively viewing what they have selected. Finally when you get
all the selections you want, you can act on them. That's really my main
workflow that I just have to have.

Plugins may perhaps solve my issue. We'll see. I also am not sure how
realistic living entirely in visual mode in Vim is. I'm not too well versed in
visual mode, so I can't speak on it too much.

Kakoune has really been a joy for me. I just want more advanced features that
Terminals can't provide (multi fonts, more UI elements, etc)

------
narimiran
It seems that there is already Neovim 0.4.2:
[https://github.com/neovim/neovim/releases/tag/v0.4.2](https://github.com/neovim/neovim/releases/tag/v0.4.2)

------
wruza
Last time I checked neovim-qt on mswin, it couldn't make an explorer
association due to non-standard command-line treatment, rendering it useless
from gui pov. Reporting an issue got some friction, but now it seems that they
fixed that. But from double-clicking .txt to editing it spends 2 seconds. Vim
just opens instantly.

Also, neovim doesn't respect scroll amount setting, scrolling three fixed
lines per scroll step instead. But I have set it to 6.

set guifont=* -- simply doesn't work

set guifont=Consolas:h10 -- "font reports bad fixed pitch metrics". What?

set linespace=3 -- it changes, but doesn't care to redraw contents (except the
cursor) or resize a window so it could fit in a screen. If you're going from 0
to 3-4, it is not even obvious why everything froze and you can't : into
command mode (it is simply hidden under the bottom of the screen).

I know that they're after fixing some internals that are hard parts in Vim,
but if you're replacing a horse with a car, make sure it is more comfortable
than a bicycle. I also know that neovim-qt is NOT neovim core, but...?

~~~
Asooka
I really hope at some point we get one official blessed GUI implementation per
platform a-la gVim and we don't have to pick and choose which particular one
has the least shortcomings.

------
Sir_Cmpwn
And this release is the first one which is being continuously tested on
OpenBSD with builds.sr.ht :)

[https://github.com/neovim/neovim/tree/master/.builds](https://github.com/neovim/neovim/tree/master/.builds)

Welcome to the platform!

~~~
oblio
Awesome!

------
posedge
What are the most notable improvements over vim that the authors of neovim
speak of? [https://neovim.io](https://neovim.io)

~~~
the_duke
The most notable for all Vim users is probably forcing upstream vim to merge
async support for plugins after refusing it initially; albeit with a different
API. (there is quite some bitterness on both sides of this issue, I think)

The other big win is providing a embedding API so other editors can be built
on top of the core editing engine. Which resulted in multiple interesting GUI
projects which you can find in other comments.

Others are Lua plugin support, good terminal integration, way better default
settings, ...

~~~
phil_s_stein
What does "async support for plugins" mean when hands are on the keyboard?
Linters/etc that run without a need for :w?

~~~
shriek
> Linters/etc that run without a need for :w?

That's more to do with how you setup to trigger the commands.

Async here really means that it doesn't block with your typing, jumping around
in the text editor if plugin starts doing some heavy work in the background
due to some action that got triggered by whatever event you had setup for
plugin to do. One of the plugin that I particularly remember was syntastic (I
haven't kept up with it to know if they've fixed this or not) that would just
create janks every now and then if the workload was heavy.

------
odiroot
On this topic, can anyone share their Python setup for Neovim?

I used ALE and Deoplete + a bit of Jedi and got frustrated with it breaking /
working much worse than ST3 and just removed all the plugins.

~~~
0xADEADBEE
I use CoC.vim [0] with whatever Python plugin they recommend and it's easily
been the most painless autocompletion I've ever used in over a decade of Vim.
I wrote some (admittedly pretty basic) Python with it last week with no
complaints!

[0] -
[https://github.com/neoclide/coc.nvim](https://github.com/neoclide/coc.nvim)

~~~
Seirdy
The python plugin that is recommended has switched from `pyls` to the
Microsoft Python Language Server (the same one that powers the Visual Studio
Code Python extension), written in C#. The extension comes bundled with a .NET
Core interpreter.

------
ponyous
Anyone has any idea how to get started with VIM window api?

Lets say I want to create a "floating" window on the side and populate it with
some text. Where do I start?

~~~
L0stLink
> Where do I start?

best place would be the docs _:h nvim_open_win()_

here is a function that takes a buffer id and creates a floating window based
on it anchored to current cursor position:

    
    
        let s:buff = 0
        let s:buff_max_heigth = 12
        function! CreateTempBuffer(buffer) abort
            let text = nvim_buf_get_lines(a:buffer, 0, -1, v:true)
            if s:buff == 0
                let s:buff = nvim_create_buf(v:false, v:true)
            endif
            call nvim_buf_set_lines(s:buff, 0, -1, v:true, text)
    
            let height = len(text)
            if height > s:buff_max_heigth
                let height = s:buff_max_heigth
            endif
            let width = 0
            for index in range(len(text))
                let line = text[index]
                let lwd = strdisplaywidth(line)
                if lwd > width
                    let width = lwd
                endif
                let text[index] = line
            endfor
            let width = width + 1
            let opts = {'relative': 'cursor', 'width': width, 'height': height, 'col': 0,
                \ 'row': 0, 'anchor': 'SW', 'style': 'minimal'}
            let win = nvim_open_win(s:buff, v:false, opts)
            return win
        endfunction

------
revscat
> nvim_paste: paste text at cursor

Is there no corresponding `nvim_copy`?

------
MisterTea
[Ahem] Ed is the standard text editor.

[https://www.gnu.org/fun/jokes/ed-msg.txt](https://www.gnu.org/fun/jokes/ed-
msg.txt)

------
justinmchase
no modes

------
demee
Why do we need such things in 2019?

~~~
YawningAngel
Command line vim is one of the most productive editing environments on the
planet, why wouldn't we?

~~~
dmortin
I'd say language support is the most important for productivity if we talk
about programming. Having the whole API under your fingertips, doing safe
refactorings easily, etc. are much more important for productivity than simple
editing. If you can refactor a class, move functions, rename variables across
the whole project safely (string replace is not enough) with a few clicks then
you are much faster than when you have to do all of these manually.

I'm saying that as an emacs user. I prefer emacs, but if I had to work with a
language (e.g. Java) where language support is much more sophisticated in a
tool like, for example, IntelliJ, then I'd use that instead, because it would
make me much more productive.

~~~
fhennig
This.

First of all, I don't know about vim/neovim, but I think a lot of the issues
apply there as well.

When I develop software, I don't need an editor, I need a development
environment. I spend 90% of my time reading code, so reading and navigating
the codebase should be very straightforward. Most importantly I want to have a
tree view of the files in the project, I want to be able to jump to
function/class definitions and I want to show usages of functions.

Another big thing is debugging. IntelliJ has really good debugging
capabilities.

Also auto-completion.

I think some of these you can get in vim/emacs, but it doesn't come out of the
box. I sometimes miss some of my emacs shortcuts/features, but not enough to
drop all the amazing things that IntelliJ is offering.

~~~
simias
I often switch between several programing languages, I often switch between
projects, I like being able to dig into the code source of some tarball I
found online without configuration. I find that deep editor integration gets
in the way more often than not.

For navigating the project I use helm on emacs, fzf on vim. I can just fuzzy-
match anything I'm looking for instantly. I find filesystem treeviews useless,
they use a lot of screen real estate and they're annoying to navigate, I don't
see the point.

For navigation ripgrep does most of the job complex language engines do and it
works across languages without any configuration. For C I sometimes use cscope
and ctags but even there I often just call ripgrep because why not?

For auto-completion I also find that a very naive algorithm completing words
from existing buffers works reliably and efficiently, with zero configuration
and tweaking. Sure you don't get context-aware completion but that never
bothered me too much to be honest.

For debugging I can't really disagree with you, both Vim and Emacs are very
limited in that regard (Vim especially so).

That being said, maybe if I gave those big IDEs a chance I'd never go back,
who knows. Besides I could spend an hour listing things I think Vim and Emacs
do wrong so it's not like I think they're perfect editors.

