Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

License

NotificationsYou must be signed in to change notification settings

arximboldi/ewig

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Status

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


Try it out

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

Development

To 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-shell

This 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    make

Toinstall the compiled software globally:

    sudo make install

Keybindings

Excerpt 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"},});

License

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

GPL3 Logo

About

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

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors8


[8]ページ先頭

©2009-2025 Movatter.jp