Created
October 13, 2021 19:04
-
-
Save saulpw/2c293d8963b66a87d443c07af2b4314a to your computer and use it in GitHub Desktop.
visidata command to slide current row to the right
This file contains 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
TableSheet.addCommand('zL', 'slide-cells-right', ''' | |
for oldcol, newcol in reversed(list(zip(visibleCols[cursorVisibleColIndex:], visibleCols[cursorVisibleColIndex+1:]))): | |
newcol.setValue(cursorRow, oldcol.getValue(cursorRow)) | |
visibleCols[cursorVisibleColIndex].setValue(cursorRow, None) | |
''', 'slide cells in current row one column to the right') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment