taskell icon indicating copy to clipboard operation
taskell copied to clipboard

Support for cursor navigation like vim/nano when editing text

Open yohannes opened this issue 6 years ago • 9 comments

Hi! Is there support for keyboard shortcuts to navigate cursor when inserting or editing text? I've tried vim-style or nano-style shortcuts but none works.

yohannes avatar Jul 12 '19 03:07 yohannes

Currently it's just the arrow keys for navigating around text.

smallhadroncollider avatar Jul 12 '19 07:07 smallhadroncollider

Is it a pain point that others may have shared as well?

yohannes avatar Jul 18 '19 08:07 yohannes

Are there any particular behaviours you'd like to see?

smallhadroncollider avatar Jul 18 '19 10:07 smallhadroncollider

For me, the ideal behavior would be like most console apps (and Pentadactyl browser addon :-D) do: invoke $EDITOR for all nontrivial text editing (eg. task titles no, task descriptions yes).

machinedgod avatar Jul 18 '19 13:07 machinedgod

As in, load up vim/nano, then when you save back to taskell?

smallhadroncollider avatar Jul 18 '19 15:07 smallhadroncollider

Precisely that. Could probably be optional behavior, that triggers on a hotkey, so you can do quick inline edits as normal, and pop into editor of choice when needed.

This seems, to me, a better alternative than implementing vim keys.

machinedgod avatar Jul 18 '19 15:07 machinedgod

I'll have a think about that. Might be a bit jarring, but if it was optional then that's a choice folks could make.

smallhadroncollider avatar Jul 18 '19 16:07 smallhadroncollider

Are there any particular behaviours you'd like to see?

Nothing fancy really. Some of my tasks can be quite descriptive and sometimes, I need to edit certain words for example due to typo somewhere in the beginning of the line for example. So using the navigation keys is cumbersome since I can't jump to the beginning (or end) of the title or jump by words to reach it faster. I think for simplicity using Nano's shortucts w/ CTRL + [keys] is sufficient for cursor navigation. No need to have it opened in external editor. Thoughts?

yohannes avatar Jul 19 '19 06:07 yohannes

Unfortunately modifier keys really don't work well with Brick (the CLI package taskell is built on top of), which limits what I can do to some extent. Apparently it's because different terminals do things very differently. And I'm not sure I could add it without modifier keys.

smallhadroncollider avatar Jul 19 '19 10:07 smallhadroncollider