https://github.com/dacap/handy
Handy text editor
https://github.com/dacap/handy
experiment text-editor
Last synced: about 1 year ago
JSON representation
Handy text editor
- Host: GitHub
- URL: https://github.com/dacap/handy
- Owner: dacap
- License: mit
- Created: 2016-11-22T01:53:21.000Z (over 9 years ago)
- Default Branch: main
- Last Pushed: 2024-05-24T00:16:01.000Z (about 2 years ago)
- Last Synced: 2025-04-04T19:55:30.149Z (about 1 year ago)
- Topics: experiment, text-editor
- Language: C++
- Homepage:
- Size: 169 KB
- Stars: 9
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# handy text editor
*Copyright (C) 2016-2024 David Capello*
[](https://github.com/dacap/handy/actions/workflows/build.yml)
[](LICENSE.txt)
An experimental text editor. This code is unstable, untested, used
only for experimentation by David Capello.
## Concepts
* [Doc](app/doc.h): a open document, associated to a file in disk when the document is loaded from a file/saved to a file.
* [View](app/view.h): a view to visualize a document ([DocView](app/doc_view.h)), a browsing a file ([DirView](app/dir_view.h)), etc.
* [Mode](app/view.h): a view can be in one of the following modes:
* `Mode::Nav`: Navigating document/view.
* `Mode::Ins`: Inserting/editing text in the document.
* `Mode::Cmd`: Calling a command by hand (entering command name).
* `Mode::Sel`: Selecting text.
* `Mode::Sea`: Searching text.
## UX
Some random notes about the "handy" UX:
* Start on editing mode (DocView+Ins mode) when the program is launched with a file name as argument.
* Start on with a file browsing interface (DirView) showing the current directory when the program is started without arguments.
From this view it should be easy to create new files in the directory or navigate to other directories, open files, etc.
* Editing mode by default with access to special modes with Ctrl+common shortcut (like `Ctrl+F` to find text in the document).
* [Git views](app/git_view.h): status, log, commit, and diff views.
* Zip views: list files inside, view files, extract files (re-compress?).
* General shortcuts guidelines:
* Similar layout to [handy-mode](https://github.com/superhandy/intro) + modes
* `Ctrl+Q`: closes the program (ask for saving changes)
* `Nav`: `J`/`I`/`L`/`K`=previous char/line and next char/line, `Enter`/`Space`/`Backspace`=enter to `Ins` mode
* `Ins`: `Esc`=go back to `Nav` mode
* `Sel`: `Enter`=finish selection
* `Sea`: `Ctrl+F`=go to next result, `Enter`=exit `Sea` mode
## Platforms
This program is being developed on macOS. There are no short-term
plans to port it to other platforms yet.
## Credits
handy depends on the following open source projects:
* [clip](https://github.com/dacap/clip) - Cross-platform C++ library to copy/paste clipboard content
* [fmt](https://github.com/fmtlib/fmt) - A modern formatting library
* [laf](https://github.com/aseprite/laf) - A C++ library to create desktop applications
* [lua](http://www.lua.org) - A Scripting Language
* [undo](https://github.com/dacap/undo) - C++ library to implement non-linear undo/redo functionality