Skip to content

SPIGS/MyTE

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

61 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MyTE - My Text Editor

Preview of Myte

MyTE (rhymes with byte) is My Text Editor. It is a small graphical text editor written in C. It was originally created as a learning exercise and was inspired by ded.

Features

MyTE is currently a work in progress and missing some crucial features (clipboard manipulation, multiple buffers/panes/tabs). Despite this, MyTE still has some advanced features that some more basic text editors lack:

  • Syntax highlighting support for various languages (and a straight-forward means of adding more)
  • Rudimentary user theming/color schemes (also pretty straight-forward to create)
  • User configuration/theme hot reloading
  • Smooth animations
  • Mouse controls
  • Text selection

Controls

MyTE currently has two modes - an editor mode and a file browsing mode. The editor mode is default and works mostly how one would expect. File browsing mode presents a simple file browser in the vein of vim or emacs.

  • Editor Mode
    • typing inserts characters into the buffer
    • arrow keys move the cursor around the buffer
    • CTRL + left/right move the cursor back/forward one whole word.
    • CTRL + BACKSPACE/DELETE backspaces/deletes a whole word.
    • CTRL + O opens file browsing mode
    • CTRL + S saves the current file to disk
    • CTRL + SHIFT + S opens a save dialog to save a new file.
    • MOUSE LEFT moves to the cursor to the position you clicked in the buffer
    • MOUSE SCROLL scrolls the buffer
    • SHIFT + arrows/mouse selects text
  • File Browsing Mode
    • up/down moves the selection up and down the directory listing.
    • ENTER opens the selected directory/file
    • ESCAPE closes the file browser and goes back to editor mode.
  • Special global shortcuts
    • F5 completely hot reloads the application (user configs, themes, and the current file)

Configuration

All configuration - including user settings, highlighting rules, and colorschemes - are done via TOML files. These are loaded into the program at startup and can be changed and hot-reloaded while the program is running. The formats for them are pretty self-explanatory and it should be easy to edit them.

Installation

MyTE currently only builds on Linux and has 3 dependencies.

To build MyTE just clone this repo, install the dependencies via your package manager (glew glfw3 freetype2), and run make all. The program should be built in the newly created build folder.

References