tsu
tsu is a modal, terminal-based text editor. It is inspired by helix, another text editor implemented in the Rust programming language. It is vimlike, fully configurable, and will eventually have support for custom plugins.
Contributing
tsu is free and open source. You can find the source code as well as report issues and create feature requests on GitHub.
Installation
Precompiled binaries
Each time a new version of tsu is released, precompiled binaries are created for Linux, macOS, and Windows. Instead of building from source, you may download these precompiled binaries and run tsu straight out of the box. All release artifacts can be found on GitHub.
Linux
curl -L https://github.com/crhowell3/tsu/releases/download/v0.1.0/tsu-x86_64-unknown-linux-gnu.tar.gz | tar xz
chmod +x tsu
sudo mv tsu /usr/local/bin/
macOS
curl -L https://github.com/crhowell3/tsu/releases/download/v0.1.0/tsu-x86_64-apple-darwin.tar.gz | tar xz
chmod +x tsu
sudo mv tsu /usr/local/bin/
Windows
Download tsu-x86_64-pc-windows-msvc.zip
and extract to a directory in your PATH.
Build from source
Clone the tsu GitHub repository and build with cargo
.
Requirements:
# Clone the repo
git clone https://github.com/crhowell3/tsu.git
cd tsu
# Run tests
cargo test -q
# Install
cargo install --path .
Using tsu
Modes
tsu is a modal text editor, meaning that there are different modes of operation in which certain tasks or actions may be executed. These are the available modes:
- Normal: The default mode wherein the user can move around the buffer and execute edit commands.
- Command: Enables the user to execute built-in commands such as
quit
orwrite
. - Insert: Allows the user to input text into the current buffer.
Buffers
Buffers are representations of the contents of a file which allow the user to input and manipulate said contents. As of tsu v0.1.0, only one buffer per application session is supported. In the future, tsu will have support for multiple buffers per session.
Motions
A "motion" is a command that is usually comprised of some combination of keypresses that executes a corresponding action, such as moving the cursor or modifying text in the current buffer. The default keybinds for motions are configurable. See Keymap for the default key mapping as well as the list of configurable actions.
Keymap
Coming soon
Commands
Typable commands
A typable command
is a command that can be entered by the user while in Command
mode. To enter
command mode, press :
while in Normal
mode. Below is a list of the commands currently supported:
Command | Description |
---|---|
:quit , :q | Closes the current buffer. |
:quit! , :q! | Forcefully close the current buffer, ignoring any unwritten changes. |
:write , :w | Writes the contents of the current buffer to the disk. |
:write! , :w! | Forcefully write the contents of the current buffer to the disk. |
Get In Touch
If you have any questions about tsu, feel free to contact a maintainer. If you have any feature requests and/or bugs to report, please open a ticket on tsu's GitHub.