11 ms·
Oni – Modern Modal Editing
- jswny 8y agoWell at least for me the best of Vim includes running my editor in a terminal, so I wouldn't quite say that Oni has the best of Vim.
- INTPenis 8y agoAnd being available on most distros, even if it's a basic version or just old school vi.
- wereHamster 8y agoWhy use vi when you have ed.
- yjftsjthsd-h 8y agoHappy medium:)
- YeGoblynQueenne 8y agoWhy use ed when you can shoot yourself in the foot?
- edanm 8y agoYou know, I've always been fascinated by this statement. Why is it more comfortable for you to be in a terminal? (For the record, I currently use Macvim but am deeply interested in Oni and other projects. I've been a vim user for many years now and consider myself reasonably proficient, although, you know, it's vim after all, there's always more to learn).
- akkartik 8y agoBecause I already live in my terminal for everything else, and I'm constantly opening and closing my editor, and that's slower when it spawns a new window. I recently installed a plugin that lets me open MacVim with a shortcut (https://github.com/cknadler/vim-anywhere https://github.com/cknadler/vim-anywhere). Everytime I use it I remember why I avoid the GUI.
- edanm 8y agoI don't really understand the "line in my terminal for everything else" reasoning, as I don't mind alt-tabbing. But I really don't understand the "constantly opening and closing my editor" thing. I'm usually working on one or two projects at a time at most, and just keep a window open to that project. This is pretty much how most people work. Why doesn't that work well? I'm genuinely asking btw. I'm not sure why loving vim is so correlated with working with your editor in such an unstandard way. (I mean, I'd guess it's the opposite - people like me come to vim for reasons having nothing to do with that, and try to use it like our old IDEs, whereas people who started off wanting to do everything in the terminal look for a solution and find that vim fits them. But that's just a guess).
- akkartik 8y agoTreating your shell as the environment and an editor as just one tool among many is a perfectly internally-consistent approach. Standard, even, considering how many of us do it. I don't claim it's the only workable way. Do us the same courtesy.
- edanm 8y ago"I don't claim it's the only workable way. Do us the same courtesy." I'm sorry, I didn't mean to offend. As I said - I'm genuinely curious as to what you feel makes this method better. I wouldn't be wasting my time asking if I didn't think there was a chance I might learn something that would make me change the way I work - that's how I picked up vim in the first place, not to mention every other improvement I've ever made in my life.
- akkartik 8y agoIt's all good, just be careful with words like "standard" and phrases like "like most people". They can subconsciously hinder learning. This is a subject that has been hashed to death online, especially in Vim vs Emacs discussions. Emacs behaves more like an IDE, as an environment rather than a tool. Vim is further along the tool side of the spectrum (though I sense Plan 9's Acme is even further along; Vim is actually pretty moderate, believe it or not). Gvim tries to bisect the difference, but I find it to be the worst of both worlds: not as nice an experience as say Idea or PyCharm, but also encouraging "bad habits" from the terminal point of view, such as using the mouse. Or navigating where you are in the system from within the editor rather than the shell. I actually do use multiple windows and Alt-tab between them. It's just that most of them are terminal/shell/tmux windows. I do use other apps too (like a web browser). But for text processing and navigation the shell is what I like best. Anecdotally Vim users seem more sensitive to even small latencies, and GUIs invariably seem to introduce lag. Though I'm finding that I'm more tolerant of lag in my non-shell windows. Using VimAnywhere has made that clear because it causes the "universes to collide". This whole question is actually not that important, in my opinion. You were right above that it's mostly about what way you start out in. If you're reasonably effective with one set of tools, to try to switch is to bait big to catch small. There's far better uses of your time out there. Perhaps the only thing to learn is that there are many ways to skin the cat. There, now move on.
- _5meq 8y agoIn my terminal everything is a string. All of my tools are run from the terminal ( cloud provider, provisioning software, etc. ) I can chain cli calls together to create powerful workflows. I have highly scriptable workspace management with tmux + vim. I don't have to wait for web pages to load to run commands, I can just do the thing in the same place I do everything else. Many people don't gain that much from the terminal but if you are a power user it makes your life great. I don't like GUIs, they take too much space, are always trying to sell me something, present information in an inferior way ( I like my dark, cool colored termina l color palette ), and I can't script repetitive tasks. most cli tools have the same conventions so learning new tools has way less overhead. Just a few reasons.
- mikekchar 8y agoFor me, as a data point, there are a couple of reasons. 1) Because when I started programming, that's what I used. I'm comfortable in it because I'm comfortable in it :-) I'm pretty sure that's most of the issue to be honest. When I've asked people what they like most about their graphical IDEs, I've come away with the impression that the same thing governs the majority of their preference: it's what they are used to. 2) My vision is poor. I use a 22 point font. The layout of most GUI programs tends to leave no room for editing if I use the same kind font size (I also have poor peripheral vision, so I use a 13" display which fits comfortably in the section of space that I can see). Things like menu bars, file trees, object trees, test panels, etc, etc are more than useless to me. If I close all of them down, I'm left with exactly what I have in my terminal window. 3) I don't like to use a mouse. I use a tiling window manager. Often I work in tmux (for which I've set up key bindings exactly the same as my tiling window manager) and I might not even have X running (I probably have the most tricked out linux console of anybody I've ever heard of). I used to have a trackball, but I've given it up and now work exclusively with a laptop with a track pad because I've gotten myself to the point where I almost never have to use it. 4) Performance. I have 8 gigs of memory in this laptop. I have swap turned off. I almost never use more than 2 gigs at a time (sometimes I have a VM which has 2 gigs allocated to it, so then my memory usage creeps up to 4 gigs). Lots of memory for file buffers :-) People are always amazed at how responsive my machine is, despite being a 3 year old i5 mobile processor with 8 gigs of memory. IDE's are bloatware for me. I won't use the extra features anyway. Most of this is personal, but that's what you get for preferences. A few people I've worked with have seen my setup and have gone a similar way. I know a couple of people who also live in Emacs -- they never leave Emacs if they can help it because everything is completely integrated in a way that you just can't do in other environments (that I've seen, anyway). In the late 90's I worked on Windows stuff and my employer forced me to use Visual Studio (yeah, employers actually pulled crap like that in the 90's). I eventually modified it to the point where I liked it quite a lot. I'm sure I could do the same with most IDEs out there now, but there's no point. The terminal gives me everything I want at minimal resource overhead.
- hzhou321 8y agoThe number one reason for me to use vim is also to be able to use it in a terminal. The number one reason for a terminal is to have a consistent current directory. When I double click gvim, I immediately lost. I guess you could launch editor from file, and it's OK if the file is in isolation. For me, it is never the case.
- soperj 8y agoI've used the 0.3.1 version. Waiting for the ability to open multiple projects at once before it becomes a daily driver. Thanks for all the great work :)
- bryphe 8y agoThanks soperj for the kind words! Hope we can get that soon; that's a feature that would be useful for my workflow as well!
- weliketocode 8y agoThe best of Vim and any combination of other editors is still just Vim.
- CJefferson 8y agoEDIT: the title used to be "oni: better than vim, atom and VSCode". It seems the title comes from the submitter here, rather than the web page. I've looked at this, and as a VSCode user, it is not at all a useful replacement, it's barely usable for me. Also VSCode has a lots of useful plugins, which aren't support here. I'm sure if I learnt all the vim shortcuts it would be great but then I'm using VSCode because I don't like vim.
- wreath 8y agoThis is exactly why I moved from Oni to VSCode with neovim embedded. Oni was just way too slow and i couldn't use the plugins i needed from my previous vim setup. I switched to VSCode and now I get best of both worlds!
- exrook 8y agoTo respond to this and the child comment, since Oni is a wrapper that communicates with an actual neovim process, most (neo)vim plugins should be useable with Oni. I've had great success simply telling Oni to read my existing init.vim (that I use with neovim in regular terminals) and my 20+ plugins just working. Whether or not Oni provides additional utility over a standard (neo)vim in a terminal is probably dependent on personal preference. There is also definitely a cost to the use of Electron, I typically have 4 or 5 windows running at a time, one for each project I work on, and it uses about a GB of RAM in total, so if you're on a memory-tight system you may not want to stick with terminal vim.
- llimllib 8y agoI'm very interested in the idea, but unfortunately it was way too laggy for me. Noticeable lag just moving the cursor around prevented me from taking a deeper look.
- kzrdude 8y agoLooks cool. They seem to say it's based on neovim, so it's actually an interface to the real thing, then. A shame their website is so cryptic and the link to their source control host is not easy to find.
- theknarf 8y agoThere's a big github icon on the front page up to the right leading directly to their git repo...
- nategri 8y agoYeah you can go ahead and miss me with every single one of these vim-via-Electron monstrosities. CLARIFICATION: For me the whole point of learning vim was that it's lightweight and ubiquitous. Stuff like this is 0 out of 2 on that front.
- toastking 8y agoYeah one of the major points towards vim is pretty much every unix environment has vim installed.
- pjmlp 8y agoActually if you happen to ssh into the classical proprietary UNIX servers you might end up with plain old vi still. But yeah, that is why even I as Emacs user always bothered to at least know my way around vi, usually Emacs is most likely not installed.
- jcelerier 8y ago> Actually if you happen to ssh into the classical proprietary UNIX servers you might end up with plain old vi still. Let's be honest: out of 10000000000's of SSH connections in a given 24 hours span, how many are to a "classical proprietary UNIX server"? 0.0001% maybe ? Is it really a use case worth optimizing for ? They should be treated as applicances, not as general-purpose computers.
- nightcracker 8y agoI tried Oni, but it fundamentally doesn't understand buffers.
- deleted 8y ago[deleted]
- twerkmonsta 8y agoSomeone please make Electron apps illegal.
- johnchristopher 8y agoI like Oni but last time (a week ago) I tried it I went into the config file to change the colourscheme and the doc wasn't helpful at all. I think it somehow can take a vim config file but it wasn't really clear.
- pault 8y agoThere's a decent wiki article on the configuration file: https://github.com/onivim/oni/wiki/Configuration https://github.com/onivim/oni/wiki/Configuration I use "oni.useDefaultConfig": false and "oni.loadInitVim": true and use it basically the same way I use terminal vim, but with language server autocomplete thrown in for free.
- theknarf 8y agoOni is really cool, but still early days. Since it's just a frontend for neovim it actually seems to use less ram than Atom and VSCode. But VSCode has a big head start and a team behind it optimizing stuff the best they can. I'd love to see where Oni find itself in a year or two as I do believe that it could outperform VSCode in the future. Both Oni and NeoVim got a long road ahead of work.
- city41 8y agoOni is Electron based. But since it uses neovim as its backend and a canvas based renderer the performance is actually very good.
- pault 8y agoThere's a webgl renderer behind an experimental flag that is about 10x faster than the canvas renderer :)
- city41 8y agoWow, that's awesome. Honestly vanilla vim is often not that performant due to limitations of how terminals work. I wouldn't be surprised if OpenGL onivim could outperform terminal vim in a lot of scenarios. How does it compare to gvim's performance?
- pault 8y agoI haven't compared it to gvim, but gvim seems like it would have the upper hand there since it is native. There's also the fact that no matter how fast the renderer is, it can never be faster than the neovim instance running under the hood. I do not have any detailed knowledge of the internals though, so I could be wrong.
- jchw 8y agoI hate these posts, because Hacker News is incapable of talking about an Electron based project productively. Yeah, it could be done more efficiently without a full blown browser engine, everyone knows that. But honestly, who doesn't already get that? It hasn't stopped me from using VS Code regularly, which is already more performant than IntelliJ imo, an app that doesn't use Electron. Almost everything that can be said on this front has been said. Does it really need to be the top 3 comments every time?
- gregdunn 8y agoIt stops a lot of people from using VS Code and Atom. I already dislike that I need to use other Electron based apps for other reasons, and I'm certainly not going to add to the amount I have to run if I can help it. I think the hope is if we keep going "Electron isn't a great idea, there are a lot of drawbacks, please stop", people will actually stop.
- deleted 8y ago[deleted]
- pault 8y agoI will repost my comment from the last time this was on the front page. Hopefully it's more constructive than "electron sux lol": 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 many 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, a gamified tutor mode for newbies, and a webgl renderer that is about 10x faster in benchmarks than the canvas renderer.
- mrhappy333 8y agoahhh another editor based on Electron, How I loathe thee. When I run the app, my computer freezes for 5 seconds every time I click my mouse. Does this explain the increase in suicide rates?
- macrael 8y agoI've been writing code for ten years, I've been fairly comfortable in vim at times, customizing it and navigating with the keyboard full time. I find myself using the mouse all the time, and I don't understand this obsession with mouse-less text editing. The mouse lets me perform selections, and with some key-combos in sublime text sets me up for multiple cursor editing very nicely, in ways that would be much much more complex if I were trying to do them in vim. I've always wanted to try out Acme, a mouse-first editor from plan nine, with all of this obsession with cutting the mouse out entirely, it feels like there is space for an editor to really consider what the mouse can be used for.
- justinpombrio 8y ago> I don't understand this obsession with mouse-less text editing For your information: the issue with mouse-laden text editing is that you need two hands on the keyboard to type, so you are repeatedly moving a hand between the keyboard and the mouse. This takes time: in my experience enough time that it's often faster for me to use keyboard navigation _anyways_. Plus the constant wrist motion can be bad for RSI. That said, if you can edit more efficiently with the mouse, and your wrists don't hurt, then go for it.
- Avshalom 8y agoMice are moved with the shoulder and elbow, not the wrist.
- fyolnish 8y agoDon’t they move the wrist that moves the hand/fingers which then move the mouse?
- macrael 8y agoYeah, I've been spending a lot of time on my laptop, actually. I'm quite used to the trackpad being really close to the keyboard. It hasn't been a lot of strain.
- cjbprime 8y ago
- deleted 8y ago[deleted]