summaryrefslogtreecommitdiffstats
path: root/src/doc
blob: 62cf1b234923ca1b641caf93731fc6da942ac22b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
                         This is the SC-IM help file.

Use the cursor keys to move around, or 'j' to go down and 'k' to go up.
You can also use the <ENTER> key to go one line down and <DEL> to go up.

<SPACE> moves a page down, while <C-f> and <C-b> move half page down or up.

'G' moves to bottom, and <C-a> to the beginning of the text.

Use '/' to search for a pattern in the help.

Use ':q<Enter>' to go back to the spreadsheet.

==============================================================================
SC-IM has the following modes:

SC-IM has the following modes:
   NORMAL MODE:  In Normal mode, you can navigate cells and input normal
                 commands.
   INSERT MODE:  Use the '=', '<', '>', or '\' to go to Insert mode, where you
                 can enter new values and expressions into cells.
     EDIT MODE:  Use the 'e' or 'E' keys to go to Edit mode and enter a single
                 line, Vi-like, command to modify cell content
                 and expressions.  The 'e' and 'E' keys enter this mode.
  COMMAND MODE:  Use the ':' key to enter Command mode. This is for entering
                 special commands such as quitting the app and saving files.
   VISUAL MODE:  Visual mode is used for selecting a range of cells.  See the
                 section 'Selecting a range' below.
                 The 'v' key enters this mode from Normal mode, or <C-v> in
                 Insert and Command modes.

==============================================================================
&NORMAL MODE&

Navigation commands:
     j k l h     Move cursor down, up, right or left.
     ^           Go up to row 0 of the current column.
     #           Go down to the last valid row of the current column.  If
                 already in last valid row of the current column, then jump to
                 last valid row of the last valid cell in spreadsheet.
     0           Go left to column A in the current row.
     $           Go right to the last valid column of the current row.
     b           Go back to the previous valid cell.
     w           Go forward to the next valid cell.
     '{a-zA-Z}   Go to the cell or range marked previously with the character.
                 See 'm' for details.
     gab24       Go to cell AB24.  (There is no need to press <ENTER>.)
     g0          Go to the leftmost column visible on screen.
     g$          Go to the rightmost column visible on screen.
     gM          Go to the middle column on the screen.
     H           Go to the top row visible on screen.
     L           Go to the lowest row visible on screen.
     M           Go to the middle row on the screen.
     gg    c-a   Go to the first cell of sheet.
     G     gG    Go to last valid cell of sheet.
     gl          Go to the last (prevously occupied) cell position.
     c-f   c-b   Scrolls down and up full screen.
                 :set half_page_scroll=1 to scroll by half a page instead.
                 half_page_scroll=0 (default) scrolls by a full page.
                 See :set command for details.
     c-e   c-y   Scroll a row down and up.
     zh          Scroll left one column.
     zl          Scroll right one column.
     zH          Scroll left half a page.
     zL          Scroll right half page.
     zz          Scroll vertically to position the selected cell at the middle
                 of the screen.
     zt          Scroll vertically to position the selected cell at the top
                 of the screen.
     zb          Scroll vertically to position the selected cell at the bottom
                 of the screen.
     zm          Scroll horizontally to position the selected cell at the
                 center of the screen.
     Vir         Select the smallest range that covers all valid cells.


Commands for handling cell content:
     x     dd    Delete the current selected cell or range and save its
                 content in the yankbuffer.
     m{a-zA-Z}   Mark the current cell or selected range with that letter.
                 NOTE: When a mark is changed, all ranges that use that mark
                 are deleted.
     c{a-zA-Z}   Copy the marked cell or range to the current position,
                 adjusting row and column references in its numeric or string
                 expression, if any.
     R{a-zA-Z}{a-zA-Z}
                 Select the range defined by the two marks.
                 NOTE: If a range already exists, it is replaced with the new
                 values.

     { } |       Align the content of a cell to the left, right or center.  If
                 a range is selected, every cell of the range gets aligned.

     f+ , fk , f-UP:         Change cell format: Increment decimal precision.
     f- , fj , f-DOWN:       Change cell format: Decrement decimal precision.
     f< , fh , f-LEFT:       Change cell format: Decrement column width.
     f> , fl , f-RIGHT:      Change cell format: Increment column width.

     ir          Insert a row.
     ic          Insert a column.
     or          Open a row: insert after the current row.
     oc          Open a column: insert after the current column.
     sk          Shifts the current cell or range up.
     sj          Shifts the current cell or range down.
     sh          Shifts the current cell or range left.
     sl          Shifts the current cell or range right.

     yy          Yank the selected cell.
     y           If a range is selected, yank the range.
     yr          Yank current row.
     yc          Yank current column.

     p           Paste the previously yanked cell or range.
                 If yr was used to yank a row, create a new row below and
                 paste content there.
                 If yc was used to yank a column, create a new column to the
                 left and paste content there.
     Pf          Works like 'p' except that only the cell formatting is
                 merged, leaving cell values intact.
     Pv          Works like 'p' except that only cell values are copied,
                 leaving cell formatting intact.
     Pc          Works like 'p' except that all cell references are adjusted
                 in the same way that they are for the copy command.

     t           Same as 'p' but if yr was used to yank a row, create a new
                 row above and paste content there.
                 If yc was used to yank a column, create a new column to the
                 right and paste content there.
     Tf          Works like 't' except that only cell formatting information
                 is merged in, leaving cell values intact.
     Tv          Works like 't' except that only cell values are copied,
                 leaving cell formatting intact.
     Tc          Works like 't' except that all cell references are adjusted
                 in the same way that they are for the copy command.

     dr          Delete the current row.
     dc          Deletes the current column.
     .           Repeat the last normal mode command.
     -           Decrease a numeric value of the cell or range.
     +           Increase a numeric value of the cell or range.

     u           UNDO last change
     c-r         REDO last change
                 NOTE: Events implemented for undo and redo:
                 1. cell or range deletion
                 2. cell input
                 3. cell editing
                 4. cell or range change in alignment
                 5. pasting a cell or range
                 6. range or cell shift with sh sj sk sl
                 7. row or column insertion
                 8. row or column deletion
                 9. pasting a row or column
                 10. zap(hide) or show a row or column
                 11. reordering of a range
                 12. changing the format of a range or cell
                 13. '-' and '+' commands in normal mode
                 14. locking and unlocking of cells
                 15. the datefmt command
                 16. the cellcolor command

     c-d         Convert the text content of a selected cell or range to a
                 date, using default LOCALE's D_FMT format.
                 This converts text to a numeric value that can be shown as a
                 date. See DATE INPUT below for more info.
                 NOTE: USELOCALE has to be enabled during build.

     aa    c-j   Auto-resize the selected column(s) to accommodate the widest
                 cells.


 Other commands:
     ^L          Redraw the screen.
     Zr          Zap (hide) the current row.
     Zc          Zap (hide) the current column.
     Sr          If a range is selected, show the rows hidden in the range.
     Sc          If a range is selected, show the columns hidden in the range.
     '/'         Alias for ':int goto '.

                 If a number is given, SC-IM will search for a cell containing
                 that number.  Searches for either strings or numbers proceed
                 forward from the current cell, wrapping back to a0 at the end
                 of the table, and terminate at the current cell if the string
                 or number is not found.

                 Example: Type '/4' to look for cells containing the value 4.
                 Or type '/"value"' to look for cells that has "value" as
                 label content.
                 You can quote a regular expression, and SC-IM will search for
                 a cell containing a string matching the regular expression.
                 You can search for formatted numbers or expressions using
                 regular expressions by preceding the opening quotes of the
                 regular expression with a '#' (for formatted numbers) or a
                 '%' (for expressions).
                 These are handy for searching for dates within a specified
                 range or cells which reference a given cell, for example,
                 although they are somewhat slower than searching through
                 ordinary strings, since all numbers must be formatted or
                 expressions decompiled on the fly during the search.
     n           Move to next search match.
     N           Move to previous search match.

     rl          Lock the current cell or range. Locking makes cells immune to
                 any type of editing. A locked cell can't be changed in any
                 way until it is unlocked.
     ru          Unlock a locked cell or range, making it editable.
     rv          Valueize the current cell or range. Valueizing removes
                 expressions, leaving only the values.

==============================================================================
&INSERT MODE&
     =           Enter a numeric constant or expression.
     <           Enter a left justified string or string expression.
     \           Enter a centered label.
     >           Enter a right justified string or string expression.
     <TAB>       Return to Edit mode from Insert mode.
     <LEFT>, <RIGHT>
                 Move the cursor with the arrow keys.
     Keys <ENTER>
                 Input numbers, letters and operators.
     <BS>, <DELETE>
                 Delete the character after or before the cursor.
     <ESC>       Go back to Normal mode.
     c-r{a-zA-Z}
                 If the character is a mark of a cell or range, the range
                 represented is inserted into the field.
     c-v         Enter Visual mode. See C-o and C-k commands in VISUAL MODE.

==============================================================================
&EDIT MODE&
     e           In normal mode, enter Edit mode to edit a numeric value.
     E           In normal mode, enter Edit mode to edit a text value.
     h           Move a character left.
     l           Move a character right.
     w           Move to the beginning of the next word.
     e           If at the end of a word, move to the end of the next word.
                 Otherwise, move to the end of word under the cursor.
     b           If at the beginning of a word, move to beginning of the
                 previous word. Otherwise, move to beginning of word under the
                 cursor.
     0           Move to the beginning of the line.
     $           Move to the end of the line.
     f{char}     Move to the next occurrence of {char} to the right.
     r{char}     Replaces the character under the cursor with {char}.
     R{word}     Each character you type replaces an existing character,
                 starting with the character under the cursor.
                 ESC key or ENTER key must be pressed when finished typing the
                 new word.

     de          Delete until the end of the word.
     dw          Delete until the beginning of the next word.
     db          If at the beginning of a word, delete until the beginning of
                 the previous word. Otherwise, delete until the beginning of
                 the word under the cursor.
     daw         Delete the word under the cursor.
     dE          Delete until the end of WORD.
     dW          Delete until the beginning of the next WORD.
     dB          If at the beginning of a word, delete until the beginning of
                 previous WORD. Otherwise, delete until the beginning of the
                 WORD under the cursor.
     daW         Delete the WORD under the cursor.
     dl          Delete the character under the cursor.
     d<RIGHT>    Delete the character under the cursor.
     dh          Delete the character before the cursor.
     d<LEFT>     Delete the character before the cursor.

     ce          Same as "de", then enter Insert mode.
     cw          Same as "dw", then enter Insert mode.
     cb          Same as "db", then enter Insert mode.
     caw         Same as "daw", then enter Insert mode.
     cE          Same as "dE", then enter Insert mode.
     cW          Same as "dW", then enter Insert mode.
     cB          Same as "dB", then enter Insert mode.
     caW         Same as "daW", then enter Insert mode.
     cl          Same as "dl", then enter Insert mode.
     c<RIGHT>    Same as "d<RIGHT>", then enter Insert mode.
     ch          Same as "dh", then enter Insert mode.
     c<LEFT>     Same as "d<LEFT>", then enter Insert mode.

     x           Delete the character under the cursor.
     X           Delete the character before the cursor.
     i or =      Go back to Insert mode.
     a           Append a character after the cursor.
     s           Delete a character under the cursor, then enter Insert mode.
     A           Append at the end of the line.
     I           Append at the beginning of the line.
     D           Delete from the current cursor position to end of line.
     <SPACE>     Add a space under the cursor.
     <ENTER>     Confirm changes.

==============================================================================
&COMMAND MODE&
     <LEFT>, <RIGHT>
                 Move the cursor position with the arrow keys.

     <ENTER>
                 Confirm a command.

     <DELETE>, <BS>
                 Delete the character under the cursor, or before the cursor.

     <HOME>, <END>
                 Move the cursor to the beginning or end of the line.

     <TAB>       Complete a command that begins with the text already entered
                 in the command line.

     <C-w>, <C-b>
                 Move forward or backwards a word.

     <C-f>
                 Paste the current cell format (if any) to the command line.

     <C-v>       Starts VISUAL MODE. See C-o and C-k commands in VISUAL MODE.

     :w          Save the current spreadsheet.
     :w {file}   Save the current spreadsheet as {file}.
     :w! {file}  Save the current spreadsheet as {file}, forcing an overwrite
                 if {file} already exists.

     :h          Show this help.
     :help       Show this help.

     :q[uit]     Quit SC-IM.
     :q[uit]!    Quit SC-IM, ignoring unsaved changes.

     :load {file}
                 Load {file} into the SC-IM database.
     :load! {file}
                 Same as previous, but ignore changes done to the current
                 loaded spreadsheet.

     :x          Save the current spreadsheet and quit SC-IM.

     :x {file}   Save the current spreadsheet to {file} and quit SC-IM.

     :x! {file}  Like ":x", but overwrite {file} if it exists.

     :e tab      Export the current spreadsheet to a tab-separated file.
                 The name of the created file comes from the current
                 spreadsheet, with ".tab" appended.
                 If a range is selected, only that range is exported.

     :e txt      Export current spreadsheet to plain text.
                 If a range is selected, only that range is exported.

     :e csv {file}
                 Export the current spreadsheet to comma-separated file {file}.

     :e! csv {file}
                 Like ":e csv", but overwrite {file} if it exists.

     :e tab {file}
                 Export the current spreadsheet to tab-sepa