From 70238522f83f9d99b3a09d993bde617f2396874e Mon Sep 17 00:00:00 2001 From: midichef <67946319+midichef@users.noreply.github.com> Date: Thu, 28 Nov 2024 15:58:49 -0800 Subject: [PATCH] [features-] add sysedit-cell command, using external editor --- visidata/features/sysedit.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/visidata/features/sysedit.py b/visidata/features/sysedit.py index 6f44ef1a0..90da2b04c 100644 --- a/visidata/features/sysedit.py +++ b/visidata/features/sysedit.py @@ -1,5 +1,5 @@ from copy import copy -from visidata import vd, asyncthread, Path, Sheet, IndexSheet +from visidata import vd, asyncthread, Path, Sheet, IndexSheet, TableSheet @Sheet.api @@ -40,4 +40,5 @@ def syseditCells_async(sheet, cols, rows, filetype=None): col.setValuesTyped(rows, *[tempcol.getTypedValue(r) for r in tempvs.rows]) +TableSheet.addCommand('^O', 'sysedit-cell', 'cursorCol.setValues([cursorRow], vd.launchExternalEditor(cursorDisplay))', 'edit current cell in external $EDITOR') Sheet.addCommand('g^O', 'sysedit-selected', 'syseditCells(visibleCols, onlySelectedRows)', 'edit rows in $EDITOR')