-
Hi, I am trying to create an auto-completer/suggestion tool for when I edit a cell, which pulls values from other entries on the same column (similar to what most spreadsheet editors have). There might a function that already achieves this in visidata but I couldn't find it. I am trying to use the vd.input() method, but I cannot to get the completer or updater to work. I guess I am not sure exactly what type the completer and/or updater should be.
I have also tried to use the prompt method from prompt_toolkit but it returns a python object instead of a string. Any hints would be greatly appreciated. Cheers. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Hi @ECon87, the completer is a function which gets the string up until the cursor, and an index (integer) which increases/decreases with repeated Tab/Shift-Tab. The completer function should return the string to replace it with (or empty to leave it alone). The updater function is called every keystroke or timeout, to update the screen outside the input area. |
Beta Was this translation helpful? Give feedback.
Hi @ECon87, the completer is a function which gets the string up until the cursor, and an index (integer) which increases/decreases with repeated Tab/Shift-Tab. The completer function should return the string to replace it with (or empty to leave it alone).
The updater function is called every keystroke or timeout, to update the screen outside the input area.