You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"grit" is a CLI (Command Line Interface) text editor built with built-in C libraries, so it requires no dependencies and therefore is very portable. grit also acts as a personal learning project for me, which taught me a lot:
How to use the terminal in raw mode
How to safely manage string allocations so that the editor lines can grow (almost) indefinitely
How to cleanly format your code into multiple separate distinct folders, and how to build a modular and expandable code design
Editor features:
✅ Supports all the text-editor features you'd expect e.g. middle-line deletion, middle-line enter presses, and correctly aligning enter presses if the line below still has content in it
🔨 Makes coding less of a hassle by automatically inserting () and {} and also multi-line comments /**/ as you type them
🧰 Has built-in tools for finding lines with specified content and also for jumping from one line to another
How to set up the editor:
Follow these instructions to start using grit
Go to this GitHub repository's releases and download the latest build for your platform (macOS/Linux)
Find the zip file you downloaded and extract it
Look inside the extracted file, and there should be an executable file. You can leave this executable as is if you wish to, or move it to a directory that suits your workflow the best
Navigate to the directory where the executable file is and run the following code:
bash ./grit [filename], where filename can be with any extension like .c, .java, .md etc., and by default it'll be .txt if a file extension is not provided
And you're then ready to start editing text with grit! Please refer to the documentation.md to learn how to use grit.