Skip to content

Instantly share code, notes, and snippets.

@ajkerrigan
Last active July 9, 2020 04:17
Show Gist options
  • Select an option

  • Save ajkerrigan/9627c7b7fc12320e086edbfef4352138 to your computer and use it in GitHub Desktop.

Select an option

Save ajkerrigan/9627c7b7fc12320e086edbfef4352138 to your computer and use it in GitHub Desktop.
VisiData - Hide non-key columns to the right
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