Skip to content

Commit

Permalink
Newsletter: add text editor short blog series + vids
Browse files Browse the repository at this point in the history
  • Loading branch information
Skytrias committed Apr 22, 2024
1 parent d7b0b4a commit 8165038
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 2 deletions.
43 changes: 41 additions & 2 deletions content/news/2024-05.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ summary: Highlights for May - Showcasing ***X*** Community Projects
slug: newsletter-2024-05
author: Michael Kutowski
date: '2024-04-02'
draft: true
draft: false
categories:
- newsletter
- odin
Expand All @@ -28,6 +28,45 @@ WIP NEWS

We're going with the same layout as last month, let's see how it goes again.

## Text Editor Experimentation Part 1 - `Skytrias`

Earlier this year I became a bit stuck with personal projects. During that time I got angry at Sublime for crashing very often.

This sparked an interest in making an odin specific editor. It didn't have to do everything, but I wanted to give it a more serious try. Given that the odin `core:odin` library exists to read odin files / packages, it looked like a pretty simple project.

### Craving a Challenge

Well you may have guessed it. I wanted to try something more difficult, so I decided to take one different idea for this project.

Non-Linear text editing is what I called it. Meaning not having to care about separating code into files. It would be done automatically and the editor would be more like an IDE.

<video class="ratio ratio-16x9 mb-1 rounded" controls src="/images/news/2024-05-skytrias1.mp4"></video>

Here is a a short preview of what I got working pretty quickly.
- Left: structs, procedures, etc + identifier
- Middle: buffer name + buffer content
- Right: Preview of the file output

### What happened?

You can see mostly everything is done already? By the time the project was ~1 week old. The thing is, getting raw text editors to work is actually quite simple. As soon as you can edit bytes and navigate around, you're basically done.

One feature I really missed from [4coder](https://4coder.net/) was *virtual whitespace*, which automatically indents each line. Implementing this for odin was pretty simple.

### The Rest

While syntax highlighting was easy, auto-completion with code *intelligence* turned out to be more trouble. At some point I though about just using OLS LSP but by the time I had already lost interest in the project.

<video class="ratio ratio-16x9 mb-1 rounded" controls src="/images/news/2024-05-skytrias2.mp4"></video>

Here is the current state of the project.
- Split with individual buffer being slightly highlighted and can be navigated to/from.
- Toggle details of buffers
- Jump to Definition
- Copy/Paste
- Undo/Redo
- Versioned buffers in a database

## EXMAPLE

### EXAMPLE SUB
### EXAMPLE SUB
Binary file added static/images/news/2024-05-skytrias1.mp4
Binary file not shown.
Binary file added static/images/news/2024-05-skytrias2.mp4
Binary file not shown.

0 comments on commit 8165038

Please sign in to comment.