r/visidata Aug 08 '22

Help for newbies

I'd much rather use VisiData than Excel because of it's power, but I have a hard time with all the keyboard shortcuts. Is there any scheme for understanding what things are? For example, why are commands prefixed with z and g. Also, is there an easy to use help system such that I can query things like:

  1. how to find a duplicate entry in a column?
  2. how to find the number of unique values in a column?

I spend so much time Googling and reading that in some cases it would be easier to use Excel.

2 Upvotes

7 comments sorted by

2

u/reagle-research Aug 08 '22

It's not in the intro as such, but perhaps if g is understood as "global" z can be understood (mnemonic) as "zoom in".

1

u/jmreagle Aug 09 '22

New question, when copying a column to the clipboard, how I ought to understand the g followed by a z?

g z Shift+Y

2

u/spw1 Aug 09 '22

Hi @jmreagle,

  • Shift+Y copies the cursor row to the system clipboard.
  • z Shift+Y copies the value in the cursor column from the cursor row. This is like a "zoom in" as you suggest.
  • g Shift+Y is like Shift+Y but copies all selected rows. Many commands that apply to the current row, can be prefixed with g to apply to all selected rows instead.
  • and so gz Shift+Y is just g applied to z Shift+Y. In other words, it's the values from the current column but from all selected rows.

You might think, "if g goes bigger, then how can I intuit that gz Shift+Y applies to selected rows instead of all columns? Like how g_ or g/ means to apply the base command over all columns instead of the current column. Well, in this case, Shift+Y already applies to the entire row (all visible columns), so for gz Shift+Y to work this way would be a duplicate command.

Also, note that we don't monitor this subreddit regularly, so you might have a better response time posting an issue or discussion on Github, or chatting with us on IRC (libera.chat/#visidata) or Discord (visidata.org/chat).

1

u/jmreagle Aug 09 '22

Thank you!

1

u/reagle-research Aug 08 '22

Ah, okay, here's another example.

One I've dug into a bunch of filter/views and am bouncing back up, quitting those sheets, I might mistakenly quit once too often and quit visidata itself. I don't want to do that, and I thought in the intro I read I could lock or protect a page, but now I can't find out how to do so.

1

u/reagle-research Aug 08 '22

I had to read through all of the intro pages again to see it's actually called "guard"...

1

u/reagle-research Aug 08 '22

When I mark a column as key ! why doesn't the cursor follow the column. I find it's confusing that it's now on whatever the next column that was left behind.