tbabej / vit

Placeholder to demostrate issue porting for VIT.
0 stars 0 forks source link

[VT-112] <Esc> cannot be used in .vitrc -- makes impossible to delete remembered prompt #111

Open tbabej opened 6 years ago

tbabej commented 6 years ago

PeterN on 2015-01-11T21:09:53Z says:

I want to configure vit to show me filtered tasks on function keys. I.e., by pressing , I want to see only tasks with project:work, on I want to see tasks with project:home. The straightforward way to implement this is to define key mappings in .vitrc which press "f" and follow with filter specification finished with . The problem is, when a filter is already defined, there is no way to remove it easily by a simple key sequence in .vitrc. In running vit, one can press twice and vit resets the tasklist into one without a filter. However using in the script does not yield a good result, it simply is not a useful key. According to man vitrc, Esc is not a usable key either.

To fix this, I suggest either: 1.- implement a vit specific command (bound to e.g., "F") which will start an empty filtering prompt right away; or 2.- completely remove the filter recall functionality.

I am attaching a patch implementing 2.

BTW, similar behaviour in mutt and .muttrc works fine thanks to the functionality I described in #VT-110. So if #VT-110 is implemented properly (as in mutt), this bug would go away too as a sideeffect.

tbabej commented 6 years ago

Migrated metadata:

Created: 2015-01-11T21:09:53Z
Modified: 2015-01-12T17:33:45Z
tbabej commented 6 years ago

Scott Kostyshak on 2015-01-12T00:26:19Z says:

This is good to know. I like that you often make references to Mutt. Knowing how other software interfaces work adds strength to the arguments and helps us plan sensible interfaces for VIT.

The following vitrc shortcut actually works for me:

map <F1>=f<Esc>fproject:work<Return>

What does it do for you?

Which version of VIT are you using ('vit --version' works if you have a new version)? For me I have $ vit --version vit-1.3.dev (f5b8e84)

Note that VIT's git repository uses the same structure as taskwarrior's. So if you want to try the newest VIT development version, you have to checkout that version specifically. Any dev work (none at the moment) is done on branch 1.3 right now. The mast branch has the last stable release (1.2).

tbabej commented 6 years ago

PeterN on 2015-01-12T09:14:39Z says:

I use vit 1.2, i.e., the git master branch. The mapping you suggest did not work properly in 1.2. I will give a try to the 1.3-devel version later.

As for comparisons to mutt, what I like on taskwarrior/vit is the same as in mutt: it provides a barebones functionality and I can mold it into whatever I want/need/like. Therefore, I would like the tool not to try to second-guess me, rather let me know configure it at will.

tbabej commented 6 years ago

Scott Kostyshak on 2015-01-12T17:33:45Z says:

I use vit 1.2, i.e., the git master branch. The mapping you suggest did not work properly in 1.2. I will give a try to the 1.3-devel version later.

Great, please let me know what you find on 1.3-devel. I would like to release it in a couple of months, after adding maybe one or two easy and risk-free fixes to the issues that you've brought up.

As for comparisons to mutt, what I like on taskwarrior/vit is the same as in mutt: it provides a barebones functionality and I can mold it into whatever I want/need/like. Therefore, I would like the tool not to try to second-guess me, rather let me know configure it at will.

Yes, I would like that as well.