You are browsing as a guest. Sign up (or log in) to start making projects!

3h 27m 37s logged

I’ve added a help screen and a keybind info bar!


For the help screen, I had to majorly refactor how line data is stored. Previously, there was just one big lines slice that was instantiated from the file content, directly written to to process keystrokes, and directly read from to render the view. But now I’ve moved most of that functionality to a separate editorLines variable, and lines is now a pointer that can be hotswapped. So when the user switches to the help screen, I just change the lines pointer from editorLines to helpLines, and voila everything works. As a bonus, this modular system should make it pretty easy to add markdown previews later.

I made the ASCII art “deci” logo in the help page using the Colossal font for FIGlet, which is the same font that nano uses for the ASCII art on its home page. I think it looks pretty good.

I’m also leaning into the slogan “your second-to-last next editor”. It’s a self-deprecating play on Zed’s slogan that I made up for the first devlog. But I’m really proud of it so I put it on the website and in the help screen.


The keybind info bar was pretty simple to make. The only thing worth remarking on is that it automatically limits the displayed keybinds to the width of the terminal screen, just like nano. Speaking of which, did you know that nano has 66 keybinds? I counted. I had to stretch a terminal window across two 1080p monitors and scale the font size down to 58% in order to see all of them. Currently, deci has 3 keybinds. I’ll need to think of more keybinds, because that’s embarrassing. Maybe a toggle between block mode and bar mode for the cursor.

0
13

Comments 0

No comments yet. Be the first!