A teminal text editor written in C similar to vim.
- Auto-indenting C code
- Undo
- Find & replace
- Highlighting brackets
- Visual text selection & copy/cut/paste
- Editting large files
- Comparing files (similar to diff)
- Directory tree listing
- 3 modes:
NORMAL
,INSERT
, andVISUAL
- Press
i
to switch toINSERT
fromNORMAL
, andesc
to switch back. - Press
v
to switch toVISUAL
fromNORMAL
, andesc
to switch back. - Press
d
inVISUAL
mode to cut selected text. - Press
y
inVISUAL
mode to copy selected text. - Press
p
inNORMAL
mode to paste. - Press
u
inNORMAL
mode to undo. - Press
=
inNORMAL
mode to auto-indent C code. - Press
/
inNORMAL
mode and enter phrase to search for. - Press
n
to go to the next search match or any other key to quit search mode. - Press
:
inNORMAL
mode to enter commands.
NOTE: This editor is designed to edit files inside a workspace directory named root
in the current working directory, with a path similar to absolute paths but starting from root
. For example, if you want to open a file with the relative path root/mydir/sample.txt
, you must use the path /root/mydir/sample.txt
as argument to the commands below.
NOTE: Use double quotes with any argument that has spaces in it. (See examples)
:exit
to exit:open <path>
to open a file:save
to save the current file:saveas <path>
to save as a different name:create --file <path>
to create an empty file:cat --file <path>
to copy the content of the file into the editor buffer in an untitled file:compare <path1> <path2>
to compare two files (similar to diff):undo
to undo (same us pressingu
):auto-indent
to auto-indent (same as pressing=
):tree <depth>
to show a directory tree listing of the workspace (root
) folder with custom depth (use:tree -1
for unlimited depth):replace --old <old> --new <new> [-all | -at <occurrence#>]
to replace all or a specific occurrence of something
:open /root/myproject/sample.c
:replace --old "this is a sentence" --new "hello world" -all
cat --file "/root/some dir with spaces/test.txt"