Giter VIP home page Giter VIP logo

sc-im's Introduction

sc-im

NOTE 06/01/2023:

This project needs some help. This is a one person project and lost sponsoring in the last months. There are only just a few left. I want to still maintain and develop sc-im, but I am the only income in my family and its becoming difficult to work as much as I would want. If you can make a donation (see at the bottom), please do. Your help would be really appreciated!! Thanks.

sc-im

Spreadsheet Calculator Improvised, aka sc-im, is an ncurses based, vim-like spreadsheet calculator.

sc-im is based on sc, whose original authors are James Gosling and Mark Weiser, and mods were later added by Chuck Martin.

Some of the features of sc-im

  • Vim movements commands for editing cell content.
  • UNDO / REDO.
  • 65.536 rows and 702 columns supported. (The number of rows can be expanded to 1.048.576 if wished).
  • CSV / TAB delimited / XLSX file import and export. ODS import. Markdown export.
  • Key-mappings.
  • Autobackup.
  • Direct color support - specifing the RGB values, screen colors can be customized by user, even at runtime.
  • Colorize cells or give them format such as bold, italic or underline.
  • Wide character support. The following alphabets are supported: English, Spanish, French, Italian, German, Portuguese, Russian, Ukrainian, Greek, Turkish, Czech, Japanese, Chinese.
  • Sort of rows.
  • Filter of rows.
  • Subtotals.
  • Cell shifting.
  • Clipboard support.
  • GNUPlot interaction.
  • Scripting support with LUA. Also with triggers and c dynamic linked modules.
  • Implement external functions in the language you prefer and use them in SC-IM.
  • Use SC-IM as a non-interactive calculator, reading its input from an external script.

Quick start

Key Purpose
= Insert a numeric value
\ Insert a text value
e Edit a numeric value
E Edit a string value
x Delete current cell content
:q Quit the app
:h See help
:w filename.sc Save current spreadsheet in sc format
j Move down
k Move up
h Move left
l Move right
goab12 go to cell AB12
u undo last change
C-r redo last change undone
yy Copy current cell
v select a range using cursor/hjkl keys
p paste a previously yanked cell or range
ir insert row
ic insert column
dr delete row
dc delete column

Screenshots

demo image demo image demo image demo image demo image demo image

Installation

Dependencies

  • Requirements:

    • ncurses (best if compiled with wide chars support)
    • bison or yacc
    • gcc
    • make
    • pkg-config and which (for make to do its job)
  • Optionals:

    • tmux / xclip / pbpaste (for clipboard copy/paste)
    • gnuplot (for plots)
    • libxlsxreader (for xls support)
    • xlsxwriter (for xlsx export support)
    • libxml-2.0 and libzip (for xlsx/ods import support)
    • lua (for Lua scripting)
    • threads support (in case you want to test this in Minix, just disable autobackup and HAVE_PTHREAD)

Manual

    vim src/Makefile
  • Run make:
    make -C src
  • Optional: You can install the binary sc-im in your system by typing with a privileged user:
    make -C src install

Building on OS X

You can follow the instructions as above, but if you would like Lua scripting support, you will need to install Lua 5.1, which you can do with,

    brew install [email protected]

And then follow the instructions as above.

Homebrew for OSX users

brew install sc-im

Ubuntu with XLSX import & export

See this wiki page.

Other distros / OS

Please check wiki pages

Configuration

The scimrc file can be used to configure sc-im. The file should be placed in the ~/.config/sc-im directory.

Here is an example ~/.config/sc-im/scimrc :

set autocalc
set numeric
set numeric_decimal=0
set overlap
set xlsx_readformulas

Other configuration variables are listed in the help file.

Issues and questions

Please open an issue if you find a bug. If you are now sure if its a bug, please take a look at the discussions and/or ask there. If you have a question please check out current discussions and if you still are in doubt, open a discussion as well. If you want to ask for a feature request, the same, check out current discussions. Thank you!

Tutorial

sc-im tutorial

Related projects

  • vim-scimark - Vim plugin, edit embedded markdown tables with sc-im in vim terminal.

Helping us

Want to help? You can help us with one or more of the following:

  • giving sc-im a star on GitHub
  • taking screenshots / creating screencasts showing sc-im
  • making a donation (see below).
  • telling if you use it / like it. I really don't have a clue if this app is used by someone.

Donations

If you like sc-im please support its development by making a DONATION with Patreon or PayPal. It would really help a lot.

If you wish to make a donation, please click the above button or just send money to [email protected] via PayPal, choosing "Goods and Services". or with Patreon.

Thank you!

sc-im's People

Contributors

andmarti1424 avatar ayroblu avatar charlespax avatar dther avatar dvhar avatar efjimm avatar eliasrg avatar epicalert avatar jimgregory avatar joedight avatar kyrias avatar llenck avatar melak avatar mikeymell avatar mipmip avatar msharov avatar ndtodoroff avatar nickolasburr avatar npitre avatar paolo-lulli avatar pedrormjunior avatar pjvm742 avatar poetaman avatar rjungemann avatar roman65536 avatar sjmulder avatar sorsasampo avatar stroobandt avatar wimstockman avatar yokattana avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sc-im's Issues

Few issues

  1. add a search hotkey in help page. "/ hotkey" like in less
  2. edit mode "e or E hotkey"; doesnt have a cursor blinker so i donno where i am =)
  3. edit mode "e or E hotkey" while in insert mode; can't hit back space to delete character (Ctrl+H works tho)

Thanks for making this fork; undo feature is great

P.S you might want to change the name since there is already a SCIM project

suggestions
scimws (sc improved worksheet)
scimwb (sc improved workbook)
scimdb (sc improved database)
scimwu (sc improved with undo) lols

Previous item in search

When searching in vim you use 'n' to go to the next match and 'N' to the previous match. 'n' works in
sc-im but not 'N'. May I suggest this as a feature?

don't set CC explicitly

i'm working on packaging this for exherbo. setting CC should be left to host and build to be determined. please commnet CC in src/Makefile, that way we have much more general approach. thanks.

entering utf8

The version of sc-im in the dev branch doesn't allow entering accented characters. More generally, the problem seems to be entering non-ascii characters.

won't make - not finding ncurses headers

I get the following error:

gcc -DSYSV3 -O2 -pipe -g -c -o buffer.o buffer.c
In file included from buffer.c:3:0:
macros.h:47:21: fatal error: ncurses.h: No such file or directory
#include <ncurses.h>
^
compilation terminated.
make: *** [buffer.o] Error 1

It cannot seem to find <ncurses.h> which is installed.

Thanks for updating sc.

Phil hart

Improvised vs. Improved

Dear Andrés,

why did you call your version/fork of sc "Spreadsheet Calculator Improvised" and not
"Spreadsheet Calculator Improved" like the relationship between vi and vim would suggest?
Is this some kind of inside joke?

Best regards,
Arne

Homebrew formulae

It would be really nice if a homebrew formulae was created making it easy to install/uninstall sc-im on a mac.

add selecting row

add 'V' for selecting row in visual-mode; like 'V' for selecting the current line in vim.

priority of exponential and unary minus operators

Hello, Andrés

Brian Tiffin here, I've started in on writing up a sc-im User Guide. I use Sphinx and ReStructuredText for technical writing, and I'm very interested in seeing this project moving forward, and improving.

I have plans to leverage this awesome update to sc in both GnuCOBOL and Open Object Rexx applications. Or at least, to show people how this system can be leveraged.

I'm still a GnuCOBOL developer, first and foremost, but I plan on helping out with sc-im, if and when, I can.

Can't really promise much at this point, as the work has just begun, and things can always go sideways, but I think I've got a pretty good plan in place, and I'm hoping to be able to show you some actual output over the next few weeks and months. The level of keen is fairly high, having just had a chance to play around with your latest.

GnuCOBOL 2.0 is nearing a release, as is Open Object Rexx version 5.0, so things will be busy.

For a sample of the writing you can expect to see, take a look at http://opencobol.add1tocobol.com/gnucobol/ which currently weighs in at about 865 pages when output as PDF. The source code highlighting of the COBOL is a contribution I made to the Pygments team, and we even get to enjoy those coloured listings on SourceForge and Wikipedia now, thanks to Team Pocoo. There are features in Sphinx that will allow Markdown files as part of the documentation set with a remarkdown tool. I'll be adding those features to the GnuCOBOL FAQ to make it easier to get Wiki shared edits on some of the more interesting topics in the current book, topics that deserve some wisdom of the many.

sc-im highlighting in Pygments will be part of the effort I put into this new book. Just spent a few hours getting an Introductory chapter written, but again, too early to show you much yet, but this note is to inform you that efforts have begun, and that you have a fan that will try and help out.

I'm also a fan of Doxygen, and might even take a kick at adding some API documentation to your source listings. Might even make a pass and try and autotool-ize your source tree, which might make it easier on distro package maintainers once you think sc-im is ready for the likes of Debian and Fedora.

I hope you don't mind, but I plan on reformatting the internal doc file to fit within an 80 column display, about 15% through the file so far. You can see a copy in the draft.

Keep up the good works, Andrés, and more soon on the documentation angles.

As a maintainer with the GNU project, and free software fan, I'll be willing to re-assign copyrights to you and your project, as long as sc-im remains freedom free.

Current (work in progress, very much incomplete) samples at:
http://peoplecards.ca/sc-im/ (Generated by Sphinx (agogo theme))
and
http://peoplecards.ca/sc-im/sc-im-rst.html (straight up Docutils, rst2html)

Cheers, and have good,
Brian

256 color support?

Hi,

I'm using iTerm with the "Pastel (Dark Background)" color preset which makes all the colors a little bit weak. Sometimes I want stronger colors and in vim I can just specify a number between 0-255 instead of a name but in scim it does not seem to work. Am I missing something or can I only use the color names?

Thanks!

segfault on save

With the latest version, I'm getting segfaults on save.
I'm not sure what extra information you would need.

installing on Mac OSX

I followed the instructions for installing on OSX, but I get this:

$ sudo make
gcc  block.o buffer.o cmds.o cmds_command.o cmds_edit.o cmds_insert.o cmds_normal.o cmds_visual.o color.o conf.o exec.o file.o filter.o format.o gram.o help.o hide_show.o history.o input.o interp.o lex.o main.o maps.o marks.o pipe.o range.o screen.o shift.o sort.o undo.o vmtbl.o xls.o xlsx.o xmalloc.o yank.o utils/dictionary.o utils/extra.o utils/string.o -o scim -lm -lncursesw 
ld: library not found for -lncursesw
clang: error: linker command failed with exit code 1 (use -v to see invocation) 

$ sudo make install
install -d /usr/bin
install: chmod 755 /usr/bin: Operation not permitted
install scim /usr/bin/scim
install: scim: No such file or directory
make: *** [install] Error 71

user defined variables

this might be because of the lack of knowledge on my part...

in old sc you couldn't define variables unless you named a cell and then used that name as named variable. lines for that definition in .sc file would start with directive 'define' and so on.

problem i have with that is that it's not dynamic because when sc writes to disk it takes variable names and replaces them with the hardcoded/statit cell address.

it would be nice to have variables define (preferebly in a seperate file which hopefully will residing in the same dir as the .sc file) with user defined variables.

let me know if what i'm saying here is vague and i will explain more.

Undo does not undo 'copies'

Thanks so much for making this andmarti1424; great program!

If I type 'ma', then paste it with 'ca', then hit 'u'. It says "No undo's left."

sk/sh

When I use the shift left or shift up commands they delete the cell. But shift right and shift down
work as I expect (shifting the contents). Am I misunderstanding something?

Rendering issues

Some examples of rendering issues I have:

  • when I first load scim, a line of the previous terminal screen is displayed (on line 36)
  • when I hit 'j', half the column numbers disappear. To get them back I have to scroll down
    to those cells.
  • Navigating through a large csv will leave some previous values rendered, and also show some
    garbage values like '7;156H1949'

I use iTerm on Mac, OS X 10.9.5.

Cellcolors saved incorrectly - undefined compiler behavior

Cellcolors are saved to file without the first letter of the color.
Example from saved file:
cellcolor A0 "fg=REEN bg=HITE"

edit:
removing lines 286 and 293 in file.c marked with "FIXME THIS" solves the problem, but I don't understand what those lines are supposed to do.

spanish comments

Comments are currently in Spanish.
I have no problem with Spanish, but I can not fully understand it (French speaker here :) ). It might (or not) help contributions if comments were in English.

This "bug" is, imho, not an important one, simply a wish.

Typing in a long text string to a cell causes error

Type in a long text string to a cell

"<here is a very long text string that will crash the spreadsheet after you type this in it will crash"

and press enter

It errors out with:
Error !!! Quitting SC-IM.

implement named functions

[see https://github.com/andmarti1424/scim/issues/16 for what payment_by_x is]

if we could also have named functions, say:
define @nval(payment_by_x,@myrow) what_x_paied
then we would have
what_x_paied-rent

that's as close as it gets to natural language, IMHO.

terminal settings are lost when scim crashes

I know that this soft should not crash, but, it is possible that it happens. When it happens (for example, when exiting in commit 1bc54df) the terminal is not reset in it's original state (cursor no longer appears).

Using mark and copy with a range

Hello. I'm enjoying scim immensely; it's a huge improvement over the traditional sc.

I have question that may be a bug, or may be a feature request -- I'm not sure.

I use the "m" and letter key to mark a cell, and "c" and letter key to copy the contents, as in the old sc.

However it seems if I select a range of cells, with "R" then "x" and "y" or whichever letter sequence, the same behavior isn't available.

In other words, I want to select a range, then mark it, then copy it in the same fashion as the old "m" and "c" keys. I can "yank" that range and "paste" in vim style, but that doesn't preserve formulas in the same fashion.

Am I overlooking that feature? or is it not working right? I've tried as many combinations of keypresses as I could think of, but I don't see if it's possible.

Thanks again, and please keep up the good work. scim is a wonderful program.

utf8 and alignment

I opened a csv that was in utf8, and although the accented characters appeared alright, alignment was messed-up. Here some lines from that file:

,,,,,,,
,O que,Quando,Quanto,Moeda,,US$ 1 =,"R$ 3,90"
,Passagem de Rafael para Denver/México,07/10/2015,"$873,00",USD,,Livia =,+
,Rede do Índio pro pai de Livia,01/11/2015,"-$76,92",USD,,Rafa =,-
,Cachaças,24/11/2015,"-$30,59",USD,,,

About the license

I love this project, standard sc lacks so many things that sc-im really catches the eye, but I'm not really sure about how the license is compatible (or not) with free software ones (GPL specifically) and it makes me hesitate and a little bit uncomfortable to pour work on it.

Have you consider converting the project to GPL?

I think it would have pretty much the same conditions and freedoms but with the advantage of a very standard and strong free software license backup by the whole GNU and FSF community. Probably the only thing to change would be the LICENSE file with the standard GPLv3 one. Appending to it the attribution and so.

That would even come with extra ease for distribution in GNU/Linux distros standard repos.

GPLv3 howto

Not an issue but probably a wish :)

auto-suggestion/completion (super ticket)

this shall be a super ticket for auto-suggestion/completion.
ideas so far:

  1. implement pop-up menu like in vim for showing suggestions (youcompleteme et al use this)
  2. a completer to fuzzy search possbile functions/named variables and so on
  3. find or write a lib to talk to google's API for suggestions, pretty much the same google does it on it's own google-doc's spreadsheets.

Header fields get stacked in large CSV

I have a csv with 259 columns, and when I load it in scim the header fields are stacked into a layer of 6 rows, and the column values are interleaved. Let me know if you want me to attach a screenshot.
Ryan

Help doesn't open

After building from source, typing :help gives the error Cannot open help file
screenshot 2015-08-31 at 13 40 35

Add padding between cells

I can't find a way to pad cells so that there is a space between adjacent cell values. Is there a way to do this?

crash when exiting

file history.c, line 108.

Trying assig null to nl->pnext->pant fails, since nl->pnext is null.

Plain text export function

Thanks for the app! I have a question regarding plain text export. In original sc, one can write out a plain text version of the shreadsheet with command key w. I do not have found a way to do it in sc-im. If I export using tab delimited files with :e tab the format is messed up.

So my question is: is there any way to do plain text export I have overlooked?

Thanks, Bernd!

implement cursorline and cursorcolumn

cursorline is great in vim but here we would also need columns to be highlighted...
update: vim has cursorcolumn! so implement equivalent of that.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.