All Projects → arximboldi → Ewig

arximboldi / Ewig

Licence: gpl-3.0
The eternal text editor — Didactic Ersatz Emacs to show immutable data-structures and the single-atom architecture

Programming Languages

cpp
1120 projects

Projects that are alternatives of or similar to Ewig

Docker Emacs
Dockerized Emacs (GUI)
Stars: ✭ 224 (-46.92%)
Mutual labels:  emacs, editor
Extcore
An extended core library for F#.
Stars: ✭ 172 (-59.24%)
Mutual labels:  data-structures, immutable
Imtools
Fast and memory-efficient immutable collections and helper data structures
Stars: ✭ 85 (-79.86%)
Mutual labels:  data-structures, immutable
Dte
A small, configurable console text editor (moved to https://gitlab.com/craigbarnes/dte)
Stars: ✭ 98 (-76.78%)
Mutual labels:  emacs, editor
A
A graphical text editor
Stars: ✭ 280 (-33.65%)
Mutual labels:  editor, text
Mg
Micro (GNU) Emacs-like text editor ❤️ public-domain
Stars: ✭ 117 (-72.27%)
Mutual labels:  emacs, editor
Immer
Postmodern immutable and persistent data structures for C++ — value semantics at scale
Stars: ✭ 1,935 (+358.53%)
Mutual labels:  data-structures, immutable
Remacs
Rust ❤️ Emacs
Stars: ✭ 4,503 (+967.06%)
Mutual labels:  emacs, editor
finger-tree
🌵 Finger tree data structure for JavaScript
Stars: ✭ 20 (-95.26%)
Mutual labels:  immutable, data-structures
Collectable
High-performance immutable data structures for modern JavaScript and TypeScript applications. Functional interfaces, deep/composite operations API, mixed mutability API, TypeScript definitions, ES2015 module exports.
Stars: ✭ 233 (-44.79%)
Mutual labels:  data-structures, immutable
Fmacs
Emacs clone in Forth.
Stars: ✭ 84 (-80.09%)
Mutual labels:  emacs, editor
Data Structures
Go datastructures.
Stars: ✭ 336 (-20.38%)
Mutual labels:  data-structures, immutable
Remacs
Emacs style editor written in Racket
Stars: ✭ 52 (-87.68%)
Mutual labels:  emacs, editor
Evil
The extensible vi layer for Emacs.
Stars: ✭ 2,265 (+436.73%)
Mutual labels:  emacs, editor
Acejump
🅰️ single character search, select, and jump
Stars: ✭ 786 (+86.26%)
Mutual labels:  emacs, text
List
🐆 An immutable list with unmatched performance and a comprehensive functional API.
Stars: ✭ 1,604 (+280.09%)
Mutual labels:  data-structures, immutable
Notepanda
📃 A simple cross-platform notepad. Based on Qt and C++.
Stars: ✭ 134 (-68.25%)
Mutual labels:  editor, text
Vim Practice
💘 Vim is awesome! Here is my practice and study log.
Stars: ✭ 452 (+7.11%)
Mutual labels:  emacs, editor
Static Frame
Immutable and grow-only Pandas-like DataFrames with a more explicit and consistent interface.
Stars: ✭ 217 (-48.58%)
Mutual labels:  data-structures, immutable
Text
📑 Collaborative document editing using Markdown
Stars: ✭ 282 (-33.18%)
Mutual labels:  editor, text

Build Status

ewig is a simple text editor (an Ersatz Emacs) written using immutable data-structures in C++.

The code is written in a simple style to showcase a value-based functional architecture. We invite you to study the code. Learn more in the CppCon'17 Talk: Postmodern Immutable Data Structures.

This project is part of a long-term vision helping interactive and concurrent C++ programs become easier to write. Help this project's long term sustainability by becoming a patron or buying a sponsorship package: [email protected]


Try it out

If you are using the Nix package manager (we strongly recommend it) you can just install the software with.

    nix-env -if https://github.com/arximboldi/ewig/archive/master.tar.gz

Development

To build the code you need a C++17 compiler, cmake, and ncurses with unicode support (package libncursesw5-dev in Debian and friends).

You can install those manually, but the easiest way to get a development environment up and running is by using the Nix package manager. At the root of the repository just type:

    nix-shell

This will download all required dependencies and create an isolated environment in which you can use these dependencies, without polluting your system.

Then you can generate a development project using CMake.

    mkdir build && cd build
    cmake ..

To configure an optimized build and compile do:

    cmake .. -DCMAKE_BUILD_TYPE=Release
    make

To install the compiled software globally:

    sudo make install

Keybindings

Excerpt from main.cpp:

const auto key_map_emacs = make_key_map(
{
    {key::seq(key::ctrl('p')), "move-up"},
    {key::seq(key::up),        "move-up"},
    {key::seq(key::down),      "move-down"},
    {key::seq(key::ctrl('n')), "move-down"},
    {key::seq(key::ctrl('b')), "move-left"},
    {key::seq(key::left),      "move-left"},
    {key::seq(key::ctrl('f')), "move-right"},
    {key::seq(key::right),     "move-right"},
    {key::seq(key::page_down), "page-down"},
    {key::seq(key::page_up),   "page-up"},
    {key::seq(key::backspace), "delete-char"},
    {key::seq(key::backspace_),"delete-char"},
    {key::seq(key::delete_),   "delete-char-right"},
    {key::seq(key::home),      "move-beginning-of-line"},
    {key::seq(key::ctrl('a')), "move-beginning-of-line"},
    {key::seq(key::end),       "move-end-of-line"},
    {key::seq(key::ctrl('e')), "move-end-of-line"},
    {key::seq(key::ctrl('i')), "insert-tab"}, // tab
    {key::seq(key::ctrl('j')), "new-line"}, // enter
    {key::seq(key::ctrl('k')), "kill-line"},
    {key::seq(key::ctrl('w')), "cut"},
    {key::seq(key::ctrl('y')), "paste"},
    {key::seq(key::ctrl('@')), "start-selection"}, // ctrl-space
    {key::seq(key::ctrl('_')), "undo"},
    {key::seq(key::ctrl('x'), key::ctrl('C')), "quit"},
    {key::seq(key::ctrl('x'), key::ctrl('S')), "save"},
    {key::seq(key::ctrl('x'), 'h'), "select-whole-buffer"},
    {key::seq(key::ctrl('x'), '['), "move-beginning-buffer"},
    {key::seq(key::ctrl('x'), ']'), "move-end-buffer"},
    {key::seq(key::alt('w')),  "copy"},
});

License

This software is licensed under the GPLv3 license.

Copyright (C) 2016 Juan Pedro Bolivar Puente

This file is part of ewig.

ewig is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

ewig is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with ewig.  If not, see <http://www.gnu.org/licenses/>.

GPL3 Logo

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].