Last active
July 9, 2020 04:17
-
-
Save ajkerrigan/9627c7b7fc12320e086edbfef4352138 to your computer and use it in GitHub Desktop.
VisiData - Hide non-key columns to the right
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from visidata import TableSheet | |
| @TableSheet.api | |
| def hide_cols_right(sheet, idx): | |
| for col in (c for c in sheet.visibleCols[idx + 1:] if not c.keycol): | |
| col.hide() | |
| TableSheet.addCommand( | |
| "gz-", | |
| "hide-cols-right", | |
| "sheet.hide_cols_right(cursorVisibleColIndex)", | |
| "hide non-key columns to the right of the cursor" | |
| ) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment