Ox is a fast text editor, written in Rust, that runs in your terminal
github.com
github.com
I've always wanted to be able to try and verify performance bounds at the CI stage, and I'm hesitantly optimistic it can be done cleanly (although amortized analysis is extremely important, you can actually play "guess the C++ std container from the graph" if you plot the data right)
Development speed of applications in Python compared to raw assembly is nearly infinitely faster, both because it’s easier to write and because the talent pool for ASM is near zero in most cities.
But the same can be said for basically all metrics people use to sell products.
base64 /dev/urandom | head -c 1000000000 > file.txtMy beloved vim doesn't fair so we'll. VScode does very well on this.
I often find it's much faster to pipe out to a command line program to do formatting on huge files.
e.g.
:%! jq
or :%! xmllint --format -i.e. I would have done:
:! jq %
and have probably been guilty of (not knowing `%!` per above): :! cat % | ...It also looks like vim and emacs don't decide what a realistic use case is, or if you're "most" users/developers. They just open text files for editing.
Even for large files, I've never noticed anything beyond microsecond-type delays with those. Definitely does not feel laggy to me, usually.
Though I take the point: if a text editor advertises itself as being "fast", this is the kind of stuff you expect it to handle.
EDIT: ok, so i just tried the hexdump version. Vim and Emacs took a couple of seconds each (Emacs being slightly slower and chunkier when you navigate, Vim handles it without issue and is perfectly repsonsive). less opened it instantly (obviously, it's less!). ox has been going for a few minutes now, nothing happening.
It's not the benchmark's fault, ox is just slow for large files.
XML and JSON without pretty print. Minimized HTML with embedded resources. While not often gigabyte sized those seem to be enough to get most editors to hang and make editing the files a miserable experience.
However, ox clearly performs poorly even when your text files aren't massive single lines, so it doesn't really matter: ox basically can't handle files like this regardless of line distribution.
Older Unixen at least (SVR3-based) had a tool called bfs - big file scanner. Used it some, e.g. when, as a system engineer, I helped IT staff of one of our customers, a university processing exam results of tens of thousands of students from dozens of colleges affiliated to that univ. IIRC, its UI was something like a read-only ed (google "unix bfs command"). You used it to scan really large (for the time) files, e.g. data files (input/output) in large data processing environments, for purposes like checking if the input or output files anecdotally looked okay, no major noticeable garbage in them. Haven't checked if it is present in modern Linuxes. Also don't remember if it could handle large files without newlines. Likely not, if based on ed. Didn't have such files to work on then.
Edit: Oops, posted some misinformation. The mistaken part, reproduced below:
> First, wrapping by default only occurs when writing to a tty. When stdout is redirected to a file, wrapping base64 output usually doesn't make sense, so wrapping doesn't happen.
Correction: coreutils base64 wraps regardless of whether stdout is a tty.
Yes it does. "-b N" or "--break=N" inserts a line break every N characters.
$ base64 /dev/urandom | head -c 1000000000 | wc
0 1 1000000000
I haven't tried anywhere else, so it might be different on Linux or GNU or whatever.(It'd be fine if not all features worked on these files.)
Sure, most files are reasonably sized and shaped, but sometimes you do find yourself needing to e.g. dig into that single-line 1GB json file to try to debug something, and it's inefficient to have to think, before opening any file, "is more normal tool sufficient for this, or should I use something else?"
There's no fundamental reason we can't have one tool that does it all!
[1] https://www.gnu.org/software/emacs/manual/html_node/emacs/Lo...
my ideal editor would never block, and use file-sized based approximations to allow scrolling to arbitrary locations w/o having to actually read the contents of the entire. things like syntax highlighting &c would be either strictly time-limited to not drop frames, or done in the background.
The important thing to realize is that text editor performance is less about the technology used and more about the data structures and i/o.
Most of the time I only realize that everything is on a single line after opening the file.
A good editor doesn't require me to think about these things.
I don't want to chase separate tools that can format different text files, that's what editors are for.
Unfortunately it's not automatable.
Personally i see no reason why this is needed (just use vim), but I'm sure a lot of people will use it just because its written in rust^^
\s
I'd seriously like someone to build a HN scraper that aggregates all the articles prefaced by "How I built a..." and then write an article called "How I built a scraper to aggregate 'How I built a...' articles to assess their HN upvotes." I'd upvote that.
I mean, I very rarely see non-rust projects say "Written in X!" as a selling point for the end user (why would an end user care?), and the campaign to re-write everything in rust is similarly irritating. I've never explored or read up on the rust community, but the sheer insistence that I see jutting into everything from the outside turns me off.
Lots of stuff where X != Rust.
> (why would an end user care?)
They probably don't. But, on GitHub, where programmers go, and on a forum like this, with lots of developers, this means something to many folks here.
Also, beyond that, note my "many"; sure, it doesn't mean anything to you. It feels weird to get upset about something that supposedly has no meaning, though. When I see something that's "written in X" and I don't care about X, I just move on with my day. If I post about how much I don't care about X, it really seems like I do actually care about X, otherwise, I wouldn't take the time to complain about it.
(The OP of this thread said that they did care, negatively. And you didn't explicitly say you don't care either. But this attitude is common and is also elsewhere in this thread so, let me just finally jump off this soapbox real quick...)
That means the solution often ends up being written Go, Rust or C/C++, to the extent that Go and Rust specifically also turn out to be good signalling that the application may meet my other requirements, partly simply because they are relatively new languages. They also seem to signal better thought out and more “serious” solutions, perhaps because of the barrier to entry they present vs interpreted and scripting languages.
So yeah. Rust or other languages certainly aren’t a requirement but they do sometimes present some useful signalling.
I mean it can have a crappy UI, and not do what you want it to, but at least you won't have a memory leak.
I think for most applications, written in rust shouldn't be a selling point, but things such a cURL can definitely benefit from it
I do agree that I'd rather see the technology choice not highlighted so much, though. But it really is a proxy for some things that matter to me: if it is in Rust, I expect it to be a single binary I can easily install and which starts up quickly and performs well (as opposed to, say, javascript, python, ruby, or java programs), but is likely to suffer very few security problems (as opposed to, say, a C or C++ program), and has a decent shot at growing an active community, which I may be able to contribute to. A lot of these things apply to other technologies (like the aforementioned Go) as well, but it I do feel like I get some information by knowing the technology.
Maybe the better approach would be to enumerate benefits rather than saying what the technology is, even if the benefits flow from the technology choice.
Nothing has put me off of Rust more than "Rust people". The same thing happened to me with Python over 20 years ago and I've successfully (and happily) avoided that language for over 20 years because of just how unbelievably, unstoppably "effervescent" Python people were in the late 1990s. If Python were 10% as good as those people said is was, it would be, by a wide margin, mankind's greatest achievement for the next 10 millennia.
I get the exact same vibe from "Rustaceans."
The part about Vim is almost entirely missing the mark, but arguably so does the part about Emacs. The real brilliantness of Emacs is that almost everything is an Emacs buffer. The interface is extremely uniform: text file, configuration menu, completion buffer, compilation log, IRC chat window, it's all the same "widget" with just some customization (keybinds, coloring) on top. You can always copy/paste text the way you're used to, navigate the buffer the way you're used to, everything is uniform and consistent.
Ever felt the frustration of having an application pop-up a modal with an error message and you want to search for it online, only to realize that you can't select the text so you have to copy it by hand? That can't happen in Emacs. Ever been annoyed that your custom bindings and shortcuts didn't work in all the parts of your editor? That the way you interact in the main text editor is different from the input box in the search dialog? In Emacs it's all the same thing.
I switched to Vim a couple of years ago but this uniform interface is still something I miss. Maybe one day I'll bite the bullet and use Spacemacs.
Doom emacs also has default vi-workflow.
I'm no emacs guru, but I know this much: even if we suppose for the sake of argument that customizability is the best thing about emacs, it's an absolute pratfall to write
> Ox took the idea for the customization and extensibility of Emacs and made a configuration system where you can change the colours and appearance of the editor.
Basically I want Vim with an Emacs backend. I don't need a bajillion plugins, but I want the things that I use to be easily tweakable and customizable, something that Vim struggles with and Emacs excels at in my experience.
The readme mentions Emacs and says: "Ox took the idea for the customization and extensibility of Emacs and made a configuration system where you can change the colours and appearance of the editor."
Changing the colours and appearance is a customization option for every text editor.
Now if the readme mentioned that Ox had it's own version of a .emacs file that would run any Rust code you put into it on start up then I would be VERY excited.
For many, many, many vim'ers, I know, the modal system (and hence the musclememory macro/scripting) IS the defining best feature...
Also, see all the "browser with vim binding" and "x with vim bindings" that is the modality, not the plugin system, that is emulated...
I am sure that it made me a better programmer as I know a lot of stuff by heart, where a lot of "auto" programmers are merely constantly picking of a list, which I think breaks their thinking flow...
Which is basically the same as not using the vim muscle memory for me..
Consider a piano player that needs to look up the right keys before every stoke.. The never get a feel for the music..
Programming is not remotely the same as playing the piano. This and the sibling "I don't make mistakes" comment just seem like excuses to me.
And why would one need an excuse for setting their development environment up the way that works best for them?
Which comment are you referring to you? IshKebab (the user you are replying to) was replying to svennek (not you).
> This and the sibling "I don't make mistakes" comment just seem like excuses to me.
At the time of IshKebab’s comment I was the only sibling comment.
> I’ve learned not to make the mistakes
I have learned not to make the specific mistakes that the linter used to tell me off for making, so it doesn't tell me off any more. That's a very different thing from "I don't make mistakes", which is what you incorrectly claimed that I said (even with quote marks around it, implying a direct quote!)
I read OP's position as: If you don't use aurocomplete you'll remember the naming variations better, and won't have to look them up all the time.
I still think aurocomplete might be faster for libraries you haven't used much before, but it doesn't sound at all unbelievable to me that the brain works as stated.
Nowadays, I just leave autocomplete on for minimal flow break no matter what language I'm using at the moment. I don't want language-specific names and structures interrupting the flow of models and ideas from my head.
I don't know how it is for others.
Also, I really try to minimize complexity and not ending up in the javascript npm dependency spaghetti..
Good code is simple and obvious....
Possibly, but I still need to read the librarys documentation carefully, where I plan my code anyways...
I have seen so many "auto coders" write 100+ lines of extra code because they missed reading the manual carefully and doing it correctly/efficiently...
If lines of code is your metric, that is great, if not, not...
I didn't say, that I don't make mistakes. It is rare that I make it a quarter of an hour before fucking up... luckily I am good at fixing it :)
But again, if you like your IDE, use it.
I have (almost) one decade of using IDE vs. two of not using an IDE and I strongly prefer the freethinking of the latter...
In the past decades I have written (and still do) like 50/50 in IDEs and plain to somewhat less plain text editors, and if there's something which is a flow breaker for me, then it's coming up with the exact name and method in such plain editor when I just know there's one which does what I need but cannot remember the exact name. Fuzzy matching it against a list doesn't break any flow for me on the other hand.
Which matches how my memory works: I cannot remember hard facts and data well (function DoSomethingVeryHardCore). However I'm good at remembering abstract things (function which does something hardcore). I am pretty sure learning many things by heart from the many very different codebases I work on would be a complete waste of time. Instead learning some abstract mental model of the codebases architecture, and how to navigate through it in text, is what makes me fast and efficient.
I could feel my "clarity" fall year for year.. I have never looked back.
I stand by my original statement, that for me, IDEs hinder my thought.
Also, I have seen other coders I really consider high-end having the same considerations (it might just be a bias, where I just notice those, who agree with me)..
Have you ever seen the "competitions" where they give a really really good photographer (or videographer) a 50$ toy and lets them compete against an amateur with a really high end setup..
Only amateurs blame their tools (above a certain minimum threshold)..
I tried 'Ctrl-x' but it decrements the integer under the cursor by 1. I tried 'f' but it starts a new motion command to search the next occurrence of the character following it to the right. Example: 'fx' will place the cursor on the next occurrence of 'x' to the right.
How can I use 'Ctrl-x f' to look up a file name?
Here is a description of it and a few other insert mode commands: https://georgebrock.github.io/talks/vim-completion/
I've bound some complete-plug-in to tab, but that's pretty much all I do in insert-mode command-wise.
I -personally- find it way more comfortable than even a minimal vim install because when I typo a command it beeps at me, whereas in vim I generally accidentally activate a command I don't understand and get broken out of flow while I figure out wtf just happened.
I don't at all judge people who're IDE wizards, I've not seen any correspondence between maximalist versus minimalist taste in tooling and competence, but this approach works way better for me.
This doesn't happen to me very often anymore but when it does I’m grateful for multiple undo, I’d be scared to use an editor without it.
> where a lot of "auto" programmers are merely constantly picking of a list, which I think breaks their thinking flow...
For me, typing when the computer can type faster than me breaks the flow. Though your auto complete is very bad if it needs you to pick things from a list - 99% of the time it's just "type a couple of first letters, <ctrl-space>, repeat for the next token."
> Consider a piano player that needs to look up the right keys before every stoke..
Most professional classical musicians play with sheet music, no ?
That is WHAT to play, not how to play... also I actually thought more of improv players, but that wasn't stated :)
I think, my fingers type...
I spend 0% brain cycles on typing (it is pure muscle memory), which why picking from a list (or checking that autocomplete choose the correct) is more brain work...
but, it's definitely not "more brain work", just like stenography does not take "more brain work" to write - when you're used to it you don't need to look at the autocomplete output either, it's just a very shorthand way to get things from your brain to your computer.
For me, checking whether auto-complete choose the correct is more work that typing the correct thing, as my fingers type on their own - almost without supervision...
I have written code for 30ish years (professionally for 25 years) and I have honed (and still hone) my environment for maximally "transparency" so that my though is not hampered by tools..
If that is not true for you, then use your IDE and be happy about it... Nothing wrong with that, at all...
EDIT: also fun, that you highligt stenography that is the definition of learning-curve/musclememory ... :)
but, that's the thing, I don't even remember the last time my autocomplete didn't complete the right thing. So yes, I entirely trust the algorithm, it has already saved me so muchtime.
I have never liked autocomplete. If I know the type or method I’m looking for (which is most of the time) then typing its name is not a hardship, and takes really no more time than finding it in a list.
If I don’t know the type/method, most of the time I have the documentation up in another window or monitor, and I’m going to want to read that in depth anyway, since I’m not familiar with the type/method, so autocomplete wouldn’t save me any meaningful time.
I am experienced in both Java and C++ and while I can read/write/refactor code in C++ just fine with Vim, doing so in Java without a sophisticated IDE is a painful experience.
I don't really like realtime linting, autoformatting, or error highlighting either. I find it highly distracting, and usually it's complaining about something I was already going to fix anyways. I'd rather have such things done only when I intentionally trigger them. I'd say please stop whining about syntax errors and test failures in code that I haven't finished writing yet.
I've tried some Git plugins, but never got into those either. I still prefer the gitsh cli application for most of my Git work.
> Ox is easier to use than Vim because it doesn’t have modes where the keyboard is repurposed, however it takes the idea of being a keyboard-only editor and being able to act just like an IDE after some configuration.
Modes in Vim re-purpose the keyboard. What does Ox do to re-purpose the keyboard? You can't have all functionalities on CTRL+? bindings.
> in Vim re-purpose the keyboard. What does Ox do to re-purpose the keyboard? Y
The *BSDs come with vi for example
Correspondingly, I have a lot of cool plugins in my .vimrc now, and my editor works better.
Bonus: no remote echo typing lag! (Yes, I know about mosh.)
I hate things not being configured explicitly in files that I can version control.
I primarily use Linux, but I don't want something as crucial as my editor to unavailable or differently configured (so I can't just clone dotfiles) on macOS which I might sometimes use. Which, again, last I checked, means no Electron for anything that 'crucial'.
(I think it's fair enough for maintainers of these things to defer to Electron on config locatio, but it's unfortunate that Electron decided what 'platform standard locations' are irrespective of what the tool is, whether $XDG_CONFIG_HOME is explicitly set, and what other tools do or user preference is.)
Again for what it's worth, that's also been added, and I certainly haven't had that issue on macOS myself? It loads it from the project I have open, or my home directory base settings.json
Imagine a car being advertised in a similar style called Imacar.
Ferrari, know for its Italian design and sleek lines, Imacar takes those famous design cues by including wheels and tires.
Toyota, known for it's rugged truck's like the Hilux. Inspired by that ruggedness and repairability the Imacar includes easy change windshield wipers.
Tesla, know for their famous electric motors and batteries, inspired us to add a battery to Imacar's petrofuled engine.
It's entirely unclear what niche this editor is aiming for. If it's a replacement for the editors it claims as inspiration it's not going to succeed.
Yes, after reading how the author described vim and emacs, I knew this project was not for me.
It looks like someone has never read the vim manual.
So vim both only provides basic text editing functionality and is harder to use than Ox?
Vim has a special "insert mode" in which the keyboard is repurposed for entering text. I don't think that's a very hard concept to grasp.
- Vim: they took away "being a keyboard-only editor" (every CLI/TUI text editor?) and "being able to act just like an IDE after some configuration" (most programmer text editors?). Also, "being a keyboard-only editor" isn't even accurate for vim, it totally supports mouse input even in a terminal: https://vim.fandom.com/wiki/Using_the_mouse_for_Vim_in_an_xt...
- Emacs: they took away "a configuration system where you can change the colours and appearance of the editor"... This is adequately discussed elsewhere in the thread.
Therefore, gp's analogy of taking away wheels and tires from Ferrari is apt.
I’m not really sure what to think of everyone being so negative here.
You can build an impressive car without pointlessly referencing Ferrari.
Why not? Your car dealer will happily compare and contrast the different models too.
It is perfectly fine and valid to explain how the "new" thing fits into the crowded landscape of similar offerings. Especially when the reader is likely to be familiar with many of the "landmarks". Using other products as a point(s) of reference is very useful.
I came away from the compare-and-contrast part confused and nonplussed.
It's also perfectly alright to say "I wanted to write a text editor in Rust, so here it is! I like it and use it, you might too".
Either way, it is fair to clearly state where the project stands regarding the modal style interaction vis-à-vis Vim.
Thanks but no thanks. Almost all editors let you customize the color and appearance. Few allow you to customize to such a deep extent as Emacs.
Really?
Chalk up another mark on the board of unserious things the Rust community does with its time.
Edit: I'm sure this will be an unpopular, downvoted comment. I just want to say that I think that Rust is a fantastic language with an enthusiastic community. It's just a community that repeatedly demonstrates that it doesn't know what "good" looks like and has the world's worst case of NIH. Something about the community attracts the like minded.
It's kind of a meme at this point.[0,1,2]
It's going to start effecting interviews. I'm saying this as a hiring manager who has to evaluate what projects candidates spend their time on and what they are going to be like to work with. People who oversell their work or don't know how to evaluate value go into the hard pass pile.
And no, I'm not shitting on them for having a hobby project. I'm shitting on them for clearly demonstrating that they don't understand what the very mainstream software they're actively trying to compete with does.
[0]:https://transitiontech.ca/random/RIIR [1]:http://adventures.michaelfbryan.com/posts/how-not-to-riir/ [2]:https://news.ycombinator.com/item?id=21334510 (which is just the comments here from [1], but also interesting.
It's not a hobby project when you've shipped your Brew into Core and reserved a name.
At that point, we get to make the apples to apples comparisons.
Props to the Arch community for having the good sense to keep this in the AUR.
There are people who take an effort to produce something and then take the extra step to show it to others so they might learn or collaborate. And those people often get comments where their project is being picked apart with a fine-toothed comb, packaged in an abrasive tone.
This happens over and over again in IT. There's plenty of people with insecurities who - for reasons that psychiatrists understand better than me - rejoice in taking others down.
Lots of people would say it's because we are hidden to each other behind the screen and would never say this stuff to a colleague. I guess that's part of the reason why it's so prevalent in HN. Though, I've seen the same style of rhetoric in the industry, face-to-face.
"You should go to back to school before talking about CSS" and plenty of laughing was something directed at me when I suggested that the ´class´ attribute for HTML tags has semantic meaning beyond just hooking up CSS rules to it. I had trouble explaining it, but my colleague with longer industry experience took it as "lol this noob junior programmer doesn't even understand what ´class´ means". He didn't even stop to consider how class attributes can be used through Javascript and beyond, he immediately went for taking me down as fast as possible.
And that f'ing hurt. And after that I have probably been toxic to other people too. I wish I could go back and undo all the times I have hurt someone like that. Totally unnecessarily and without reason. But I can't. That's why the least I can do when someone suggests that "hey, tone it down a bit" is to shut up with the explanations why I am right to say what I'm saying and think whether there's a more constructive way to go forward.
Nevertheless, this project is somebody learning Rust on an intermediate/advanced level. Nothing wrong with that, and people deriding it because it cannot compete with real text editors with millions of man-hours behind them are behaving bit silly. Who knows, one of these exercises might become a great editor some day.
One of the advantages of emacs is that an insane level of customisation is possible. Or, more practically, the high level of customisation allows for a lot of low-hanging fruit for people to create editor macros that suit their usage.
Lol, incidentally macOS native text fields / text views support a bunch of Emacs keybindings out of box (C-f, C-b, C-n, C-p, C-a, C-e, C-k, C-d off the top of my mind), so any native Mac application with any text input can claim “inspired by Emacs” for free.
What will be interesting to see is if this changes now that zsh (which does not use readline) has become the standard...but alas, if you don't have EDITOR or VISUAL set, emacs is the default there too...
As for those curious, emacs is the readline default because readline is part of the GNU project.
Edit: Your comment was expanded as I was replying / after I replied. From which it’s quite clear you didn’t get my point.
They decided to use emacs bindings because emacs bindings are the system default for macOS programmers.
Apple's developers were also macOS's first users and they started with a terminal long before they had a working UI.
For the record I don't underestimate how much effort Apple puts into system-wide consistent behaviors in macOS. <s>Also, zsh's default keybinding mode is Emacs mode.</s> (Of course, you did mention that.)
Readline compatible keystrokes came from nextstep (sorry, I don’t dare to guess how to capitalize that). Traditional Mac OS used completely different key combinations (command left arrow instead of control-a, for example). Because of that, Carbon apps didn’t support readline-like key combinations (but system input fields did)
The two could happily coexist only because the Mac originally didn’t have control keys (it only got them for supporting terminal programs, as part of trying to make Macs sell better in business), so none of its navigation keystrokes used the control key.
still, I don't like to be harsh. there is a difference between treating this as a serious alternative to a Vim or Emacs (or whatever) and a programmer resume piece. I could see it being quite fun to develop my own editor as a toy project.
What makes Emacs great is that the low-level text editor features are implemented in a compiled language and then exposed to an interpreted language to be composed into the actual editor. If they're not splitting the architecture into a compiled part and an interpreted part, they aren't taking anything from Emacs.
If Emacs was written in Lisp (like Zmacs), then it would have the same flexibility it currently has without having to contain an interpreter of any kind, and the user-written customizations would have the benefit of being compiled to optimized native code. Some things that you can't do in Elisp for performance reasons would be perfectly doable in a Common Lisp version of Emacs.
I don't think that's describing nano or pico, at least, no version I've ever used had those keys doing useful stuff. Maybe this is supposed to reference some other editor?
I'm constantly reflexively reaching for ctrl+s and then correcting myself just at the last second.
Pretty impressive what you've put together! I'm sure it's really cool being able an editor to work exactly the way you want it to work.
I guess this happens as you approach a really specialized set of features and aesthetic--it activates some kind of nitpick psychology, where people who are proud of their specialization are able to demonstrate their unique ability to perceive just what makes a thing in this domain really special. Well, they spend a lot of time working with these interfaces and thinking about it, so it makes some sense--the thought-energy needs to be expressed.
Anyway IDK if one can easily demonstrate that kind of deep specialist insight and also pay attention to how it makes them sound in relation to the author and the author's gift to the world. It's easy to get caught up in what your own perception is offering the world, and kind of steal the stage with what is likely to be perceived as a weirdly negative energy.
Well, the headline is perfect for grabbing HN's attention, and the comparison section is perfect for making HN angry, so that's only to be expected.
Instead it should say: "This is a toy project of me. Learning about text editors. It got pretty far and is really usable. Give it a try."
Also there are zillion articles about "rewrite software x in rust because it's written in evil unsafe C". The author doesn't say this but i instantly think about it if someone tries to write a better vim.
It's a really impressive feat to accomplish something like this, and it's sad that it gets framed unfairly. I just hope it doesn't deter the creator. Maybe in the future it could indeed be a serious option for people that want something between nano and vsc.
Treating it as some kind of alternative to Emacs or Vim is probably missing the point.
> Ox is a text editor with IDE-like features.
And then we had the actual feature list, current version seems to be 0.2.5.
> Auto indentation (0.3.0) > Auto brackets (0.3.1) > Auto complete (0.3.2)
Which are quite essential for calling something "IDE like".
Other than that. It looks nice. I've seen people calling it an Nano replacement in the comments here, which seems to be missing the big point of nano - it's easily available in a lot of *nix systems by default.
I've tried micro, psi but they're not in a state I can use them daily.
What i'd love is basically sublime text in a terminal. I tried ox, but it's currently a bit buggy and non intuitive (no help that I could find, no backspace, cursor on the wrong line..)
Nothing wrong with this, it's a work in progress and early in its development. It shows great promise and I'll definitely check back in the future !
Yet, I hate the punchline "A Rust powered editor". Why should anybody care? Other text editors are never presented according to the language they are written in! For one, I'm getting a bit tired of this obsession with Rust, as if being written in a particular language was somehow an interesting feature.
Potential contributors to the project may care.
I think this would be a fantastic text editor for anyone new to the terminal. Provides some syntax highlighting, a nice background, line numbers, tabs, and mostly familiar controls without a ton of setup.
I think there are still quite a few improvements I’d love for it to have, but this might be the thing I recommend to anyone first starting out in the terminal who wants a bit of a nicer editor than nano.
I think the negative remarks come from people who are probably both very knowledgeable and experienced, but also entrenched in "their" editor, and perhaps they didn't feel the blurb gave "their" editor the justice it deserves, while this isn't an editor that purports to be the "best" out there, or even the most advanced.
Personally I've never been a fan of using the terminal for anything else than reviewing code, so Micro is enough for me. It has text highlighting and commonly known Windows-esque shortcuts. To compare this to Emacs, which I've given my best shot, it just turned out way too complicated for my needs, and there's a ton of extra stuff to learn that I just wasn't motivated for on top of learning to code.
Once I saw the high treshold for getting into Emacs, I just opted out. Perhaps it is better in many ways, but I was instead lured in by Sublime Text, and I've stayed there ever since. Is it "better"? IDK. It's what works for me.
I, and I think most heavy vim users will agree, think that Vim's modal editing is one of it's great strengths. Sure, it has a steeper learning curve, but once you learn it, it is amazing.
In other word: It ain't that easy.
Clearly the author does not understand Vim. Seeing this gross misunderstanding, I can confidently assumee that Ox does not even have a quarter of the features and editing capabilities that an editor like Vim or Emacs providee.
They do, actually. What happens if you type `yy` in a non-modal editor? You get "yy" in your text. It only works in Vim because you're in normal mode.
> Vim http://vim.org: Vim provides a plugin system for adding features to it as it is very minimal and only provides basic text editing functionality by default. [...] a “modal” text editor, having special modes for editing text. Ox is easier to use than Vim because it doesn’t have modes [...] however it takes the idea of being a keyboard-only editor and being able to act just like an IDE after some configuration.
Interesting, mentions vim first in list of taking features from popular editors, and explicitly doesn't take the one feature that everyone takes (when they take any)!
I think most editors on mainstream Linux distros and also Windows use Ctrl + Home/End for to go to the top/bottom of a document.
I'm used to the shortcuts, the syntax highlighting works, and you can run shell scripts on selected text which is the best "plugin system" if you ask me.
I've tried to switch to vim and emacs a few times but they are too big an ecosystem and I don't want to change EVERYTHING at once.
The vagueness of this statement is great.
http://kakoune.org/ (very interesting concept about "turning the modal editing of vim around)
and https://github.com/fox0430/moe (written in nim)
Normally they are fine, but add the indexers and code parsers then everyone is bloated. On my emacs + lsp, lsp is the one using a lot of cpu/memory resources.
> Emacs is still actively used today ... I would change much of the Readme.
Writing text editor seems to be the second favorite hackers past time activities after perhaps writing a compiler for APL and Rob did it too :-)
Anyway, congrats to the Ox editor authors for having a go, and personally I like and commended the fact that on the project Github page they provide the comparison to the other popular text editors.
Since Ox is both front-end and back-end implementation based on Rust based libraries, it does shows that Rust based eco-system has been growing steadily.
I have two features suggestions that perhaps can take Ox editor to the next level and be more useful.
Firstly, as mentioned by the sibling comment's buried towards the end of comment section, on the very large file (VLF) feature for opening big file. This can be implemented by the help of RRB-Tree data structure and the Rust library is already available [2].
Secondly, is the CRDT feature that can be implemented with the automerge library. It seems Rust based automerge library is still in its infancy but perhaps by more project adoption, it can further accelerate the development [3].This second feature is very useful for local-first text editing capability enabling both offline and online collaboration feature that can propel Ox to stand out from the crowd.
[1]https://news.ycombinator.com/item?id=20607261
What I can't see here is any mention of VLF mode (get via elpa/melpa) in emacs which allows you to open very large files (per acronym) which are mem mapped.
I just opened a 3.3GB .mpg and it opened immediately. Seems to be editable but it gets verrrry slow (has to page huge amounts and create temp files if you edit) and I've not verified that, but in the rare case I need to browse a multi-GB file, it has worked for me.
Anyone used vlf mode in emacs more extensively, please chime in.
FYI, HTH
I wish to give you enough money for a coffee and a fancy cookie.
* lnav about 4 seconds to index[1] and display
* vim about a second to display
* emacs about 3 seconds to display
This is on a late 2013 27-inch iMac with a 3.5Ghz i7 and the file cached.
[1] - Indexing in lnav involves parsing all log lines to extract their timestamp and log level (status codes in this case)
https://github.com/arximboldi/ewig
Check out the talks from Juan Pedro Bolivar Puente. They are truly next level imo.
For performant buffer-wide operations (:g, :%s), I had success with using vim like an improved sed by passing in commands directly via the command line. That was noticeably faster than opening vim up and running the commands before exiting e.g.
# join together lines delimited by LF into one line, then convert all CRLF into LF
vim -Es \
-c 'g/[^^M]$/.,/^M$/join' \
-c ':%s/^M$//g' \
-c 'wq'"Heavily inspired by Vi/Vim. Amp aims to take the core interaction model of Vim, simplify it, and bundle in the essential features required for a modern text editor. Written in Rust."
It's also a terminal editor btw
class ClassName(object):
def some_method():
def other_method():
class Class2(ClassName):
def more_methods():“How much faster/leaner/more user friendly can I make X when I don’t have to care about safety, performance, or package management?”
This is far above the level of scrutiny of just someone's experiments.
I have a hobby project that is a feature-complete scratch rewrite of Ruby's ActiveRecord, but I'd be kind of an arsehole if I named that something and uploaded it to rubygems.
Most of the pummeling is me just defending this viewpoint after getting pummeled for my negativity.
Nothing should be immune from criticism, and something really can't be a "hobby project" and distributed with mainstream package management tools at the same time. You have to pick one. Names are finite.
If this was a "clone my github" only distribution, I'd have kept my mouth completely shut.
Change the colours and appearance of the editor? Took the extensibility and customization of Emacs? Really?!?
I guess if we were to assume this is also true of text editors, Ox is well on its way to great success!
1: onivim.io
2: youtube.com/watch?v=Pi8qRg_gseQ
Do neovim and VSCode integrate in some way? I've never used neovim so I'm curious how you're using these two together
Only for terminal fetish? Or because it is written in Rust?