https://github.com/metamars2/twp
TWP Editor is a lightweight, Vim-like text editor for the Windows terminal.
https://github.com/metamars2/twp
text-editor vim
Last synced: 2 months ago
JSON representation
TWP Editor is a lightweight, Vim-like text editor for the Windows terminal.
- Host: GitHub
- URL: https://github.com/metamars2/twp
- Owner: MetaMars2
- License: apache-2.0
- Created: 2025-02-26T21:22:18.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-03-20T17:26:50.000Z (over 1 year ago)
- Last Synced: 2025-07-06T12:08:21.141Z (12 months ago)
- Topics: text-editor, vim
- Language: C
- Homepage:
- Size: 64.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# TWP Editor
TWP Editor is a lightweight, Vim-like text editor for the Windows terminal. It offers a simple yet effective interface for text editing with keyboard shortcuts inspired by Vim.
## Features
* **Vim-inspired modal editing** (Normal and Insert modes)
* **File operations** (create, open, save)
* **Startup menu** with ASCII art banner
* **Full file path support**
* **Status bar** showing editor state and filename
* **Smooth rendering** using double-buffering system
* **Scrolling navigation** for large files
* **Page navigation** for quick movement through documents
## Installation
### Requirements
* Windows operating system
* GCC compiler
* Make (optional, for using the Makefile)
### Build Instructions
1. Clone or download the repository:
```bash
git clone [repository_url]
```
2. Navigate to the project directory:
```bash
cd twp-editor
```
3. Compile using the included Makefile:
```bash
make
```
Or manually compile with GCC:
```bash
gcc src/*.c -o twp.exe
```
## Usage
### Starting the Editor
* Launch without arguments to show the startup menu:
```bash
twp.exe
```
* Open a file directly:
```bash
twp.exe path/to/your/file.txt
```
### Keyboard Controls
#### Normal Mode
* `h` - Move cursor left
* `j` - Move cursor down
* `k` - Move cursor up
* `l` - Move cursor right
* `u` - Page up (scroll up one screen)
* `d` - Page down (scroll down one screen)
* `g` - Jump to the beginning of the file
* `G` - Jump to the end of the file
* `i` - Enter Insert mode
* `:` - Enter command mode
#### Insert Mode
* Arrow keys - Navigate
* Type to insert text
* Backspace - Delete character
* Enter - Insert new line
* Esc - Return to Normal mode
### Commands
* `:w` - Save file
* `:q` - Quit
* `:o` - Open a file
* `:new` - Create new file
## License
This project is released under the MIT License.