Skip to content

Repository files navigation

Welcome to the grit-text editor!📝

Overview and what building grit taught me:

"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

  1. Go to this GitHub repository's releases and download the latest build for your platform (macOS/Linux)
  2. Find the zip file you downloaded and extract it
  3. 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
  4. 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.

Releases

Packages

Contributors

Languages