sim.1 (2901B)
1 .TH SIM 1 2 .SH NAME 3 sim \- simple, interactive, multi-file text editor 4 .SH SYNOPSIS 5 .B sim 6 [ 7 .I file 8 ] 9 .SH DESCRIPTION 10 .I Sim 11 is a multi-file text editor with vim-like key bindings. 12 It can handle up to 8 files simultaneously. 13 The cursor remains at a fixed screen position while text scrolls around it. 14 .PP 15 If invoked with a 16 .I file 17 argument, that file is loaded. If the file does not exist, an empty buffer is created with that filename. 18 .SH COMMANDS 19 .SS File Operations 20 .PD 0 21 .TP 22 .B E 23 Open file (prompts for filename) 24 .TP 25 .B S 26 Save current file 27 .TP 28 .B q 29 Close current file 30 .TP 31 .B Q 32 Quit editor 33 .TP 34 .B Alt+1..8 35 Switch to file 1-8 36 .TP 37 .B Esc+1..8 38 Switch to file 1-8 39 .PD 40 .SS Movement 41 .PD 0 42 .TP 43 .B h j k l 44 Move cursor left, down, up, right 45 .TP 46 .B w e b 47 Move to next word, end of word, previous word 48 .TP 49 .B $ 0 50 Move to end of line, beginning of line 51 .TP 52 .B G g 53 Move to end of file, beginning of file 54 .TP 55 .B Ctrl+d Ctrl+u 56 Move half page down, half page up 57 .PD 58 .SS Search 59 .PD 0 60 .TP 61 .B /text 62 Search forward for text 63 .TP 64 .B ?text 65 Search backward for text 66 .TP 67 .B n 68 Repeat search forward 69 .TP 70 .B N 71 Repeat search backward 72 .PD 73 .SS Counts 74 Prefix commands with numbers to repeat: 75 .B 3dd 76 deletes 3 lines, 77 .B 5j 78 moves down 5 lines. 79 .SS Operators and Motions 80 Operators 81 .B d 82 (delete), 83 .B c 84 (change), and 85 .B y 86 (yank) accept motion arguments: 87 .PD 0 88 .TP 89 .B x 90 Character 91 .TP 92 .B w 93 Word 94 .TP 95 .B c 96 Line (so dc = dd, cc = cc, yc = yy) 97 .TP 98 .B G 99 To end of file 100 .TP 101 .B g 102 To beginning of file 103 .TP 104 .B tX 105 Until character X 106 .PD 107 .SS Commands 108 .PD 0 109 .TP 110 .B i a o 111 Enter insert mode at cursor, after cursor, new line below 112 .TP 113 .B I A O 114 Enter insert mode at line start, line end, new line above 115 .TP 116 .B x 117 Delete character under cursor 118 .TP 119 .B d 120 Delete operator (use with motion: dw, dc, dG) 121 .TP 122 .B D 123 Delete to end of line 124 .TP 125 .B c 126 Change operator (use with motion: cw, cc, cG) 127 .TP 128 .B C 129 Change to end of line 130 .TP 131 .B r 132 Replace single character 133 .TP 134 .B y 135 Yank operator (use with motion: yw, yc, yG) 136 .TP 137 .B p 138 Paste after cursor 139 .TP 140 .B u 141 Undo 142 .TP 143 .B U 144 Undo all changes to current file 145 .TP 146 .B Ctrl+r 147 Redo 148 .TP 149 .B R 150 Redo all changes to current file 151 .TP 152 .B . 153 Repeat last edit command 154 .PD 155 .SS Insert Mode 156 .PD 0 157 .TP 158 .B Esc 159 Return to command mode 160 .TP 161 .B Del 162 Delete character before cursor (backspace) 163 .PD 164 .SS Special 165 .TP 166 .B @ 167 Show line numbers and position information 168 .SH CONFIGURATION 169 Edit 170 .B config.h 171 and recompile to customize key bindings. 172 Copy 173 .B config.def.h 174 to 175 .B config.h 176 first. 177 .SH EXAMPLES 178 .TP 179 .B sim 180 Start with empty buffer 181 .TP 182 .B sim file.txt 183 Edit file.txt 184 .TP 185 .B 5yyp 186 Copy 5 lines and paste 187 .TP 188 .B 5ct. 189 Change until 5th period 190 .TP 191 .B 2r 192 Replace 2 characters 193 .TP 194 .B /hello 195 Search for "hello" 196 .TP 197 .B yG 198 Copy from cursor to end of file 199 .TP 200 .B /^ 201 Search for newline characters 202 .SH SOURCE 203 .B https://git.ssnf.xyz/sim 204 .SH SEE ALSO 205 .IR vi (1), 206 .IR sam (1) 207 .SH BUGS 208 Cannot search for literal 209 .B ^ 210 characters. 211 .PP 212 .B O 213 (insert line above) does not work.