sim

the sim text editor
git clone git://ssnf.xyz/sim
Log | Files | Refs | README

commit 2274a13108dad39aca216661041000b3df0ac7ae
parent dcfa54da43d06623c133d973cbc7c375040ecf75
Author: ssnf <ssnf@ssnf.xyz>
Date:   Thu, 10 Jul 2025 23:50:12 +0000

add man page

Diffstat:
Asim.1 | 213+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 213 insertions(+), 0 deletions(-)

diff --git a/sim.1 b/sim.1 @@ -0,0 +1,213 @@ +.TH SIM 1 +.SH NAME +sim \- simple, interactive, multi-file text editor +.SH SYNOPSIS +.B sim +[ +.I file +] +.SH DESCRIPTION +.I Sim +is a multi-file text editor with vim-like key bindings. +It can handle up to 8 files simultaneously. +The cursor remains at a fixed screen position while text scrolls around it. +.PP +If invoked with a +.I file +argument, that file is loaded. If the file does not exist, an empty buffer is created with that filename. +.SH COMMANDS +.SS File Operations +.PD 0 +.TP +.B E +Open file (prompts for filename) +.TP +.B S +Save current file +.TP +.B q +Close current file +.TP +.B Q +Quit editor +.TP +.B Alt+1..8 +Switch to file 1-8 +.TP +.B Esc+1..8 +Switch to file 1-8 +.PD +.SS Movement +.PD 0 +.TP +.B h j k l +Move cursor left, down, up, right +.TP +.B w e b +Move to next word, end of word, previous word +.TP +.B $ 0 +Move to end of line, beginning of line +.TP +.B G g +Move to end of file, beginning of file +.TP +.B Ctrl+d Ctrl+u +Move half page down, half page up +.PD +.SS Search +.PD 0 +.TP +.B /text +Search forward for text +.TP +.B ?text +Search backward for text +.TP +.B n +Repeat search forward +.TP +.B N +Repeat search backward +.PD +.SS Counts +Prefix commands with numbers to repeat: +.B 3dd +deletes 3 lines, +.B 5j +moves down 5 lines. +.SS Operators and Motions +Operators +.B d +(delete), +.B c +(change), and +.B y +(yank) accept motion arguments: +.PD 0 +.TP +.B x +Character +.TP +.B w +Word +.TP +.B c +Line (so dc = dd, cc = cc, yc = yy) +.TP +.B G +To end of file +.TP +.B g +To beginning of file +.TP +.B tX +Until character X +.PD +.SS Commands +.PD 0 +.TP +.B i a o +Enter insert mode at cursor, after cursor, new line below +.TP +.B I A O +Enter insert mode at line start, line end, new line above +.TP +.B x +Delete character under cursor +.TP +.B d +Delete operator (use with motion: dw, dc, dG) +.TP +.B D +Delete to end of line +.TP +.B c +Change operator (use with motion: cw, cc, cG) +.TP +.B C +Change to end of line +.TP +.B r +Replace single character +.TP +.B y +Yank operator (use with motion: yw, yc, yG) +.TP +.B p +Paste after cursor +.TP +.B u +Undo +.TP +.B U +Undo all changes to current file +.TP +.B Ctrl+r +Redo +.TP +.B R +Redo all changes to current file +.TP +.B . +Repeat last edit command +.PD +.SS Insert Mode +.PD 0 +.TP +.B Esc +Return to command mode +.TP +.B Del +Delete character before cursor (backspace) +.PD +.SS Special +.TP +.B @ +Show line numbers and position information +.SH CONFIGURATION +Edit +.B config.h +and recompile to customize key bindings. +Copy +.B config.def.h +to +.B config.h +first. +.SH EXAMPLES +.TP +.B sim +Start with empty buffer +.TP +.B sim file.txt +Edit file.txt +.TP +.B 5yyp +Copy 5 lines and paste +.TP +.B 5ct. +Change until 5th period +.TP +.B 2r +Replace 2 characters +.TP +.B /hello +Search for "hello" +.TP +.B yG +Copy from cursor to end of file +.TP +.B /^ +Search for newline characters +.SH SOURCE +.B https://git.ssnf.xyz/sim +.SH SEE ALSO +.IR vi (1), +.IR sam (1) +.SH BUGS +Cannot search for literal +.B ^ +characters. +.PP +.B O +(insert line above) does not work.