Onivim 2: Lightweight, Modal Code Editor
github.com
github.com
"∙ Free for non-commercial and educational use."
"∙ Commercial use requires the purchase of a license."
and then
"Because of the support we've received from open source communities, we've decided to dual-license the code after 18 months - every commit, starting with 017c513, will be dual-licensed via the MIT License 18 months from that commit's date to master."
That said, I think it's mainly down to companies that use the open source software to start paying for it. All companies that use open source software - and be fair, this is pretty much all software companies - should reserve some budget to sponsor and donate to open source project and developers.
Second, there's a lot of open source projects whose developers are paid for by a company, e.g. Linux, Chromium, etc. That code is still open source and free, AND the developers get paid.
We wanted a model where, unlike completely proprietary licenses, the source code could be available - and, worst case, if something happened to the project - users could still have full access to it. And that all the work is eventually available in general.
Our first OSS drops - from 18 months ago - are coming in next month (July 2nd), so that'll be exciting. It will be interesting to see how it works out.
I do love the way you have the price so low.
Would much rather work on bug fixes and features! Just a necessary evil to be able to fund development. In an ideal world - could just write open source software and not worry about paying bills.
Can you put in a formal license statement saying that each change will become mit-licensed 18 months after it's committed? That way, there's no ambiguity if development stops and releases stop getting put in the oni2-mit repository.
I'm not really sure what the target customer/market is...Perhaps beginner Vim users that want a better modal editing experience than the Neovim plugin for VS Code provides, without having to sacrifice VS Code plugins? In any case, props to the Onivim team for the progress/momentum behind the project.
This is based on me personally. I use the vim plugin in VS Code. I wish it was closer to real Vim keybindings, search etc but I want to keep the overall handling of tabs and files.
So Onivim is very interesting to me, I have purchased it, because it looks like it will give me the combination of speed, plugins and conventional editing experience that I'm looking for.
We are adding Vim-style tabs as well (i.e. tabs are a view on to buffers, where a buffer can be any split etc as expected).
That said, you are right that a lot of people in Oni1 were interested in a "modern" (in heavy quotes there) way of doing tabs, where a split could have its own tabs etc, as is the way in VSCode etc.
This is one of the biggest pieces feedback we've received both the tabs / splits in particular [1], and the more general issue of broader Vim compatibility [2].
We actually use a forked Vim implementation under the hood (libvim [3]) - as the modal-editing engine. So Onivim, in theory, _could_ support everything. The main issue is 'wiring up' features from libvim to our front-end.
We'll be focusing on this in our next milestone (July-Sep) - with the high level goals of supporting more traditional Vim workflows, Vim tab support, along with VimL plugin support and init.vim/vimrc compatibility.
Ultimately it's a prioritization problem - so having feedback like yours is really helpful, so that we can focus on the right priorities for that work.
- [1] https://github.com/onivim/oni2/issues/592
I see why people use it and maybe it not even a web app but I’m old enough to know vim gets me everything I need and using some ide desktop app is going to cost me more time in the long run.
For context, one of my biggest pet peeve is my dependence on desktop web browser. I wish I could actually be productive using something lynx.
My dream is also for vim to be the integrated, full-featured software package you describe, but at the moment I find it falls short.
Same here. In the end I just gave up and installed Emacs with vim key bindings (evil mode). Took a while to set things up, though, albeit not so much the vim bits, which were fine, but the IDE features.
Vim is fine as a framework for text editing but as an application it's a bit lacking.
I've been seriously considering writing a new vim clone in go and build what I would consider the ultimate editor. Basically as if vim had been written today.
There's a cool non-Onivim usage of it called Paravim [2] (and the same author also used it for Vim-Cubed [3])
- [1] https://github.com/onivim/libvim/blob/master/src/libvim.h
One of these days I will get around to contributing to a Vim plugin or two to help improve Typescript / TSX support.
I have spent many hours trying to get that work with no success. I've searched public .vimrc configs on github using typescript plugins and none of them gave me any type of syntax highlighting that compared to VSCode.
I use CoC.nvim using the coc-tsserver plugin to get Typescript completion/jump to definition etc, ALE to get ESLint warnings, HerringtonDarkholme/yats.vim (A Typescript syntax, Neovim comes bundled with this, but the bundled version might be out of date), and maxmellon/vim-jsx-pretty for JSX syntax highlighting and indentation (vim-jsx-pretty's auto indentation is not 100%, but it works well enough).
My colorscheme is tomasiser/vim-code-dark, in case that matters. Example screenshot: https://i.imgur.com/6UzKtU2.png
Plug 'HerringtonDarkholme/yats.vim'
Plug 'mhartington/nvim-typescript', { 'do': './install.sh' }
Plug 'pangloss/vim-javascript'
Plug 'maxmellon/vim-jsx-pretty'
Not too far off, but different.
I'll adjust a bit and see how it looks on some production code.
https://github.com/monsonjeremy/dotfiles/tree/master/config/...
Onivim 2 for the record is not a web app, it's a completely native app built in ReasonML (OCaml) and they even had to build their own GUI framework (Revery) to make this editor. It's extremely fast.
I wonder what they'd say in response?
For me, a lot of the value is in having a single app that I can turn to for most of my dev tasks. That app happens to be a terminal (with different projects contained in different tmux sessions).
It gives something very close to the "hands never leave the keyboard" experience that I like about living in the terminal, while also letting me fall back to a mouse when that would be quicker or easier. It also gets me the nice things that I expect are only possible to do well in a graphical environment, such as minimaps and displaying graphical information like plots or dependency graphs.
I do find that my text-mode editor skills are weakening over time, and that does have an impact on my productivity when I have to do a decent whack of work on a remote server. But that's not something that I personally have to do often enough to be a major concern.
With my current job, I'm forced to use IntelliJ (a lot of the build scripts depend on it, and the project is too big for Eclim), and while there's nothing wrong with IntelliJ, I simply don't feel half as productive with it as I do within Vim and tmux.
Basically just VS Code but in a terminal window. Really wish something like that existed (or maybe it does but I don't know about it).
syntax highlighting: https://github.com/sheerun/vim-polyglot
completion: https://github.com/neoclide/coc.nvim
file browser: https://github.com/preservim/nerdtree
how to install these plugins: https://github.com/junegunn/vim-plug
Still early days - and a lot of work - to realize our vision for this project :) But I'll be around to answer questions.
It would be really handy to be able to jump into a remote machine and work on code that way without much lag or the need for heavy GUI stacks <3
CoC basically takes VSCode addons and modifies them just enough to get them working in conjunction with neovim.
Just to give some background: I'm not someone that spends hours in an IDE every day. I'd just like something to easily install and that I can just jump into, and that makes less frequently used features easy to find with a menu or something.
Basically VS Code but then ideally in a terminal so that I can run it inside tmux, and so it will work fine over a slower connection.
VS Code, while suboptimal IMO with its Electron implementation, does show the way for an accessible IDE with great support for plugins. Even someone who doesn't use it daily can figure it out. But it's GUI only :(
Do you have any guide to get started?
Something built from the ground up with vim in mind, while still supporting the mature extension ecosystem of VSCode is exciting. Glad to be able to contribute further via Patreon[0] as well.
I'd wager most software developers can shell out $35 on a whim.
Look at what something like Visual Studio or IntelliJ cost for a commercial license :D This is nothing.
There is a somewhat out of date document on the motivation behind starting Oni2 here: https://github.com/onivim/oni2/blob/master/docs/MOTIVATION.m...
The big changes from Oni1 to Oni2:
- We moved from Typescript/Electron to ReasonML/Revery for a native rendering stack which is much faster (startup/in general) and generally lighter weight, with a solid FFI story for native libs (Like libvim below, but also stuff like tree-sitter etc).
- We moved from neovim via RPC to libvim, a fork of vim as a library, with motivation behind that change in the doc above, and why vim over nvim in the GitHub README for libvim.
This is allowing us to bring forward the things people liked in Oni1, but drop stuff that people didn't, with Electron being an obvious big one. The end result, combined with harnessing the VSCode ecosystem should hopefully make a compelling editor.
I think it's so cool that you can take the ideas of ReactJS - functional programming applied to UI - but then have a language (ReasonML [2]) that is essentially purpose built for it, with OCaml [3] powering it under the hood - a functional programming language that's been significantly invested in, both in academia and industry. And to be able to take React-the-Idea, compile it cross-platform, to native-code... and ship.
- [1] Jordan Walke - React to the Future: https://www.youtube.com/watch?v=5fG_lyNuEAw
- [2] https://reasonml.github.io/
- [3] https://ocaml.org/
It has a very complete feature parity with Vim and even implements many popular Vim plug-ins such as surround, unimpaired and abolish.
Given this, and that there's at least one vim plugin for VSCode, is Onivim a serious alternative? How does VSCode+vscodevim compare to Onivim?
I suppose the vscode plugin support is implemented in similar fashion as coc[1] does it.
The extension host is larger than just handling language services - it handles additional functionality, like source control, menus, language configuration - the full protocol is defined here: https://github.com/microsoft/vscode/blob/master/src/vs/workb...
We aim to integrate with that back-end extension host process - in other words, to support the `vscode` extension API surface, not just language support.
Because of the ubiquity and popularity of VSCode - the extensions tend to have significant investment and be of very high-quality, so we'd like to be able to leverage that wholesale.
Guts of it is that Neovim didn't play nicely with their OCaml build and Vim did. Rather than invest time in working through the problem, they went ahead with Vim but remain open to supporting Neovim.
I don't think this is a fair characterization. We've made significant investments in both Neovim and Vim, and carefully considered the trade-offs.
> Guts of it is that Neovim didn't play nicely with their OCaml build and Vim did
This was a smaller consideration - but more fundamentally, the model Neovim uses for input - queuing it on an event loop and handling it asynchronously - is at odds with what we required - to be able to process the input -> handle updates synchronously.
There was a significant amount of incidental complexity in the architecture of our V1 to fit that asynchronous model - we wanted to avoid that for V2, and we switched to Vim because it fit that model.
I think the link summed it up well, near the end
> this was purely a constraint-based technical decision
It's inspired by ReactJS, and has a similar API, but actually compiles to native code (not javascript). So you have a React-like developer experience, but with native perf.
Revery supports the same FFI as OCaml [1] - C-style linking. I believe Rust would be straightforward to integrate that way - I'm not sure about C#.
- [1] https://caml.inria.fr/pub/docs/manual-ocaml/intfc.html