All Projects → hellerve → E

hellerve / E

Licence: unlicense
A dead simple editor

Programming Languages

c
50402 projects - #5 most used programming language
lua
6591 projects

Projects that are alternatives of or similar to E

Dte
A small, configurable console text editor (moved to https://gitlab.com/craigbarnes/dte)
Stars: ✭ 98 (-77.73%)
Mutual labels:  posix, editor
Nvi2
A multibyte fork of the nvi editor for BSD
Stars: ✭ 96 (-78.18%)
Mutual labels:  posix, editor
Editormd
Markdown 编辑器 Editor.md for Typecho
Stars: ✭ 389 (-11.59%)
Mutual labels:  editor
Angular Editor
A simple native WYSIWYG editor component for Angular 6 -10+
Stars: ✭ 428 (-2.73%)
Mutual labels:  editor
Kirc
A tiny IRC client written in POSIX C99.
Stars: ✭ 416 (-5.45%)
Mutual labels:  posix
Plibsys
Highly portable C system library: threads and synchronization primitives, sockets (TCP, UDP, SCTP), IPv4 and IPv6, IPC, hash functions (MD5, SHA-1, SHA-2, SHA-3, GOST), binary trees (RB, AVL) and more. Native code performance.
Stars: ✭ 402 (-8.64%)
Mutual labels:  posix
Minimalist Web Notepad
Minimalist Web Notepad
Stars: ✭ 417 (-5.23%)
Mutual labels:  editor
Ivim
A vim port to iOS.
Stars: ✭ 389 (-11.59%)
Mutual labels:  editor
Coursebook
Open Source Introductory Systems Programming Textbook for the University of Illinois
Stars: ✭ 437 (-0.68%)
Mutual labels:  posix
Pixelcraft
A Pixel Art Editor
Stars: ✭ 413 (-6.14%)
Mutual labels:  editor
Ewig
The eternal text editor — Didactic Ersatz Emacs to show immutable data-structures and the single-atom architecture
Stars: ✭ 422 (-4.09%)
Mutual labels:  editor
Draftail
📝🍸 A configurable rich text editor built with Draft.js
Stars: ✭ 413 (-6.14%)
Mutual labels:  editor
Markdowneditor
Lightweight markdown editor written for windows,only one GREEN exe file
Stars: ✭ 403 (-8.41%)
Mutual labels:  editor
Quick psd2ugui
parse psd file and auto generate ui prefab(解析psd文件,一键生成ugui面板)
Stars: ✭ 419 (-4.77%)
Mutual labels:  editor
Luaposix
Lua bindings for POSIX APIs
Stars: ✭ 393 (-10.68%)
Mutual labels:  posix
Azteceditor Ios
A reusable native iOS visual HTML text editor component.
Stars: ✭ 437 (-0.68%)
Mutual labels:  editor
Interactive Examples
Home of the MDN live code editor interactive examples
Stars: ✭ 389 (-11.59%)
Mutual labels:  editor
Mathdown
Collaborative markdown with math
Stars: ✭ 410 (-6.82%)
Mutual labels:  editor
Mathlive
A web component for easy math input
Stars: ✭ 416 (-5.45%)
Mutual labels:  editor
Veditorkit
Lightweight and Powerful Editor Kit
Stars: ✭ 441 (+0.23%)
Mutual labels:  editor

e

Braindead editor. Feels like Vim, only simpler. Inspired by kilo, of course, and a large swath of the code is similar.

It can be scripted through Lua.

asciicast

Features

  • Scripting through intuitive Lua interface
  • Incremental search (and replace)
  • Multiple modi (similar to Vim)
  • Mnemonic movement (feels like Vim, just different enough for you to be frustrated)
  • Limitless Undo (until memory runs out)
  • Extensible syntax highlighting
  • No global state in the library part (just in main.c)
  • Can be used as a library
  • Ships with syntax highlighting for
    • C/C++ (stable)
    • Python (experimental)
    • JavaScript (experimental)
    • Go (experimental)
    • Haskell (experimental)
    • Carp (experimental)
    • Markdown (unfinished)

Installation

git clone https://github.com/hellerve/e
cd e
make install # install_lua for Lua support

If there are any problems—particularly with Lua—, please refer to the Troubleshooting page on the wiki.

Usage

There are two major modes, init and edit. edit mode works like a normal text editor would. init mode enables the user to navigate and do meta work, such as saving the file, searching, and replacing.

init mode mnemonics

Use wasd or the arrow keys for movement. Editing (backspace, etc.) works normally.

  • n: insert a line below the cursor and start editing (next)
  • p: insert a line above the cursor and start editing (previous)
  • b: jump to the beginning of the line and start editing
  • t: jump to the end of the line and start editing (terminus)
  • h: hide a line (delete it) and add it to the system clipboard (clipboard only on Windows and OS X)
  • c: copy a line to the system clipboard (only on Windows and OS X)
  • v: view (i.e. paste) the contents of the system clipboard (only on Windows and OS X)
  • /: incremental highlighted search
  • r: search and replace first occurrence
  • R: search and replace all occurrences
  • Space: quick save (might be prompted for a file name)

In meta mode (reachable by pressing the colon character :), there are the following commands:

  • s: save and quit (might be prompted for a file name)
  • q: exit (will abort if the file has unsaved content)
  • !: force exit
  • Number n: jump to line n

Writing syntax files

By default, e creates a directory called .estx in the user's home directory (the location is overridable by providing STXDIR to make install). There, e will search for syntax files on startup. Their grammar is very minimal, see the C file below:

displayname: c
extensions: .*\.cpp$
            .*\.hpp$
            .*\.c$
            .*\.h$
comment|no_sep: //.*$
keyword: (restrict|switch|if|while|for|break|continue|return|else|try|catch|else|struct|union|class|typedef|static|enum|case|asm|default|delete|do|explicit|export|extern|inline|namespace|new|public|private|protected|sizeof|template|this|typedef|typeid|typename|using|virtual|friend|goto)
type: (auto|bool|char|const|double|float|inline|int|mutable|register|short|unsigned|volatile|void|int8_t|int16_t|int32_t|int64_t|uint8_t|uint16_t|uint32_t|uint64_t|size_t|ssize_t|time_t)
comment|no_sep: /\*.*\*/
comment|no_sep: /\*.*
                 .*\*/
pragma: \s*#(include|pragma|define|undef) .*$
predefined: (NULL|stdout|stderr)
pragma: \s*#(ifdef|ifndef|if) .*$
pragma: \s*#(endif)
string|no_sep: "([^\\\"]|\\.)*"
string|no_sep: '([^\\\']|\\.)'
number: [+-]?([0-9]+([.][0-9]*)?|[.][0-9]+)[fl]?

displayname is the string displayed at the bottom of e. extensions is a list of regexes to match the filenames. Highlighting keys are comment, keyword, type, pragma, string, number, and predefined. By appending |no_sep, the user signals to e that no separator is needed, i.e. highlighting works even if the matched string is part of a longer word. The values are regexes.

If you provide a second regex (must by divided by a newline), e assumes that everything between the two matches should be colored (useful for e.g. multiline comments).

Scripting through Lua

The editor has scripting capabilities in Lua. Thus far I've only documented them in a blog post, but this post should give you a good overview of how to write Lua scripts for e. There is also an example .erc file in the repository that you can look at for inspiration.

That's it!

Tabs vs. Spaces

I personally always use spaces for indentation, thus e does the same. It will always convert all of the tabs in your file to spaces automatically for you, and I understand if that bit of behavior is undesired by some. It is very much by design, though, and probably won’t change.


Have fun!

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].