A very minimal & simple text editor written in C with only Standard C Library.

Overview

Texterm Text Editor

A very minimal & simple text editor written in C with only Standard Library.

Screenshot


Syntax highlighting supported for

  • C
  • JavaScript
  • Python
  • SQL

Planned Features

  • Undo & redo
  • Text replace
  • Colored bracket pair
  • Syntax highlightng for other languages

Learn to build your own text editor: https://viewsourcecode.org/snaptoken/kilo/


Build

make texterm

Usage

texterm


For those who want to read the code

Naming conventions used:

  • variable names - snake_case
  • function names - snake_case
  • structs & enums - CamelCase

Project's Structure

include directory - contains header files

  • editor.h - declaration of type Editor
  • highlight.h - declaration of SyntaxInfo type & prototypes for functions in highlight.c
  • languages.h - contains languages' extensions, keywords & stuff
  • strbuf.h - declaration of StringBuffer type & prototypes for functions in strbuf.c
  • rows.h - declaration of EditorRow type & prototypes for functions in rows.c
  • winsize.h - function prototype for get_win_size in winsize.c

src directory - contains source files (.c)

  • main.c - main function, opening file, saving file, rendering ui, etc.
  • highlight.c - syntax higlighting stuff (where EditorRow's hl field is processed)
  • strbuf.c - functions for appending & freeing StringBuffer
  • rows.c - row functions (insert/delete char, insert string, etc.)
  • winsize.c - for getting window's size
You might also like...
QsciScintilla based text editor
QsciScintilla based text editor

Sqriptor QScintilla based text editor "Every man should plant a tree, have a son and write a TextEditor"                          --- Proverb "The bes

OpenVi is an enhanced and portable implementation of the Berkeley vi / ex text editor, originally developed by Bill Joy.

OpenVi is an enhanced and portable implementation of the Berkeley vi / ex text editor, originally developed by Bill Joy.

Small and dirty header-only library that supports user input with some more advanced features than in the standard lib.

dirty-term Small and dirty header-only library that supports user input with some more advanced features than in the standard lib. This small, lightwe

Rat is a very simplified cat clone that includes only stdio library

rat - simplified cat clone. Rat is a very simplified cat clone that includes only stdio library. It's currently much slower than cat because it doesnt

Dexe is a simple hex editor, written in Uxntal.

Dexe Dexe is a simple hex editor, written in Uxntal. Build You must have the Uxn assembler and emulator. uxnasm noodle.tal noodle.rom && uxnemu noodle

A Minimal, Header only Modern c++ library for terminal goodies 💄✨
A Minimal, Header only Modern c++ library for terminal goodies 💄✨

rang Colors for your Terminal. Windows Demo Example usage #include "rang.hpp" using namespace std; using namespace rang; int main() { cout "P

A minimal header-only audio synthesis and processing library

Aurora A minimal header-only C++ audio synthesis and processing toolkit. Getting Started Aurora is a collection of header files which can be included

this is very basic version for our dataset validation, only change the path, and align the frame of vio and Groundtruth
this is very basic version for our dataset validation, only change the path, and align the frame of vio and Groundtruth

VINS-Fusion for UrbanNavDataset Evaluation 1. Prerequisites please refer to VINS-Fusion Github 2. Build mkdir catkin/src cd catkin/src mkdir result cd

minimal but extensible header only implementation of photon mapping in C++
minimal but extensible header only implementation of photon mapping in C++

photon_mapping minimal but extensible header only implementation of photon mapping in C++. Features Direct illumination with explicit light sampling I

Comments
  • make for android

    make for android

    this looks like the perfect editor to put on my android phone which has none. Nano needs some system libs. Could you add support for Android compilation?

    This is how I compile other C projects for Android

    set -ex
    SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
    export TOOLCHAIN=${ANDROID_NDK_HOME}/toolchains/llvm/prebuilt/linux-x86_64
    export TARGET=aarch64-linux-android
    #minSdkVersion.
    export API=28
    export AR=$TOOLCHAIN/bin/llvm-ar
    export CC=$TOOLCHAIN/bin/$TARGET$API-clang
    export AS=$CC
    export CXX=$TOOLCHAIN/bin/$TARGET$API-clang++
    export LD=$TOOLCHAIN/bin/ld
    export RANLIB=$TOOLCHAIN/bin/llvm-ranlib
    export STRIP=$TOOLCHAIN/bin/llvm-strip
    (cd kex && autoreconf && LDFLAGS=-static ./configure --host $TARGET && make)
    # needed because of https://github.com/termux/termux-packages/issues/8273
    ../align_fix.py ${SCRIPT_DIR}/kex/build/sbin/kexec
    
    opened by lattice0 2
Owner
Biraj
A liar, curious, honest, selfish & smart - I think I am all of them.
Biraj
Jittey - A public domain text editor written in C and Win32

Jittey (Jacob's Terrific Text Editor) is a single-file basic text editor written in pure C and Win32, there is no real reason to use it, but it

Jakub Šebek 25 Aug 8, 2022
Text - A spicy text library for C++ that has the explicit goal of enabling the entire ecosystem to share in proper forward progress towards a bright Unicode future.

ztd.text Because if text works well in two of the most popular systems programming languages, the entire world over can start to benefit properly. Thi

Shepherd's Oasis 207 Sep 23, 2022
Typewriter Effect with Rich Text + *Correct* Text Wrapping

Typewriter Effect with Rich Text + Correct Text Wrapping I've spent way too long getting this right. This is meant as a base class for a UMG dialogue

Sam Bloomberg 28 Sep 19, 2022
MINCE is an Emacs-like text editor from Mark of the Unicorn, Inc.

MINCE Is Not Complete[ly] EMACS Overview MINCE is an Emacs-like text editor from Mark of the Unicorn, Inc. Versions were available for many oper

Jeffrey H. Johnson 20 Jul 18, 2022
C.impl is a small portable C interpreter integrated with a line text editor

C.impl C.impl is a small portable C interpreter integrated with a line text editor, originally developed for the ELLO 1A computer: http://ello.cc The

KnivD 20 Sep 25, 2022
Let's make a text editor like in the 70's

baracle Let's make a text editor like in the 70's Installation Arch Linux and derivatives (AUR) Stable package: baracle Use an AUR helper or git clone

Mirko Rovere 3 Feb 27, 2022
This repository is for my coding practice, making a text editor from scratch in C.

text-editor-practice This repository will contain my coding practice, making a text editor from scratch. I based this practice from this wonderful res

null 2 Dec 13, 2021
te is a small text editor with emacs keybindings.

te - a tiny emacs te is a small text editor with emacs keybindings. Here are söme Ümlautß! Oh no. Come, you spirits That tend on mortal thoughts, unse

Leah Neukirchen 21 Jun 8, 2022
yedit - A text editor made with ncurses and C++

yedit A text editor made with ncurses and C++ dependencies ∙ ncurses in Debian you can install dependencies with this command: # apt install libncurse

MESYETI 13 Sep 17, 2022
Programmer's text editor

README file for JED. For installation instructions on Unix: read INSTALL.unx VMS: read INSTALL.vms Windows:

John E. Davis 9 Aug 31, 2022