{"id":13567164,"url":"https://github.com/google/ci_edit","last_synced_at":"2025-04-04T01:31:08.746Z","repository":{"id":65981097,"uuid":"92321329","full_name":"google/ci_edit","owner":"google","description":"A terminal text editor with mouse support and ctrl+Q to quit.","archived":false,"fork":false,"pushed_at":"2023-04-11T23:30:50.000Z","size":2843,"stargazers_count":228,"open_issues_count":54,"forks_count":55,"subscribers_count":16,"default_branch":"master","last_synced_at":"2025-03-22T00:41:18.516Z","etag":null,"topics":["ci-edit","coding","console","mouse","mouse-support","python","text-editor"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/google.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":"CONTRIBUTING","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":"AUTHORS"}},"created_at":"2017-05-24T18:00:36.000Z","updated_at":"2025-03-17T22:35:56.000Z","dependencies_parsed_at":"2024-01-17T00:24:54.383Z","dependency_job_id":"71e1bea0-32c3-4e0d-b2c3-a39a5e71b84f","html_url":"https://github.com/google/ci_edit","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/google%2Fci_edit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/google%2Fci_edit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/google%2Fci_edit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/google%2Fci_edit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/google","download_url":"https://codeload.github.com/google/ci_edit/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247107816,"owners_count":20884793,"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":["ci-edit","coding","console","mouse","mouse-support","python","text-editor"],"created_at":"2024-08-01T13:02:25.122Z","updated_at":"2025-04-04T01:31:05.827Z","avatar_url":"https://github.com/google.png","language":"Python","funding_links":[],"categories":["Python","Python (144)"],"sub_categories":[],"readme":"# What is ci_edit\n\nci_edit is a text editor. It can help you view or edit text files.\n\nci_edit runs in the command line (also called the terminal). To start using\nci_edit, download ci_edit and open (execute) `ci.py`.\n\n\n## What ci_edit can do for you\n\nMany other command line text editors require learning a different set of mouse\nand keyboard commands. Many of us use a graphical editor (GUI) that supports\na common set of commands like `ctrl+q` to quit (that is, hold the control key and\npress Q). Here are a few common commands:\n\n  - ctrl+q    to quit the program\n  - ctrl+s    to save the file\n  - ctrl+z    undo\n  - ctrl+x    cut\n  - ctrl+c    copy\n  - ctrl+v    paste\n\nThere are more, but you probably get the idea. These common controls are not\ncommon in command line editors.\n\nSo, what if you'd like to edit a file in the terminal window but don't want to\nrecall how to save or quit in an unfamiliar editor? This is where ci_edit\nshines, because ci_edit does support those familiar key sequences. You already\nknow how to save in ci_edit, it's `ctrl+s`. Simple.\n\nThis version of ci_edit still doesn't have all the intended features, but it's\na start. It's has the necessary features of a basic text editor and a few fancy\nextras. Those fancy extras stay out of your way until you want them.\n\n## How to stay in touch\n\nTo get news about new features, please join\n- [ci_edit-announce](https://groups.google.com/forum/#!forum/ci_edit-announce)\n\nIf you have a question (i.e. \"how do I...\"), please post it here\n- [ci_edit-users](https://groups.google.com/forum/#!forum/ci_edit-users)\n\nHave you found a case where ci_edit misbehaves, please let us know by describing\nwhat happened here\n- [Report bug in ci_edit](https://github.com/google/ci_edit/issues/new)\n\nFor those interested in contributing new features or steering the future\ndirection of ci_edit, join us on\n- [ci_edit-dev](https://groups.google.com/forum/#!forum/ci_edit-dev)\n\n\n### Installation (Linux / Mac OS)\n\n* Execute the install script with root privileges.  Either change directory\n  `cd` to the downloaded directory (or local repository): `ci_edit`, or use\n  the path to the installation file (i.e. `./[PATH_TO_FILE]/install.sh`).\n\n```\n$ sudo ./install.sh\n```\n\n* **Note:** This script creates a copy of the repository in the directory\n  `/opt/ci_edit/`; the **update**, overwrites that copy.  Then a symbolic\n  link is created in the directory `/usr/local/bin/`, which is generally\n  designated for user programs not managed by the distribution package manager\n\n### Usage\n\n* This command opens the text editor from any directory.  The execution command\n  for the editor can be specified by user choice during installation or\n  manually.\n\n```\n$ we\n```\n\n* To edit a file (such as `README.md`) by name:\n\n```\n$ we README.md\n```\n\n## What you can do for ci_edit\n\n\nThe help we now need is finding out what puts users off; what causes someone who\ntries the editor to stop using it. We intend to address those issues so that\nmore users are happy users for a longer time.\n\n\n# Features of ci_edit\n\n## Stand out features\n- nested grammars\n  - A source file being edited may start in one grammar such as HTML and\n    contain nested JavaScript or CSS. ci_edit will highlight each grammar for\n    each separate language.\n- terminal mouse support and GUI shortcuts by default (enabled out-of-the-box).\n- open the file you meant\n  - If a given path doesn't exist, ci_edit will try to estimate \"what you\n    meant\". This allows for opening a file path by copy/pasting output from\n    other tools without needing to touch up the path.\n    - This is disabled by passing a line number parameter, such as +1 (which\n      opens the file to the first line).\n  - A path such as `a/foo/bar.cc` can open `foo/bar.cc`.\n    - Why: `git diff` may add `a/` or `b/` prefixes to files in diff output.\n  - A path such as `foo/bar.cc:421` can open `foo/bar.cc` to line number 421\n    - Why: some compiler or log output us a \u003cfile\u003e:\u003cline number\u003e notation to\n      refer to specific lines.\n\n## Uncommon features\nSome other editors provide these features, but not all of them.\n- file path tab-completion\n  - i.e. when opening files\n- written in Python\n  - No Python experience is required. Being written in Python means that many\n    users will be able to review the code.\n  - Python 3.7+ and Python 2.7+ are supported.\n  - Python 2 support may be phased out in favor of focusing on Python 3\n    features. If you'd prefer that Python 2 support continue, please comment on\n    https://github.com/google/ci_edit/issues/205\n- saved undo/redo\n  - Open a file and undo prior edits of that document\n- runs on nCurses\n  - This means that it can use used in the terminal window just like vim,\n    emacs, and pine.\n- sensible save and quit\n  - Using GUI editor keyboard short-cuts: `ctrl+s` and `ctrl+q` respectively.\n\n## Common features\nWe should expect these features from a text editor.\n- cut/copy/paste\n  - Using common GUI editor keyboard short-cuts: `ctrl+x`, `ctrl+c`, and\n    `ctrl+v`!\n- syntax highlighting\n  - keywords an such are displayed in different colors.\n- find within text\n  - Regular expression search forward and backward.\n- line numbers\n  - Shown on the left side.\n- go to line with `ctrl+g`\n  - Jump to a line number or the top, bottom, or middle of the document\n- unlimited undo/redo\n  - Or at least within the limits of disk space to page to\n- selection modes\n  - select by line, word, character, select all, or rectangle (block) selection\n- brace matching\n  - Place the cursor on a brace, bracket, or parenthesis and the pair of\n    characters are highlighted.\n- mouse support\n  - Yes, in the terminal\n  - click to place the cursor\n  - double click to select by word\n  - triple click to select by line\n  - shift+click to extend selection\n  - alt+click for rectangular (block) selection\n- pipe to editor\n  - Send the output from another program directly into the editor without the\n    need for a temporary file\n- strips/trims trailing white-space on each line\n  - Each time the file is saved\n- resume at last edit position\n  - The cursor location is stored within `~/.ci_edit/`\n- search and replace\n  - Control the scope of the replacement with the current selection\n- execute sub-processes\n  - Either with or without a sub-shell; including piping between to, from, and\n    between sub-processes\n- filter text through other tools\n  - Send selected text through a sub-process and capture the output into the\n    current document.\n- spell check\n  - ultra-fast spell checking. English and coding word dictionaries included.\n- built-in filters\n  - Sort selected lines\n  - regex text substitution, such as s/dogs/cats/ replaces the text \"dogs\" with\n    the text \"cats\".\n\n## Future features (the to do list)\n\n- bookmarks\n- find in files\n  - Not just the current file, but search through files in a directory.\n- user customizable keywords\n- user customizable color scheme\n- build/error tracking\n  - Capture the output from make and similar tools and integrate the results.\n- auto reload of modified files\n  - Tell you when a file has changed on disk and offer to re-open it.\n- trace file\n  - Monitor a file and continuously read in the new lines\n- jump to opposing brace\n  - Move the cursor from here to there.\n- a lot more...\n  - There are so many dreams for the future.\n\n\n# Obligatory\n\n\n## Origins\n\nThe world does need another text editor. (Or at least I think so).\n\nThere are other fine curses based editors. I found that I was often trying to\ntweak them to get just what I wanted. Almost as often, some aspect of those\neditors prevented that last little bit of customization. So writing a text\neditor should allow all the customization I like, right?\n\nWriting a text editor is an interesting project. Give it a try sometime.\n\n\n## Note\n\nThis is not an official Google product.\n\n\n\nCopyright 2016 Google Inc.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the [License](LICENSE) for the specific language governing permissions and\nlimitations under the License.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgoogle%2Fci_edit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgoogle%2Fci_edit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgoogle%2Fci_edit/lists"}