News for hackers. Stuff that matters.
Re:Onivim 2 is a retro-futuristic modal editor by a3w on Sunday June 27, 2021 @04:15PM (#27654891)
Buying software without a trial makes me disinterested. I still want to learn using vim every day, but won't commit to this text editor/vsx-powered IDE, unless I find out that I have the guts to use it every day. Also, there is VIM mode for VS Code, I guess.
Re:Onivim 2 is a retro-futuristic modal editor by ddek on Sunday June 27, 2021 @04:34PM (#27655041)
> Also, there is VIM mode for VS Code, I guess.

I feel like this is something said by people who are more invested in VS Code than vim. The main vim plugin for VS Code is straight trash.* It's slow, buggy, and unintuitive; while lacking the extensibility that vim has. At least IDEAVim, which has the same limitations of being built in another IDE, replicates enough of the common plugins to be pleasant.

It's also worth noting that onivim is not VS Code repackaged. It is not an electron app, and it doesn't appear to use the monaco editor. They have apparently taken great design inspiration from VS Code, which I think is a fairly diffident decision.

Overall, I'm looking at neovim nightly and not knowing why onivim is a thing. I can understand the appeal of a GUI vim, but implementing a vim backend is a monumental task if you intend to be compatible with existing vim plugins (and you should). Nvim 0.5 has native lua, and now freed from vimscript the quality of plugins is improving continuously. I just can't see a way for a 'third vim' - if you don't start with vimscript you won't be compatible, but if you do you're already outdated.

* There are a few attempts to splice VS Code and neovim, all of these are awful.

Re:Onivim 2 is a retro-futuristic modal editor by WiiManic on Sunday June 27, 2021 @05:00PM (#27655276)
> but implementing a vim backend is a monumental task if you intend to be compatible with existing vim plugins

We skipped that and haven't implemented any vim backend at all!

We use/made libvim[1], which is just the vim source, that we've essentially turned into a library. So its the vim code base with terminal UI stuff stripped out, and an interface added for us to hook into it. The README of that repo has some good insight into that (including why we didn't use neovim here, as much as the team all loves nvim).

We don't support vimscript stuff at the moment, but its in progress as all the vim source code is there to load/run it as normal, its just about integrating is properly into Oni2 (making sure keybinds are working, commands are properly loaded, packing stuff up nicely for distrib etc).

(There is some other motivation bits in this doc[2]. Its outdated since we haven't edited it since before the project started, but it outlines the motivations we went in with etc).

[1]: https://github.com/onivim/libvim [2]: https://github.com/onivim/oni2/blob/master/docs/MOTIVATION.m...

Re:Onivim 2 is a retro-futuristic modal editor by revscat on Sunday June 27, 2021 @07:44PM (#27656538)
It is my understanding that one of the initial driving forces behind NeoVim was to allow for easier embedding, such as what you appear to be doing here. If this is true, why did you decide to go with traditional vim rather than NeoVim? Additionally, since nvim lets you choose between Lua or Vimscript for configuration/extension, and I personally find Lua far more intuitive than Vimscript...
Re:Onivim 2 is a retro-futuristic modal editor by atweiden on Sunday June 27, 2021 @08:17PM (#27656734)
> If this is true, why did you decide to go with traditional vim rather than NeoVim?

Answered here [1].

> I personally find Lua far more intuitive than Vimscript...

One of the biggest motivating factors for the rewrite of Oni was the limitations imposed by Vim/Neovim of a terminal grid of characters in the rendering layer: “Neovim treats the visible screen as a grid of cells” [2]. This precluded implementing CodeLens amongst other things [3].

I’m also a fan of Lua — I’ve written a substantial amount of Fennel — but given Oni’s goals, revamping Vim’s rendering layer is of higher importance than Lua support, particularly since the VSCode extension ecosystem is being relied upon anyway. Onivim is designed as more of a direct challenge to heavyweight IDEs than as a substitute for Vim. I already switch between Vim and VSCode depending on requirements, but it’d be great to have the best possible support for modal editing in VSCode.

[1]: https://github.com/onivim/libvim#why-is-libvim-based-on-vim-...

[2]: https://onivim.github.io/docs/other/motivation#a-new-view-la...

[3]: https://onivim.github.io/blog/2021/02/03/release-0.5.3

Re:Onivim 2 is a retro-futuristic modal editor by RMPR on Sunday June 27, 2021 @08:25PM (#27656778)
Seems they had trouble implementing that with Neovim[0]. Relevant reddit thread[1]

0: https://github.com/onivim/libvim#why-is-libvim-based-on-vim-...

1: https://www.reddit.com/r/neovim/comments/cdf36v/onivim2_chan...

Re:Onivim 2 is a retro-futuristic modal editor by crdrost on Sunday June 27, 2021 @08:22PM (#27656761)
Interesting. For once I am interested in compiling something to wasm. Thanks for the libvim link! :)
Re:Onivim 2 is a retro-futuristic modal editor by jnovek on Sunday June 27, 2021 @06:23PM (#27656033)
“We skipped that and haven't implemented any vim backend at all ... so its the vim code base with terminal UI stuff stripped out, and an interface added for us to hook into it.”

You took out the most important part!

I don’t know about other people, but I became a vim user because I found myself configuring servers and needed to know a better text editor than nano.

Vim is also my primary code editor these days but portability is still a killer feature.

Re:Onivim 2 is a retro-futuristic modal editor by lbotos on Sunday June 27, 2021 @06:59PM (#27656262)
You are mis-interpreting what they did. They literally took vim, and built a ui around it. No re-implementation. It's Vim with a more modern frontend stack. You can go look at the libvim source and see it for yourself.

The point of this is to bring Vim into more modern workflows, not but "vim compat" but literally... vim.

Source: had some pull requests into libvim a while back to remove a lot of the various legacy compat features that don't make sense for libvim.

Re:Onivim 2 is a retro-futuristic modal editor by 2muchcoffeeman on Sunday June 27, 2021 @08:55PM (#27656964)
I feel like this is something said by people who are more invested in VS Code than vim. The main vim plugin for VS Code is straight trash. It's slow, buggy, and unintuitive; while lacking the extensibility that vim has.

I like vim and use plugins in all my IDEs because I like the idea of a modal editor and the basic vim is super powerful.

But it’s way easier to get IntelliJ or VSCode setup than your custom vim.

It would be great if there was a reference core engine of sorts that everyone could use in whatever editor.

Re:Onivim 2 is a retro-futuristic modal editor by bccdee on Sunday June 27, 2021 @08:48PM (#27656923)
VScode's vim plugin is actually what got me using vscode in the first place. I pretty much never left the terminal until vscodevim.
Re:Onivim 2 is a retro-futuristic modal editor by WiiManic on Sunday June 27, 2021 @04:52PM (#27655214)
Oni2 is available for use for free for non-commercial usage, it just needs building from source at the moment. The steps are in the user manual if anyone is interested: https://onivim.github.io/docs/for-developers/building

Partially that is a thank you to those who have supported our development, and partially its to help put up a small barrier to entry, just so we don't get too flooded with issues and feature requests!

A public release is coming soon-ish, and can be used for non-commercial use.

Re:Onivim 2 is a retro-futuristic modal editor by lasagnaphil on Sunday June 27, 2021 @09:58PM (#27657340)
I found that it was incredibly painstaking to build though, it's quite a barrier. I wanted to try it out a bit before buying, but it seemed to consume a considerable amount of disk space (>20GB), along with downloading tons of NPM dependencies and giving out weird errors during building.

Is there a particular reason why do you need such an amount of dependencies for building an editor?

Re:Onivim 2 is a retro-futuristic modal editor by steveklabnik on Sunday June 27, 2021 @09:24PM (#27657140)
I use the vim mode for VS: Code as my daily driver, and unlike the one sibling comment, don't think it sucks. I still purchased an Onivim 2 license. It's not far along enough for me to use daily yet, or at least, it wasn't last time I tried it out and I haven't had the time to look again, but I am excited for when it is.

That said, when I did this it was a one-time cost, and it looks like now it's a Patreon thing. Still though, $10 is pretty cheap, and if you hate it, you can always cancel. Or at least, that's how I think about these things these days. Not everyone has $10 to spare on stuff like this, but I am fortunate to.

Re:Onivim 2 is a retro-futuristic modal editor by rapind on Sunday June 27, 2021 @06:06PM (#27655913)
According to their FAQ it looks like they'll be offering a trial version once they hit v1.

https://onivim.github.io/docs/other/faq#is-there-a-trial-ver...

Re:Onivim 2 is a retro-futuristic modal editor by injidup on Sunday June 27, 2021 @04:31PM (#27655007)
Hand holding is still a thing here I guess. https://onivim.github.io/docs/for-developers/building
Re:Onivim 2 is a retro-futuristic modal editor by toastal on Monday June 28, 2021 @06:25AM (#27660009)
It's pretty nice to see such beginner-friendly documentation tbh.
Re:Onivim 2 is a retro-futuristic modal editor by gryn on Sunday June 27, 2021 @04:34PM (#27655035)
it seems to be open source there's a link in the page to the project's GitHub page.

https://github.com/onivim/oni2

Re:Onivim 2 is a retro-futuristic modal editor by mdaniel on Monday June 28, 2021 @11:46AM (#27663392)
Pedantically, I believe it's closer to "source available" than open source, since their license specifically adds a lot of restrictions on the end user