{"id":24394996,"url":"https://github.com/dcdeepesh/hexedit","last_synced_at":"2025-04-11T14:23:23.279Z","repository":{"id":44367768,"uuid":"287705199","full_name":"dcdeepesh/hexedit","owner":"dcdeepesh","description":"A TUI hex editor","archived":false,"fork":false,"pushed_at":"2020-09-02T06:52:17.000Z","size":197,"stargazers_count":8,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-25T10:37:40.921Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"C++","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/dcdeepesh.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}},"created_at":"2020-08-15T08:08:47.000Z","updated_at":"2025-02-27T00:44:16.000Z","dependencies_parsed_at":"2022-08-30T05:40:44.289Z","dependency_job_id":null,"html_url":"https://github.com/dcdeepesh/hexedit","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dcdeepesh%2Fhexedit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dcdeepesh%2Fhexedit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dcdeepesh%2Fhexedit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dcdeepesh%2Fhexedit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dcdeepesh","download_url":"https://codeload.github.com/dcdeepesh/hexedit/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248418343,"owners_count":21100191,"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":[],"created_at":"2025-01-19T20:01:38.838Z","updated_at":"2025-04-11T14:23:23.245Z","avatar_url":"https://github.com/dcdeepesh.png","language":"C++","funding_links":[],"categories":["Hex Editors"],"sub_categories":[],"readme":"# Hexedit\nHexedit is a TUI-based hex editor.\n\n![Hexedit editing itself](https://github.com/dcdeepesh/hexedit/blob/master/Documentation/images/Home.png)\n\n# Table of Contents\n- [Building Hexedit](#building-hexedit)\n- [Usage](#usage)\n  - [Main screen](#main-screen)\n  - [Navigation](#navigation)\n  - [Input sequences](#input-sequences)\n    - Save sequence\n    - Exit (quit) sequence\n  - [Modes](#modes)\n    - Normal mode\n    - Edit mode\n  - [Examples](#examples)\n- [Contributing](#contributing)\n- [TODO](#todo)\n- [Additional Notes](#additional-notes)\n\n## Building Hexedit\nHexedit has a single dependency - curses, and uses CMake as the build system.\nTo build Hexedit, start from the project root (hexedit) and follow these steps:\n\n**Building Hexedit with CMake**\n\nDownload [n]curses and CMake:\n```sh\nsudo apt-get install libncurses5-dev libncursesw5-dev\nsudo apt-get install cmake\n```\n\nBuild Hexedit:\n```sh\n# currently in hexedit\nmkdir build\ncd build\ncmake ..   # this process will take some time\nmake       # so will this\n```\n\n**Building Hexedit manually**\n\nWhile building Hexedit manually, or with some other build system, take care of these things:\n- The final executable should be linked with curses (`g++ -lcurses ...`).\n- It is recommended to use `-Wall`, `-Wextra` and `-pedantic` compiler options.\n\n## Usage\nTo use Hexedit, provide the file name or the path to the file as a command line argument.\nIf no argument is provided, Hexedit will print a short helpful error msg and quit.\nIf the file is found and is readable, Hexedit opens (in [normal mode](#modes)).\n\n### Main screen\nThe top line tells about the index in the current row.\nThe left column is an index for different columns.\nThe middle column has the file contents in hex (with a default of 16 columns).\nThe right column has file contents in ASCII.\nFinally, there's a status bar at the bottom that gives information about the current mode, sequence, position etc.\n\nThe ASCII contents *do not* include extended ASCII.\nAll control characters, extended ASCII and other unprintable characters are displayed as a dot (`.`).\nThere is no distinction between actual dots (ASCII: 46, hex: 0x2E) and unprintable characters,\nso you have to see the hex code to distinguish between them.\n\nThere is a marker (yellow by default) that indicates your current position in the table.\nThere are two markers, one in the hex data, and one at the corresponding ASCII character.\n\n### Navigation\nTo move the marker, following keys can be used.\nThe keys have a map in the home row, which should be familiar if you have used vim.\nThe marker is not moved, if the movement would cause the marker to go outside the bounds of file contents.\n\n- `k`, `Arrow Up`: Move up one cell\n- `j`, `Arrow Down`: Move down one cell\n- `h`, `Arrow Left`: Move left one cell\n- `l`, `Arrow Right`: Move right one cell\n\n### Input sequences\nTo perform actions like saving a file or exiting the editor, you need to use input sequences.\nInput sequences are series of keystrokes without interruption.\ne.g. If you press `s`, you start the save sequence.\nNow if you press any key, it will be used as an input in the series.\nIf this key is a part of the sequence, the corresponding task is done, otherwise the sequence is terminated.\nWhich means that to exit an input sequence, just press any other key that is not a part of the sequence.\n\nFollowing are the different input sequences in Hexedit:\n- **Save sequence** (`s`) - This sequence deals with saving files. It has following actions:\n  - `s` - Overwrite the currently opened file.\n  - `n` - Create a new file named `mod_\u003cfileName\u003e` (e.g. `main.cpp` becomes `mod_main.cpp`).\n- **Exit (quit) sequence** (`q`) - This sequence deals with quitting the editor.\nIf there are no unsaved changes, the editor exits immediately. If there are unsaved changes:\n  - `q` - Ignore unsaved changes and quit editor.\n\n### Modes\nTo perform interactive tasks such as editing a byte, you need to enter the corresponding mode.\nHexedit is in Normal Mode upon start.\nTo enter a mode, press the corresponding key in Normal mode.\n\nFollowing are the modes in Hexedit:\n- **Normal mode** - Upon start, Hexedit is in Normal mode.\nA key pressed in normal mode either starts an input sequence, enters a mode, or is ignored if not a part of any sequence or mode.\n**Note:** To enter a mode or start an input sequence, you need to be in the Normal mode, otherwise any further keystrokes are\nconsidered part of the mode/sequence you are in. When you are in a sequence, pressing a key that is not a part of that sequence, brings the\neditor to Normal mode.\n- **Edit mode** (`i`) - When `i` is pressed in Normal mode, the editor goes into edit mode for the currently highlighted byte.\nFollowing are the inputs for edit mode:\n  - `Arrow Left`/`Arrow Right` - Move left/right in the current byte (cell).\n  - `Enter` - Save changes, if any, and quit edit mode\n  - `q` - Ignore any changes and quit edit mode\n  \n### Examples\n**Running without any arguments:**\n```sh\n# in hexedit\ncd bin\n./hexedit\n```\nOutput:\n```\nNo file provided.\nUsage: ./hexedit \u003cfileName\u003e\nUse option '-h' or --help' to get complete help.\n```\n(`-h` and `--help` are not supported right now. In fact, using them will most probably give you an error)\n\n**Running with a valid readable file:**\n```sh\n# in hexedit\ncd bin\n./hexedit hexedit\n```\nOutput:\n```\n(output similar to the image above)\n```\n\n## Contributing\nContributions are welcome in the form of pull requests.\nContributors are requested to be specific about the problem their edits solve, \nkeep the commits clean and provide sufficiently detailed commit messages.\n\n## TODO\nNote: This TODO list is in no way exhaustive.\n\n- Command mode\n- Change indicator\n- Optimize file save process\n\n## Additional Notes\n- In some terminal emulators, the some colors may not be accurate (esp. black; as in the picture at the beginning of this file)\n- If Hexedit is used in a windowed terminal emulator, the effect of resizing the window while Hexedit is running is undefined.\nIt is recommended not to resize the window while Hexedit is running.\nThe default config of 16 columns fits without any problem in a standard 80x25 terminal.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdcdeepesh%2Fhexedit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdcdeepesh%2Fhexedit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdcdeepesh%2Fhexedit/lists"}