govim is a minimal Vim-like text editor written in Go. It runs in the terminal and supports basic editing, saving, and quitting commands.
- Open and edit files from the terminal
- Insert and command modes
- Basic cursor movement
- Line numbering
- Save files with
:w - Save and quit with
:wq - Quit without saving with
:q
git clone https://github.com/yourusername/govim.git
cd govim
go build -o govim main.goThis will generate a binary named govim (or govim.exe on Windows) in the project directory.
If you don’t want to build from source, you can use the prebuilt executable:
- Go to the Releases section of this repository.
- Download the latest
govim.exefile.
Move govim.exe to a directory of your choice, e.g.:
C:\govim\
To run govim from any terminal window:
- Press
Win + S, search for Environment Variables, and open it. - Click on "Environment Variables..."
- Under System variables, find and select
Path, then click Edit. - Click New and add the path where
govim.exeis located (e.g.,C:\govim). - Click OK to save and close all dialogs.
Open Command Prompt or PowerShell, then run:
govim filename.txtIf the file does not exist, it will be created upon saving.
govim filename.txt:w– Save the current file:q– Quit the editor:wq– Save and quit
This project is written in Go using low-level terminal control. It avoids external GUI libraries and works directly in the terminal window.
Contributions are welcome. Please open issues or submit pull requests for new features, bug fixes, or suggestions.
This project is licensed under the MIT License.
Made with ❤️ and ChatGPT