1. handle escape character; 2. handle items filtering based on entered letters; 3. redraw UI when the filter changes; 4. TODO handle selection changes via arrows, hjkl; 5. TODO handle selection after Enter has been pressed;
16 lines
260 B
Python
16 lines
260 B
Python
import vim
|
|
|
|
|
|
class Vim:
|
|
@classmethod
|
|
def run_command(cls, cmd) -> list[str]:
|
|
# logger.info(dict(cmd=cmd))
|
|
|
|
output: list[str] = []
|
|
for line in cmd.splitlines():
|
|
if line.strip() == '':
|
|
continue
|
|
output.append(vim.command(line))
|
|
|
|
return output
|