Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork33
The eternal text editor — Didactic Ersatz Emacs to show immutable data-structures and the single-atom architecture
License
arximboldi/ewig
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
ewig is a simple text editor(anErsatz Emacs) writtenusingimmutable data-structures in C++.
The code is written in a simple style to showcase a value-basedfunctional architecture. We invite you tostudy the code.Learn more in theCppCon'17 Talk:Postmodern Immutable Data Structures.
This project is part of a long-term vision helping interactive andconcurrent C++ programs become easier to write.Help this project'slong term sustainability by becoming a patron or buying asponsorship package:juanpe@sinusoid.al
If you are using theNix package manager (westrongly recommend it) you can just install the software with.
nix-env -if https://github.com/arximboldi/ewig/archive/master.tar.gzTo build the code you need a C++17 compiler,cmake, andncurseswith unicode support (packagelibncursesw5-dev in Debian andfriends).
You can install those manually, but the easiest way to get adevelopment environment up and running is by usingtheNix package manager. At the root of therepository just type:
nix-shellThis will download all required dependencies and create an isolatedenvironment in which you can use these dependencies, without pollutingyour system.
Then you cangenerate a development project usingCMake.
mkdir build && cd build cmake ..To configure an optimized build andcompile do:
cmake .. -DCMAKE_BUILD_TYPE=Release makeToinstall the compiled software globally:
sudo make installExcerpt frommain.cpp:
constauto 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"},});
This software is licensed under theGPLv3 license.
Copyright (C) 2016 Juan Pedro Bolivar PuenteThis file is part of ewig.ewig is free software: you can redistribute it and/or modifyit under the terms of the GNU General Public License as published bythe 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 ofMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See theGNU General Public License for more details.You should have received a copy of the GNU General Public Licensealong with ewig. If not, see <http://www.gnu.org/licenses/>.About
The eternal text editor — Didactic Ersatz Emacs to show immutable data-structures and the single-atom architecture
Topics
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Releases
Sponsor this project
Uh oh!
There was an error while loading.Please reload this page.
Packages0
Uh oh!
There was an error while loading.Please reload this page.
Contributors8
Uh oh!
There was an error while loading.Please reload this page.

