ComputerCraft Forums

ComputerCraft => Programs => APIs and Utilities => Topic started by: zip on Jan 08, 2023, 06:29 PM

Title: zed - A simple, vim-like text editor
Post by: zip on Jan 08, 2023, 06:29 PM
(https://camo.tmpim.com/d252c70d16dcc939e32a27aa3ce7510a6ef4caa1/68747470733a2f2f692e696d6775722e636f6d2f615071767630562e706e67)

Hello! I've made a simple text editor called Zed. It's mainly inspired by vim and as such is completely keyboard-operated. It is relatively easy to add syntax highlighting for new languages to it, and should be fairly easy to use if you've ever used vim before.

It uses a simple lisp-like scripting language for commands (instead of something like vimscript, which is honestly a mess). Currently scripting is rather limited (you can't even run external scripts from inside the editor yet) since it doesn't have many functions and is mainly just used as a way to move around the application. I've written a small help page for now and I plan to expand it later, but it should be enough to generally be able to use zed.

Features

Planned

If you have any feedback on this editor or any ideas, I'd be willing to hear them. I haven't really looked at any of the other text editors for computercraft except the pre-installed edit, so this one is probably horrible in comparison.

"Image Gallery"
(https://camo.tmpim.com/cea3a4382fb0d781607eeb4501518ad3880877ba/68747470733a2f2f692e696d6775722e636f6d2f49686b4d4f6a652e706e67)
(https://camo.tmpim.com/a7583b1a9d0968033054c73b783d21c8b1fc34a1/68747470733a2f2f692e696d6775722e636f6d2f75654235596b442e706e67)
(https://camo.tmpim.com/6e0a29b6a5d6f550c5388e41321766f057463901/68747470733a2f2f692e696d6775722e636f6d2f337a674b3255672e706e67)
(https://camo.tmpim.com/c5bcbc9642ea21f3e5bf8334c747d24cfa046249/68747470733a2f2f692e696d6775722e636f6d2f544145554c556a2e706e67)
(https://camo.tmpim.com/0e1d0400d255661fba6f6e2d3450a0c3b3fbd1fb/68747470733a2f2f692e696d6775722e636f6d2f4d6e37353076742e706e67)
(https://camo.tmpim.com/5ce812d967ffc484c106d830f5a8d1b562b84097/68747470733a2f2f692e696d6775722e636f6d2f76444f484a634e2e706e67)

Installation instructions
The easiest way to install is to run
pastebin run UHghFPR8 which will run an installer for zed. Alternatively, you could clone the github repository (https://github.com/TheZipCreator/zed-cc) if you want.
Title: zed - A simple, vim-like text editor
Post by: SquidDev on Jan 14, 2023, 08:57 AM
Oh, this is really cool - really impressive!

I find it mildly amusing that you decided to implement a Lisp for this, given Emacs is notable for its Lisp capabilities, rather than Vim.
Title: zed - A simple, vim-like text editor
Post by: zip on Jan 14, 2023, 06:43 PM
Quote from: SquidDev on Jan 14, 2023, 08:57 AMOh, this is really cool - really impressive!

I find it mildly amusing that you decided to implement a Lisp for this, given Emacs is notable for its Lisp capabilities, rather than Vim.
I chose lisp because its syntax is just extremely easy to write a single-pass parser for, which makes it relatively fast. It honestly feels a little cursed to use a lispy language in a vim-like environment but hey, it works.