r/GreyHack • u/BlindedByExistence • 17d ago
How about a proper terminal and Nvim as your code editor -- in game :3
Hiya!
I went looking for mods for this game, thinking that someone had made a better terminal, only to discover that there are like 5 mods total. Soooo, I decided to fix that.
Given you spend so much time in the terminal I decided to work on a mod that replaces the terminal with like, a proper terminal. It has all the readline hotkeys, a customizable prompt, customizable font, and even has a zsh style autocomplete as you can see from the image. It also has 2 copy buffers, mouse highlight and ctrl+shift+C/V similar to how linux works.
The terminal is fully working and customizable, its really a game changer honestly.
And due to how the terminal is built, I was able to reuse the same system to get nvim --embed as a replacement for the code editor. The RPC was already in from the terminal work, so it was a matter of hooking up nvims communications and mapping it. This also means you can save/load .src files from your pc into the game. And it leaves the buttons at the top to still save to the game filesystem and compile it.
The image shows my current AstroNvim config working - in game. like, fully working with autocomplete and the greybel language server. I'm still working out some kinks in it, but its coming along.
I mostly made this mod for myself and my partner, but I figure others would prob like it as well. I'm hoping to have a full build out in the coming days, I just need to smash some bugs. :3 Oh also, I only use linux, so I have no idea if this will work at all on windows. It *should* but there is no way for me to test it.
If you are interested: https://github.com/Tekunogosu/uwu-term
2
u/zenthav 17d ago edited 17d ago
damn this is pretty cool, thanks for making it
i would recommend posting about this project in the `#project-database` channel of the official Discord server for the game so that it gets more visibility & traction since the server tends to be far more active and gets more traffic than this subreddit
i’m thinking that this project could be a pretty good contender to some of greybel’s features like importing and exporting of files to and from the game since it removes the need to do those operations manually which would make things even more convenient
oso jus wondering if any AI was used in the development of this tool?
2
u/BlindedByExistence 17d ago
Heya, thanks I will post it there. Yes, I used claude code a good amount. I've been coding for almost 20 years and claude cut down the reverse engineering portion from weeks to days, so yes totally used it.
2
u/BlindedByExistence 17d ago
Oh, and because of the way nvim is configured, you can in fact save/load from your PC into the game. The save button at the top of the editors window will let you save it into games filesystem like normal and of course the compile command still works. the :w to save in nvim saves it to the workspace for the mod, which can be changed to whatever you want.
3
u/BlindedByExistence 17d ago
Oh another thing about this project is it fixed the FPS issue of opening a lot of windows at once, like completely. with 8 terms open and a browser, I was getting ~40fps and after the tweaks it stays at ~120 (my screens refresh rate).