
Oni: Modern Modal Editing – Powered by Neovim - adelarsq
https://github.com/onivim/oni
======
pault
I've been using Oni for the last few weeks as my daily driver (I liked it so
much I signed up as a monthly sponsor), and here's my take on it:

It's a fairly new project, but it's under _very_ active development. There's
an excellent community building around it and I think we will be seeing some
really great progress over the next year. That said, it isn't anywhere close
to feature parity with vscode, but the value proposition is: neovim, with
vscode compatible snippets and typescript-language-server-driven autocomplete
(also works with vanilla JS) out of the box. AFAIK it works with any language
language server with a few lines of configuration. I have tried several times
to get You Complete Me working to my satisfaction and never quite got there
despite spending several weekends working on it. Oni just works.

The bonus value proposition is: since it is a GUI wrapper around neovim, you
get to retain all of the muscle memory you have built up in your years of
using vim, but potentially also get all of the goodies that a graphical IDE
like vscode provides. I have tried the vscode vim extensions, and they are
really impressive, but they are still limited by the vscode extension api and
at the end of the day it's not a real vim. For me, it was just not-vimish
enough to constantly interrupt my flow; I believe the original inspiration for
Oni was the creator's frustrations with vscode vim extensions.

I have been digging into the development process and I've been _really_
impressed with how brilliant and industrious the main contributors are;
features are getting added at a breakneck pace. A few things that are in the
works: real-time browser pane with auto-refresh (I just tried out the browser
feature and it works like it's just another vim buffer... pretty awesome
stuff!), markdown preview, and a gamified tutor mode for newbies.

~~~
scrollaway
Urgh, this is so infuriating. Oni looks fantastic if it can deliver on what it
does, but the infuriating part really is VSCode in all this.

Code is a great editor/IDE and has a huge amount of development backing and
now a pretty large market share as well, which means inertia. But the vim
bindings for it are just _garbage_. They are slow, make the editor feel
sluggish, they don't work "quite right", etc.

No kidding this sparked some inspiration, but now I'm just going to have to
either look at Oni and be jealous forever until VSCode catches up (if it ever
does), or switch to Oni and end up missing out on all the features and inertia
of VSCode :/

Hopefully the work that goes into this newer editor will spark some
inspiration and get some of the work offloaded to libraries which VSCode can
use as well.

~~~
gnulinux
How does VSCode vim plugins compared to evil-mode of emacs?

~~~
Funnnny
evil-mode is actually useful. VSCode's vim plugin loads really slow when you
change project, doesn't have proper insert/normal/visual mode map, etc.

~~~
domenukk
Have you used it recently? It works pretty well (?)

~~~
karmajunkie
It works pretty well for movement, selection, etc. Anything that uses longer
key chords is out—vscode is limited to two keystrokes afaict. It's really
frustrating trying to replicate a highly customized spacemacs or vim setup.

------
justinmk
The project README.md doesn't do justice to the improvements that Oni has been
pumping out.

Some new stuff in the unreleased/development version (hidden behind feature-
flags):

* Keyboard-driven navigation of embedded web browser: [https://twitter.com/oni_vim/status/977280220234268673](https://twitter.com/oni_vim/status/977280220234268673)

* Live reload with embedded browser: [https://twitter.com/oni_vim/status/976502172891299840](https://twitter.com/oni_vim/status/976502172891299840)

However personally I just love the scrollbar: it shows viewport-relative
position _inside_ the file-relative scrollbar. (maybe this idea was borrowed
from some other IDE, but I haven't seen it before.)

P.S.: Yes, it's electron, but if you're not using terminal Vim/Nvim then you
already have given up "minimalism" in favor of ... whatever advantage you
ascribe to gVim.

~~~
bringtheaction
The kinds of things in your comment are the kind of things that make me
consider actually installing Oni rather than just going "oh neat, people _are_
making Neovim frontends" like I did when I first saw this post.

The only thing that makes me hesitate is because I run FreeBSD on some of my
computers and FreeBSD support wasn't quite there yet for Electron apps last I
checked. It may have changed in the meantime.

If I were to begin using an Electron app, I need to be sure that I will be
able to use it on my FreeBSD computers also. This is especially important for
editors and IDEs given that writing software is rather central among the
things that I do. Currently I use Neovim for a lot of things and I use PyCharm
for bigger Python projects.

I am wondering though, would it be feasible for one person (me) to rewrite Oni
so that one can use it from within their web browser instead of with Electron?

~~~
montyf
I liked the irony in this post, considering that the main draw of Electron
apps is that they are supposed to be cross-platform. (To be fair though,
FreeBSD is pretty niche.)

~~~
1k2ka
I don't consider any framework cross-platform unless it also targets TempleOS.

------
theon144
Electron frontend is precisely the thing I really don't want from a tool like
vim...

~~~
rocqua
Note that, according to others in this thread, it is not running in full
browser mode, with the backend using javascript. Instead, it is using electron
just for rendering.

People here claim this is a lot better for performance. I've no personal
experience to verify this.

~~~
k_
I'd tend to agree with GP, but this seems interesting.

I'll give it a try, although not with great hopes performance-wise but oni may
be a good compromise between nvim and good lsp designed for vscode (like haxe
lsp which struggles on nvim).

------
Tehnix
While Oni is still very young, it looks like one of the more promising Neovim
frontends, and the development is progressing quite fast!

If you are one of those types that often switch between editors, like me, then
you might want to retain some of the muscle memory you've built up in stuff
like Atom/VSCode/Whatever.

I started creating a layer[0] for SpaceNeovim to replicate some of the common
keybindings, such as _Cmd+s_ for save, Cmd+w for closing tabs, _Cmd+[1-9]_ for
switching tabs etc. If anyone is interested in getting this, without going
full in with SpaceNeovim, they can extract it from [1], which currently
handles both VimR and Oni (different key for CMD), but you could simplify it
to not use _exe_ if you wanted to.

It requires that you load your init.vim, so _" oni.loadInitVim": true_ needs
to be set in the Oni config.

Another thing, you can quickly add support for an LSP in the Oni config with
just,

    
    
        "language.haskell.languageServer.command": "stack",
        "language.haskell.languageServer.arguments": ["exec", "--", "hie", "--lsp"],
        "language.haskell.languageServer.rootFiles": [".git"],
        "language.haskell.languageServer.configuration": {}, 
    

which adds support for the Haskell LSP, hie, behind stack.

[0] [https://github.com/Tehnix/spaceneovim-
layers/tree/master/lay...](https://github.com/Tehnix/spaceneovim-
layers/tree/master/layers/+gui/ide)

[1] [https://github.com/Tehnix/spaceneovim-
layers/blob/master/lay...](https://github.com/Tehnix/spaceneovim-
layers/blob/master/layers/%2Bgui/ide/config.vim#L49)

------
terraforming
I installed it and loaded my init.vim. It is just so slow. I'm a pretty heavy
user of snippets, and it honestly takes like 1 second for my snippets to
appear after I call them.

Nvim desparetely needs a good GUI. Ever GUI I've tried (I think I've tried all
of them) lags when calling snippets.

------
reidrac
I've been very happy with gvim for many years, so I don't think I will change
any time soon (although Emacs + evil is very sweet too, specially writing
Clojure).

But there's one thing I can't really understand and, for me at least, is not
an advantage working with code: why using tabs?

It feels like an anti-pattern when I'm using (g)vim, I use buffers and I split
in few windows, list buffers, change buffer, etc; and I never leave the
keyboard. I guess it is "modern" to use the mouse, including the file explorer
(I use :find mostly, then ctags navigation), but it is something that doesn't
work for me at all.

~~~
jagtesh
For me, it is to avoid context switch. I'll have all the files I need open in
different tabs and switch between them. If I need to cross reference
something, I'll open it in a new pane.

Personally, I like being able to see the filename in the tab and just hit gt
or Gt a few times than to bring up the buffers list (with or without Ctrl-P)
and type the filename.

That being said, I love spacemacs and it doesn't have tabs (or I haven't
researched that enough) where I make do with fuzzy searching through buffers.

------
vr46
One Vim to rule them all? Looks nice, will have to try it. Will never be a
daily driver for me, as it’s not a terminal editor, but I like their thinking.

------
chc4
It says it's powered by React and (presumable) Electron - does it have the
same kind of issues that Atom does? Can it open big files, how responsive is
it, etc.

How do plugins work? Do neovim plugins work out of the box with Oni, do you
have to write a wrapper, or are they completely incompatible? This is really
the make or break part of it.

~~~
bringtheaction
> Can it open big files

Yes it should be able to do that. Neovim runs separately from frontends like
the one in the OP.

[https://github.com/neovim/neovim/wiki/Plugin-UI-
architecture](https://github.com/neovim/neovim/wiki/Plugin-UI-architecture)

------
phonebucket
This cropped up several months ago on here, see here for the comments from
back then:
[https://news.ycombinator.com/item?id=15060417](https://news.ycombinator.com/item?id=15060417)

~~~
pault
It's disappointing to see that 90% of the comments there are people arguing
about electron.

~~~
ComputerGuru
It’s a valid point. Lots of people use vim for its sheer speed, which you
throw out with the bath water when switch to electron.

~~~
toxik
I haven’t tried the app yet but it seems that this is not true for this editor
as NeoVim is the backend, not JavaScript.

~~~
k_
1.5G for a fresh startup with no files open is unacceptable when looking for a
lightweight editor. That's what made me go back to vim; my previous laptop
with 4G RAM couldn't handle vscode + a browser without going out of RAM. I had
some hopes for oni but so far it doesn't solve any issue I have either with
nvim or with vscode.

------
cjbprime
Mentioning to perhaps save time for others: just gave it a spin but it looks
like there's no eslint support, and my project uses prettier/flow/etc all
wrapped up into eslint.

------
RobertRoberts
[https://github.com/onivim/oni/wiki/Language-
Support](https://github.com/onivim/oni/wiki/Language-Support)

Why do I need NPM to install vue.js as a language for Oni? Can anyone explain
why I would want to bother with this editor if it requires Node.js?

Edit: I've tried all the other Electron based editors, and I don't recall a
single one requiring Node.js/NPM to install anything.

------
sevensor
Eight acknowledgements, but no love for Bram? That's pretty cold, even if you
don't like the way he runs the vim project.

------
alexozer
I do think I might prefer the approach of the asymptotic of development
approaching vscode features with a base in pure Vim rather than the asymptotic
approaching full Vim compatibility within vscode, and so I really want to like
Oni.

What immediately struck me as "this project is not ready to use to actually
code in" was trying to scroll with my Macbook's touchpad and it working pretty
awfully. It seems like an obvious enough issue that it _has_ to be being
worked in, but maybe not and I should report it.

~~~
badosu
This has been an issue for some time, tracked in
([https://github.com/onivim/oni/issues/1568](https://github.com/onivim/oni/issues/1568))
and
([https://github.com/onivim/oni/issues/405](https://github.com/onivim/oni/issues/405)).

Unfortunately is not an easy task to accomplish at the moment, due to the way
vim scrolling is tied with the terminal approach (line by line), does not seem
as a hard block though and hopefully can be improved.

Since most of the time you are scrolling with keybindings when using vim this
may not be as big of an issue for most vim users (I never had issues in my
experience), but certainly desirable to fix as it's a dealbreaker some.

------
krick
Does it work with vim plugins? How much of my pre-existing vim configuration
can be transfered onto oni? It's currently about 500-1000 lines in .vimrc and
≈50 3rd party plugins.

~~~
skosch
Pretty much 100%. It's a regular instance of neovim, just with an Electron UI
around it. I've had no issues with my .vimrc at all.

~~~
krick
Even things like Goyo? Then it's pretty damn great. Even though I hate
Electron apps. Thanks, I need to try it.

------
aeroaks
Great project. I tried Atom but was not satisfied with the performance. I
would like to try it but looks like I am a noob with Vim. Where should I
start?

~~~
tomcooks
The great "vimtutor", in 15 minutes you'll be extra-proficient.

------
pweissbrod
What is the sweet spot of Oni? If you're looking for a full-blown IDE with vim
UI on top then the vs code IntelliJ Visual Studio does reasonably good job at
that.

If you're looking for a beefed-up version of vim as an IDE spacevim has a
package manager and a curated set of over 200 plugins dialed in to work well
together for gvim or terminal.

I'm just trying to understand the differentiator

~~~
wsdjeg
SpaceVim is not same as oni, oni, is a gui app for neovim. And SpaceVim is a
configration for vim/neovim to make it works like IDE,

in old version SpaceVim has many plugins, but we just release v0.7.0, and the
default plugins is only 50.

you can checkout our release note:

[https://spacevim.org/SpaceVim-release-v0.7.0/](https://spacevim.org/SpaceVim-
release-v0.7.0/)

~~~
pweissbrod
@wsdjeg: thank you for your continued work on spacevim

------
ziikutv
Looks great. Two questions:

1\. I wonder though why you/team didn't opt for extending the vim emulation -
via a plugin - on VS Code. Did the exposed API limit you from doing so? Edit:
Having used the extensions of VSCode, I am wondering if that is the case.

2\. Does it support installation of sublime/atom/vscode plugins?

~~~
xconverge
As a developer of the VSCodeVim plugin, Oni is a great inspiration and we are
hoping they pave the way for the Neovim API (which is starting to mature). We
have started using neovim for a few things, the command line for example. So
while we have started getting our feet wet, hopefully something like Oni (or
Oni) replaces us...soon :)

~~~
bryphe
Thanks xconverge, it's great to hear from you and appreciate the kind words!
I'm a big fan of the work you're doing as well - really impressed with the
VSCodeVim plugin.

------
lbj
The challenge with building a new editor, is that it has to be superior to
those editors already available. In this case that means beating Emacs which
Im not seeing Oni doing yet. Will be interesting to follow though.

~~~
O_H_E
Qoute from a comment from the dev down the threads "I believe VSCode is making
the right set of trade-offs for their user base - there is benefit to the
sandboxing of the APIs as it helps lift the overall quality of plugins. Every
editor is a different exercise in trade-offs, and I wanted to explore a
different set, targeting a more niche group."

[https://news.ycombinator.com/item?id=16674641](https://news.ycombinator.com/item?id=16674641)

I belive that there is no "Perfect" software, but there is a software that is
Perfect for me (or anyone else)

~~~
lbj
Fair point

------
bla2
This looks really cool.

I tried it on my macbook, and for some reason I can't keep 'j' pressed to
scroll down - I have to press it once per row. This works fine in MacVim and
Terminal.app vim. Does anyone know why this won't work?

~~~
bsmith89
The Mac install guide [1] references needing the following in order to use
"PressAndHold".

> To enable key repeat when pressing & holding a key in Oni, write the
> following in your terminal:
    
    
        defaults write com.extropy.oni ApplePressAndHoldEnabled -bool false
    

[1]: [https://github.com/onivim/oni/wiki/Installation-
Guide#mac](https://github.com/onivim/oni/wiki/Installation-Guide#mac)

------
guessmyname
Related projects — [https://github.com/neovim/neovim/wiki/Related-
projects](https://github.com/neovim/neovim/wiki/Related-projects)

~~~
notthemessiah
There are many projects on that list, if you want a fast native app I would
recommend:

* neovim-gtk for Linux: supports using a file tree, tabs, a nice open dialogue menu for recent files, support for working with Plug for new plug-ins.

* VimR on Mac OS: has a file tree, buffer menu, and support for HTML/Markdown Preview.

------
shapiro92
does it actually bring any advantage except being closer to VIM in terms of
navigation?

People mention it is better than Atom due to how it leverages Electron which
is nice but still, what is the value proposition of this IDE?

------
arbie
From the Goals section:

"Modern UX - The Vim experience should not be compromised by terminal
limitations."

Could someone expand upon this goal?

Isn't the entirety of Vim built for - and around - terminal limitations?

~~~
toxik
Not really, it’s certainly capable of terminal use but the various graphical
frontends are a lot more convenient to use. It has never been the aim to only
serve terminal usage.

------
ausjke
not really impressed, quite far behind from geany and vscode, vim is handy
enough too, so what's the selling point that I have missed?

~~~
bastijn
You are comparing an alpha/beta with a full product. The selling point is the
future where Vim becomes a native integration in your IDE (or actually the
other way around) instead of a plugin which is never completely supporting all
Vim options. Or at least that’s my take on it.

