It is very old spreadsheet program working in a terminal. It is amazing that such a small program achieved most of the common functionalities provided in MS Excel long time ago with much faster speed. Its original source codes are now maintained in a GitHub repository with many forks. Resources:
The source code maintained by Debian distribution is the best. Some patches have to be made to compile and install it in one’s home directory smoothly:
git clone git://git.debian.org/collab-maint/sc.git
cd ~/github/sc
git apply /path/to/sc.patch
make install
There is no undo function in the original sc. One can use a version control program to save the history of a sc file. scim provides undo/redo and worths a try. Check this question in StackExchange for detail.
This is controlled by the option ‘o’. It can be toggled in sc using the following key strokes: Ctrl-t followed by o, or in the configuration file
set !optimize
Press = or e to insert the date as follows
@dts(2013,1,25)
Press F and Ctrl-d followed by %F to specify the display format of the date as 2013-01-25.
Press f followed by 3 numbers (width of the column, precision and format type) to change format type:
type | format |
---|---|
0 | fixed numbers |
1 | scientific |
2 | engineering |
3 | 6 Apr 79 |
4 | 6 Apr 1979 |
5~9 | user-defined |
The new format type can be defined either inside sc by f= followed
by a number, or in .scrc
.
format 5 = "^D%F"
Press f to enable setting display format of numbers in a column, and then press h or l to change the length of the column, j or k to change the precision of the numbers in a column. The hljk trick does not seem to work in cygwin.
Press = or e to insert the function as follows
@sum(B2:F25)
rF -> use h,j,k,l to select range -> tab -> “^D%F -> return
Range operations, copying or deleting many rows or columns for example, trigger update of formula in the whole sheet. Cell operations do not change formula at all. Rules of update:
Numbers are always justified to the right. Strings can be justified to the left/center/right using {/|/}, respectively.
Activities mentions in this site have been supported by the following grants: