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
Copy file name to clipboardExpand all lines: docs/columns.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -56,7 +56,7 @@ Command Type
56
56
`z#` vlen
57
57
`z~` anytype
58
58
59
-
Columns usually begin as untyped. Odd results while working with numerical or datetime data is usually due to values being considered as strings, and the problem is solved by setting the correct type.
59
+
Columns usually begin as untyped (`anytype`). Errors when working with numerical or datetime data is often due to values being considered as strings, and the problem is solved by setting the correct type.
60
60
61
61
The `float` type uses Python's builtin `float()` constructor to parse the string, and it parses by using the decimal separator.
Copy file name to clipboardExpand all lines: docs/crud.md
+21-24Lines changed: 21 additions & 24 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,29 +2,15 @@
2
2
eleventyNavigation:
3
3
key: Creating sheets, rows and columns
4
4
order: 8
5
-
Update: 2018-12-12
6
-
Version: VisiData 1.5.1
5
+
Update: 2021-11-18
6
+
Version: VisiData 2.7.1
7
7
---
8
8
9
9
10
10
11
-
## How to configure the cursor to move right after a successful edit
12
-
13
-
1. Press `Shift+O` to enter the global options menu.
14
-
2. Type `r` followed by `cmd` to move the cursor to the **cmd\_after\_edit** option.
15
-
3. Press `Enter` to edit the option, and type `go-right`. Press `Enter` to save the option.
16
-
17
-
**or**
18
-
19
-
1. To have the change [persist](/docs/customize), add the following line to the .visidatarc.
20
-
21
-
options.cmd_after_edit='go-right'
22
-
23
-
---
24
-
25
11
## How to set up a sheet for data collection
26
12
27
-
1. Type `Shift+A`followed by a *number*to open a new blank sheet with that many columns.
13
+
1. Type `Shift+A` to open a new blank sheet with one column.
28
14
2. Press
29
15
30
16
a. `a` to add one blank row.
@@ -33,10 +19,6 @@ Version: VisiData 1.5.1
33
19
34
20
b. `ga` followed by a *number* to add that many blank rows.
35
21
36
-
3.[Edit the cells](/docs/edit) in any row to contain the column names.
37
-
4. While the cursor is on that row, press `g^` to set the header for each column with the contents of the row.
38
-
5. Press `d` to remove that row.
39
-
40
22
---
41
23
42
24
## How to add a new blank column
@@ -49,12 +31,27 @@ Version: VisiData 1.5.1
49
31
50
32
b. `gza` followed by a *number* to add that many blank columns.
51
33
34
+
2. Press `^` to edit the column name.
35
+
52
36
---
53
37
54
38
## How to fill a column with a range of numbers
55
39
56
-
1. Optional: Use `s` or `t` to select a subset of rows to fill.
57
-
2. Move the cursor to the column.
58
-
3. Type `gz=` followed by `range(`*n*`)` to set selected rows in that column to the results of an iterator expression. In this case, the range of numbers from 1 to *n*.
40
+
1. Press `gs` to select all rows (or use other commands to select a subset of rows to fill).
41
+
2. Move the cursor to the column to be filled.
42
+
3. Press `gi`.
43
+
44
+
## How to edit a cell
45
+
46
+
1. Press `e` to edit an individual cell.
47
+
2. Type in the new value.
48
+
3. Press `Enter` to accept the value.
49
+
50
+
---
51
+
52
+
## How to move the cursor to the next cell after a successful edit
53
+
54
+
1. Press `Shift+Arrow` to accept the current value and move the cursor into edit mode in the next cell.
Copy file name to clipboardExpand all lines: docs/customize.md
+12-92Lines changed: 12 additions & 92 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,83 +2,25 @@
2
2
eleventyNavigation:
3
3
key: Customizing VisiData
4
4
order: 12
5
-
Updated: 2019-11-02
6
-
Version: VisiData v2.-1
5
+
Updated: 2021-11-18
6
+
Version: VisiData v2.7
7
7
---
8
8
9
-
In VisiData, there is a distinction between global configurations (options/commands) and sheet-specific. Global settings are on default applied to every single sheet in the session. Sheet-specific ones override global settings for a given **SheetType**.
10
-
11
-
Examples of **SheetType**s include (but are not limited to):
12
-
13
-
***FreqTableSheet** (the command is executable on every [frequency table](/docs/group#frequency));
14
-
***TsvSheet** (option is applied to every loaded .tsv file);
15
-
***ColumnsSheet** (typing selected referenced columns with `g#` can only be done on the **Columns sheet**).
16
-
17
-
## How to configure VisiData within the current session
18
-
19
-
Within the application itself:
20
-
21
-
* Press `z Shift+O` to access the **Options sheet** for the current **SheetType**.
22
-
* Press `Shift+O` to access the global **Options sheet**.
23
-
24
-
An option can be edited either by pressing `Enter` or by using [standard editing commands](/man#edit).
25
-
26
-
Global options can also be passed as arguments through the [commandline](/man#options). For example
27
-
28
-
~~~
29
-
vd --skip 2
30
-
~~~
31
-
32
-
or
33
-
34
-
~~~
35
-
vd --skip=2
36
-
~~~
37
-
38
-
---
39
-
40
-
## How to have setting configurations persist
41
-
42
-
The contents of **.visidatarc** in the user's home directory (and also the current directory) are `exec()`d on startup. Options set through the command-line or **Options Sheet** will override those set in **.visidatarc**.
43
-
44
-
To set the global value of an option:
45
-
46
-
~~~
47
-
options.num_burgers = 13
48
-
~~~
49
-
50
-
The type of the default is respected. An **Exception** will be raised if the option is later set with a value that cannot be converted. (A default value of **None** will allow any type.)
51
-
52
-
Option names should use the underscore for word breaks. On the command-line, underscores must be converted to dashes:
53
-
54
-
~~~
55
-
$ vd --num-burgers=23
56
-
~~~
57
-
58
-
The maximum option name length should be 20.
59
-
60
-
`theme()` should be used instead of `option()` if the option has no effect on the operation of the program, and can be overrided without affecting existing scripts. The interfaces are identical. (The implementation is also identical currently, but that may change in the future.)
61
-
62
-
To generate a `.visidatarc` with all of the global options as they are currently set:
63
-
-`Shift+O` to go to any Options Sheet
64
-
-`Ctrl+S` and save to a file with a `.visidatarc` extension
65
-
66
-
67
-
:::::
68
-
69
-
---
9
+
For a primer on configuring VisiData through setting options, see [jsvine's tutorial](https://jsvine.github.io/intro-to-visidata/advanced/configuring-visidata/).
70
10
71
11
## How to configure commands {#commands}
72
12
73
13
The **.visidatarc** in the user's home directory is plain Python code, and can contain additional commands or key bindings.
74
14
75
-
Longnames are names given to particular flavours of executable commands for ease of keystroke remapping. For example, the longname `select-row` is assigned to commands which select the current row in a sheet. On default, this longname is bound to the keystroke `s`.
15
+
Longnames are names given to executable commands for ease of keystroke remapping. For example, the longname `select-row` is assigned to commands which select the current row in a sheet. On default, this longname is bound to the keystroke `s`.
76
16
77
-
From within VisiData, type `z Ctrl+H` to open the **Commands Sheet**. This is a reference for all of the commands available on the current sheet. For a deeper exploration of commands, check out [the book of VisiData](https://www.visidata.org/docs/api/commands.html).
17
+
From within VisiData, type `z Ctrl+H` to open the **Commands Sheet**. This is a reference for all of the commands available on the current sheet. For a deeper exploration of commands, check out [API reference manual](https://www.visidata.org/docs/api/commands.html).
78
18
79
19
### Setting/changing keybindings for existing commands
80
20
81
-
1. Use `z Ctrl+H` to open the **Commands Sheet** and discover the [longname]() for the functionality in question.
21
+
1. Learn the longname for a command. Longnames are usually 2-3 words, seperated by hyphens. The first word is usually a verb, and the second usually a noun. When a command is executed, its longname appears in the lower right status, next to its keystroke. Alternatively, you can `z Ctrl+H` to open the **Commands Sheet** and discover the longname for the command in question.
22
+
23
+

82
24
83
25
2. a) To create a global keybinding, add `bindkey(keystroke, longname)` to your **.visidatarc**.
84
26
b) To set the binding for a particular sheet type, add `<Sheet>.bindkey(keystroke, longname)` to your **.visidatarc**, where `<Sheet>` is a **SheetType**.
@@ -98,39 +40,17 @@ In VisiData, pressing `e` enters edit mode for the current cell. Seasoned vim us
98
40
99
41
### Creating new commands
100
42
101
-
Both `globalCommand` and `<Sheet>.addCommand` take the same parameters. At minimum, each command requires a longname and execstr.
Note that sheet-specific commands trump globally set commands for keybindings.
122
-
123
-
`globalCommand` is primarily for commands which don't need a sheet at all. In most cases, commands should be on `Sheet` or a further specialised **Sheet Type**.
`execstr` is resolved recursively, so it can be an existing keystroke or `longname` for those that have one. The last in the chain is `exec()`ed.
130
-
131
-
---
51
+
Commands and keybindings are set on a particular Sheet Type in the class hierarchy. Use `BaseSheet` for commands which don't need a sheet at all--these will apply to all sheets. Commands and bindings on more specific sheets will override more generic ones. `Sheet` is a generic table, `ColumnsSheet` would be for the columns sheet, `FreqTableSheet` for frequency tables, and so on.
132
52
133
-
### Adding custom aggregators
53
+
### Adding custom aggregators {#aggregators}
134
54
135
55
Aggregators allow you to gather the rows within a single column, and interpret them using descriptive statistics. VisiData comes pre-loaded with a default set like mean, stdev, and sum.
0 commit comments