top | item 34320844

Show HN: Ecode – A minimalist and fast open-source code editor

233 points| SpartanJ | 3 years ago |github.com | reply

Hi HN! I've been working on a code editor and I think that it's mature enough to catch some interest. It's using a custom GPU accelerated GUI written in C++. Currently implements some interesting features: LSP, terminal, auto-completion, linters, formatters, custom keybindings, plugins and more. It's a hobby project but still intends to be an alternative to other popular code editors like Sublime, Kate, Lapce, Lite XL (and takes inspiration from them).

The project was born as a playground for the GUI I'm developing (eepp GUI) and is advanced enough to currently be my main code editor, but it's a work in progress, and many features are still pending. Some minor hints on how to use it:

Folders are used as project (and .gitignore is used to ignore files)

The wheel icon on the top-right has all the options you need (Ctrl/Cmd + M to show).

Some keybidings to navigate any project (navigation is keyboard driven):

Ctrl/Cmd + K = Locate Files

Ctrl/Cmd + Shift + F = Global Search

Ctrl/Cmd + Number (Go to tab #)

92 comments

order
[+] alganet|3 years ago|reply
The demo is impressive for something running on a browser.

    > Planned Features
    >
    >    ...
    >    Multi-cursor support
    >    ...
I can't live without that though. SublimeText spoiled me, my editing flow is heavily based on multiple cursors.
[+] SpartanJ|3 years ago|reply
Author here: I guess this is gonna be one of the most requested features. It will come sooner than later, but it's not a feature I use very often, that's probably the only reason it's not implemented yet.
[+] vageli|3 years ago|reply
Could you expand on your use case? Are you writing the same thing across multiple lines? I've only gotten tripped up on multiple cursors when I somehow activate them.
[+] christophilus|3 years ago|reply
This looks great. It's nearly impossible for me to leave Neovim at this point, but I do miss a good git-aware minimap, and I miss the VS Code git diff / integration.

I'd love to find an editor that has those features while being as light and snappy as Neovim with the same ability to split, navigate, and do all the things without leaving the keyboard.

[+] anticodon|3 years ago|reply
Though not a minimap, I use gitsigns plugin for neovim that shows changed lines in the gutter. I wouldn't be surprised if there's even minimap plugin somewhere.
[+] SpartanJ|3 years ago|reply
Author here: Git integration plugins will come later, but it's planned. I hope the project gets enough visibility to get some collaborators :)
[+] rd07|3 years ago|reply
I am happy to see one more open source GUI text editor that aims to be fast, minimalist, yet has some essential features (at least for me) like LSP support, minimap, and terminal support. I hope this editor will have a good plugin manager in the future.
[+] timeon|3 years ago|reply
I'm using Sublime and as Druid fan I'm following Lapce but this one looks good too.
[+] LoganDark|3 years ago|reply
> as Druid fan I'm following Lapce

Doesn't Lapce use a custom wgpu renderer, and not Druid? Or did that change at some point?

[+] ilrwbwrkhv|3 years ago|reply
Same. Lapce is the hottest new editor and might be the only one to get me to switch away from sublime.
[+] candyman|3 years ago|reply
This is a little off topic but related because I keep looking at these source code editor posts. I have always been looking for a little "sidekick" editor that is always in the background that you can invoke with a ctrl-<char> and it at least maintains just a single local data store. (It's not a general purpose text editor like Sublime.) Sort of like the old Notational Velocity but able to be invoked very quickly anytime. The file could just be synced across computers using Dropbox or similar but it would be nice if it also allowed simultaneous editing of the file.
[+] geenat|3 years ago|reply
As a primary sublime user for the last decade, this is the only alternative I've tried so far with promise.

Runs smooth as silk, this is an editor for speed demons like me. A lot of essential features already in there.

Would love to see drag-drop of files/folders in the directory panel- bonus points if you can drag between instances of ecode.

Love the very slim UI. Effective use of screen real estate!!

[+] feiss|3 years ago|reply
The editor looks fabulous, great job! although I am actually very excited and impressed with the eepp GUI framework.. it's pretty sick! I wish we had more like this in rust..
[+] stevedekorte|3 years ago|reply
Would love to see one of these that used Miller Columns for navigation, and supported VSCode task and launch files.
[+] nerdponx|3 years ago|reply
What code editor does support Miller columns?
[+] marssaxman|3 years ago|reply
Thanks for sharing. I'm going to give it a try.
[+] breadchris|3 years ago|reply
was ed not light enough? it is the standard editor.
[+] diceduckmonk|3 years ago|reply
> designed for modern hardware with a focus on responsiveness and performance

Not sure why a text editor needs modern hardware to be performant. I’m working on a text editor myself, and aspire to vim on the performance front as it is fast as one would reasonably want. If anything, my physical body is the bottleneck. There are edge cases such as really large files (100+ million lines) or ones having super long lines that makes certain data structures choke, but vim can do random access on 180m line files just fine on my M1.

Point being, performance is a weak selling point to switch text editors, and I question whether it should even be predicated on “modern” hardware ( GPU accelerated rendering ? ). The selling point has to be something else. This is why the editor wars is a dichotomy between Emacs and Vim. Emacs strives for many things, but speed isn’t one of them, and that’s perfectly okay. The main selling point of my editor, built for myself, is native support for Org-like files without the rabbithole of Emacs.

[+] imiric|3 years ago|reply
Performance in text editors used for programming is important. If there's a delay between pressing a key and something happening, it's a worthwhile goal optimizing for that. Consider how many things can happen in modern editors with a single key stroke: changing large blocks of text, executing a macro, rendering syntax highlighting, communicating with an LSP server, rendering code completion, executing plugins, etc. All those things should happen in as few milliseconds as possible for the experience to be considered "responsive".

I use Emacs on a daily basis, and even with the recent native compilation change and relatively few packages, some common actions feel noticeably slower than in Vim or other editors. Is this a dealbreaker? No, I made a conscious decision to get the flexibility of Emacs at the expense of performance, but I would jump at the opportunity to use something with the same featureset that _does_ prioritize performance. It's not about how productive it would make me, but how enjoyable the experience of using it would be.

[+] Semaphor|3 years ago|reply
Most people use neither Emacs, nor Vim [citation needed, but I’d bet some money on it]. And for me, performance is most certainly a selling point.

The main reason I use my windows text editor (EmEditor [0]) despite having no formatting and only barebones syntax highlighting, is that it’s faster than any other editor I’ve ever seen (though I think the large file handler tops out at 256 GB). Well, that and its superior CSV handling, though Notepad++ comes close with plugins ;)

[0]: https://www.emeditor.com/

[+] Aeolun|3 years ago|reply
> Point being, performance is a weak selling point to switch text editors

You’ve never worked with IntelliJ I see. If someone builds the exact same thing but any amount faster I’ll switch in a heartbeat.

I’m using Zed more and more, even though it has barely any of the features I use, purely because it’s so fast.

[+] z3t4|3 years ago|reply
Text rendering is very expensive. That's why you need hardware acceleration.
[+] gigatexal|3 years ago|reply
Yeah -- while not mainstream compared to VSCode -- it'll take something very big and impactful to move me away from neovim + alacritty. It works amazingly well.
[+] stonogo|3 years ago|reply
I have apparently completely lost touch with what people mean by 'minimalist' these days. Can someone help me understand why that word is applied here?

Looking over the feature list and the ReadMe, this editor seems really attractive and checks most of my boxes for a good main editor, but I hit that word and cannot figure out what I'm missing here...

[+] sintezcs|3 years ago|reply
In modern days it's kinda shocking when you see a new UI app that was built without using the HTML+JS+Electron bullshit. Big respect for that!
[+] microflash|3 years ago|reply
Always happy to see new source code editors.

> Lightweight multi-platform C++ code editor designed for modern hardware

Maybe change this description. At first blush, I thought this was a "C++ code editor" rather than an "editor written in C++".

My favourite languages, Java and SQL, are not in the supported languages list but hopefully support can be added with LSP.

[+] SpartanJ|3 years ago|reply
Author here: Thanks for the suggestion! I forgot to change it in the repository description! It's already fixed.

> My favourite languages, Java and SQL, are not in the supported languages list but hopefully support can be added with LSP.

For the moment I only implemented syntax highlighting for the languages. Adding linter and LSP support is trivial. May be you can collaborate by adding it (it's just a configuration, take a look at the plugins section).

[+] hatmatrix|3 years ago|reply
So the extendable functionality is enabled with C++? If it were emacs lisp I would be right there already. :)
[+] SpartanJ|3 years ago|reply
Author here: That's correct. It's partially intentional, since I want to keep some control over the plugins ecosystem. I think it's explained somewhere in the README file: Extendable functionality but in a controlled environment. New features and new plugins are accepted, but the author will supervise any new content that might affect the product quality and performance.
[+] worldsavior|3 years ago|reply
The title is misleading. Yes, a code editor, but for game development. It includes a graphics module, physics and other. For a code editor, it's not minimalist. For a game development code editor, maybe minimalist.
[+] SpartanJ|3 years ago|reply
Author here: No, you're incorrect. It's a general purpose code editor. What you are describing is the underlying technology used to create the editor. eepp (the library) currently is more like a Qt alternative (not at the same level, much work needs to be done yet), it's not used as a game engine (but it can be used), I simply changed my focus over time.
[+] progx|3 years ago|reply
The most important point is expandability. Did it has an API or is it planned to add an API to extend the editor?
[+] SpartanJ|3 years ago|reply
Author here: The editor can be expanded via plugins and several features are presented as plugins (LSP, linter, formatter and auto-complete). But the plugins API it's not as friendly as other editors since I want to keep some control over the plugins. I think we already have many editors very expandable but also with very little to no control over the plugins/extensions environment, and that ends up creating a big mess for the final product (inconsistent UI, bad implementations, etc). Currently the plugins can only be implemented with C++ native code and new plugins will need to be merged into the project. I would like to keep control over the new features and supervise that the implementations are correctly done (mainly I care about plugins not locking the UI thread). I understand this can be bad for some but I want to keep a certain vision that needs some kind of control over the end product.
[+] Deukhoofd|3 years ago|reply
A third of the linked github readme is about how to do plugins.
[+] bmn__|3 years ago|reply
I have carefully set up my desktop environment the way I like it, specifically the way menus are displayed, colours, fonts, icons, keyboard shortcuts, notifications. Ecode does not even make a single attempt to adhere which was not acceptable when Winamp came out and certainly not acceptable in 2023. I have to strain to read the text because it's so small and I have no recourse against that problem. Stop "skinning" software, it is literally easier to do nothing and then the software will automatically do the correct thing and follow the rules.

When I paste in text, it only shows squares, afaict only a few scripts like Latin or Cyrillic work. The input method editor does not work correctly, I can't see what I'm typing.

Unusable, into the rubbish bin it goes.