{"id":13439742,"url":"https://github.com/hellerve/e","last_synced_at":"2025-03-20T08:32:03.947Z","repository":{"id":79626243,"uuid":"87455659","full_name":"hellerve/e","owner":"hellerve","description":"A dead simple editor","archived":true,"fork":false,"pushed_at":"2019-08-14T18:31:29.000Z","size":631,"stargazers_count":451,"open_issues_count":6,"forks_count":23,"subscribers_count":9,"default_branch":"master","last_synced_at":"2024-08-01T03:29:53.216Z","etag":null,"topics":["c","editor","lua","posix"],"latest_commit_sha":null,"homepage":null,"language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hellerve.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2017-04-06T17:17:02.000Z","updated_at":"2024-06-19T23:48:22.000Z","dependencies_parsed_at":"2023-05-13T21:31:11.281Z","dependency_job_id":null,"html_url":"https://github.com/hellerve/e","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hellerve%2Fe","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hellerve%2Fe/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hellerve%2Fe/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hellerve%2Fe/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hellerve","download_url":"https://codeload.github.com/hellerve/e/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":221739741,"owners_count":16872781,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["c","editor","lua","posix"],"created_at":"2024-07-31T03:01:16.725Z","updated_at":"2024-10-27T22:31:46.327Z","avatar_url":"https://github.com/hellerve.png","language":"C","readme":"# e\n\nBraindead editor. Feels like Vim, only simpler. Inspired by\n[kilo](https://github.com/antirez/kilo), of course, and a large\nswath of the code is similar.\n\nIt can be scripted through Lua.\n\n[![asciicast](https://asciinema.org/a/e164s5tnu3okht44go6uhyju4.png)](https://asciinema.org/a/e164s5tnu3okht44go6uhyju4)\n\n## Features\n\n- Scripting through intuitive Lua interface\n- Incremental search (and replace)\n- Multiple modi (similar to Vim)\n- Mnemonic movement (feels like Vim, just different enough for you to be frustrated)\n- Limitless Undo (until memory runs out)\n- Extensible syntax highlighting\n- No global state in the library part (just in `main.c`)\n- Can be used as a library\n- Ships with syntax highlighting for\n  - C/C++ (stable)\n  - Python (experimental)\n  - JavaScript (experimental)\n  - Go (experimental)\n  - Haskell (experimental)\n  - Carp (experimental)\n  - Markdown (unfinished)\n\n## Installation\n\n```sh\ngit clone https://github.com/hellerve/e\ncd e\nmake install # install_lua for Lua support\n```\n\nIf there are any problems—particularly with Lua—, please refer to the\n[Troubleshooting](https://github.com/hellerve/e/wiki/Troubleshooting) page on\nthe wiki.\n\n## Usage\n\nThere are two major modes, `init` and `edit`. `edit` mode works like a normal\ntext editor would. `init` mode enables the user to navigate and do meta work,\nsuch as saving the file, searching, and replacing.\n\n### init mode mnemonics\n\nUse `wasd` or the arrow keys for movement. Editing (backspace, etc.) works normally.\n\n- `n`: insert a line below the cursor and start editing (*n*ext)\n- `p`: insert a line above the cursor and start editing (*p*revious)\n- `b`: jump to the *b*eginning of the line and start editing\n- `t`: jump to the end of the line and start editing (*t*erminus)\n- `h`: *h*ide a line (delete it) and add it to the system clipboard (clipboard only on Windows and OS X)\n- `c`: *c*opy a line to the system clipboard (only on Windows and OS X)\n- `v`: *v*iew (i.e. paste) the contents of the system clipboard (only on Windows and OS X)\n- `/`: incremental highlighted search\n- `r`: search and replace first occurrence\n- `R`: search and replace all occurrences\n- Space: quick save (might be prompted for a file name)\n\nIn meta mode (reachable by pressing the colon character `:`), there are\nthe following commands:\n\n- `s`: save and quit (might be prompted for a file name)\n- `q`: exit (will abort if the file has unsaved content)\n- `!`: force exit\n- Number `n`: jump to line `n`\n\n### Writing syntax files\n\nBy default, `e` creates a directory called `.estx` in the user's home\ndirectory (the location is overridable by providing `STXDIR` to `make install`).\nThere, `e` will search for syntax files on startup. Their grammar is very\nminimal, see the C file below:\n\n```\ndisplayname: c\nextensions: .*\\.cpp$\n            .*\\.hpp$\n            .*\\.c$\n            .*\\.h$\ncomment|no_sep: //.*$\nkeyword: (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)\ntype: (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)\ncomment|no_sep: /\\*.*\\*/\ncomment|no_sep: /\\*.*\n                 .*\\*/\npragma: \\s*#(include|pragma|define|undef) .*$\npredefined: (NULL|stdout|stderr)\npragma: \\s*#(ifdef|ifndef|if) .*$\npragma: \\s*#(endif)\nstring|no_sep: \"([^\\\\\\\"]|\\\\.)*\"\nstring|no_sep: '([^\\\\\\']|\\\\.)'\nnumber: [+-]?([0-9]+([.][0-9]*)?|[.][0-9]+)[fl]?\n```\n\n`displayname` is the string displayed at the bottom of `e`. `extensions`\nis a list of regexes to match the filenames. Highlighting keys are `comment`,\n`keyword`, `type`, `pragma`, `string`, `number`, and `predefined`. By appending\n`|no_sep`, the user signals to `e` that no separator is needed, i.e. highlighting\nworks even if the matched string is part of a longer word. The values are regexes.\n\nIf you provide a second regex (must by divided by a newline), `e` assumes that everything\nbetween the two matches should be colored (useful for e.g. multiline comments).\n\n### Scripting through Lua\n\nThe editor has scripting capabilities in Lua. Thus far I've only documented them\nin [a blog post](http://blog.veitheller.de/Editing_Revisited.html), but this\npost should give you a good overview of how to write Lua scripts for `e`. There\nis also an example [`.erc`](https://github.com/hellerve/e/blob/master/.erc)\nfile in the repository that you can look at for inspiration.\n\nThat's it!\n\n### Tabs vs. Spaces\n\nI personally always use spaces for indentation, thus `e` does the same. It will\nalways convert all of the tabs in your file to spaces automatically for you, and\nI understand if that bit of behavior is undesired by some. It is very much by\ndesign, though, and probably won’t change.\n\n----\n\nHave fun!\n","funding_links":[],"categories":["C"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhellerve%2Fe","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhellerve%2Fe","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhellerve%2Fe/lists"}