Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add bindings for hide/show current cursor column in columns sheet. #2394

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 6 additions & 1 deletion visidata/metasheets.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ class ColumnsSheet(Sheet):
Some new commands on this sheet operate on all selected columns on the source sheet:

- {help.commands.hide_selected}
- {help.commands.hide_current}
- {help.commands.show_current}
- {help.commands.key_selected}
- {help.commands.key_off_selected}
- {help.commands.type_int_selected}
Expand Down Expand Up @@ -138,7 +140,10 @@ def join_cols(sheet):
ColumnsSheet.addCommand('g!', 'key-selected', 'for c in onlySelectedRows: c.sheet.setKeys([c])', 'toggle selected source columns as key columns')
ColumnsSheet.addCommand('gz!', 'key-off-selected', 'for c in onlySelectedRows: c.sheet.unsetKeys([c])', 'unset selected source columns as key columns')

ColumnsSheet.addCommand('g-', 'hide-selected', 'onlySelectedRows.hide()', 'hide selected source columns')
ColumnsSheet.addCommand('g-', 'hide-selected', 'onlySelectedRows.hide(True)', 'hide selected source columns')
ColumnsSheet.addCommand('-', 'hide-current', 'cursorRow.hide(True); cursorDown(1)', 'hide current source column')
ColumnsSheet.addCommand('+', 'show-current', 'cursorRow.hide(False); cursorDown(1)', 'show current source column')

ColumnsSheet.addCommand(None, 'resize-source-rows-max', 'for c in selectedRows or [cursorRow]: c.setWidth(c.getMaxWidth(c.sheet.visibleRows))', 'adjust widths of selected source columns')

ColumnsSheet.addCommand('g%', 'type-float-selected', 'onlySelectedRows.type=float', 'set type of selected source columns to float')
Expand Down