You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
How about a command to turn a sequence into a column, one element per row?
Something along the lines of: Sheet.addCommand('', 'addcol-seq', 'seq_expr=inputExpr("seq expr: "); seq = eval(seq_expr, getGlobals()); c=SettableColumn(); addColumnAtCursor(c); c.setValues(rows, *seq)', 'add column with rows from a sequence')
vals = [5,4,3,2,1]addcol-seqvals
to create a column:
A
--
5
4
3
2
1
I'm not sure how to set the column type.
The text was updated successfully, but these errors were encountered:
midichef
changed the title
command addcol-seq to have rows holding each element of a list in turn
command to turn a sequence into a column
Nov 14, 2024
Ah right, setcol-iter exists. This functionality felt very familiar, now I know why!
Then addcol-iter is just a shorthand for gszacolnamesetcol-itercol. But I do think it'd be helpful mentally to have a single command for that. What do people think?
One downside is that the exec-longname command palette for addcol- would get even more crowded. It has 4 commands that don't fit on screen with default settings. If we make addcol-iter, it'd have 5.
Given your answer #2613 (comment), this would be consistent with existing commands, and simplify the flow for such a task.
Wondering if there is an easier way to handle this matrix of commands (add|set)col-(expr|iter|incr|subs|regex-subs|...) that we have. They are useful, just wondering how to better invoke and find them.
How about a command to turn a sequence into a column, one element per row?
Something along the lines of:
Sheet.addCommand('', 'addcol-seq', 'seq_expr=inputExpr("seq expr: "); seq = eval(seq_expr, getGlobals()); c=SettableColumn(); addColumnAtCursor(c); c.setValues(rows, *seq)', 'add column with rows from a sequence')
vals = [5,4,3,2,1]
addcol-seq
vals
to create a column:
I'm not sure how to set the column type.
The text was updated successfully, but these errors were encountered: