blakesweeney / unite-taskwarrior

A unite.vim interface to taskwarrior
6 stars 2 forks source link

< LEFT > and < RIGHT > key navigation #38

Closed linuxcaffe closed 9 years ago

linuxcaffe commented 9 years ago

(continued from comments)

Several excellent left-right window layouts have emerged. There are "left" and "right" actions available for window-splitting, and yet the left and right keys are not yet mapped. This issue is to discuss options for using left and right arrow key as a central part of unite-taskwarrior's controls.

linuxcaffe commented 9 years ago

this discussion is a bit early, I still have to figure out what;s possible and what's easy, but wanted to sort of discuss a utw interface modality. Take this with a grain of salt.

the basic sources all (initially) generate a simple list, The tasklist is now a comfortable 80cols, but several of the others might naturally produce a narrower list (without any splits or previews) . Launching any of these core "sources" (reports, whatever) from a vim-session might be as reference to that one narrower list, and in that case (imho, because we read left-to-right) should open in a left-split in the current buffer, by (configurable) default.

HIt "q" to restore the buffer,< CR > to open an item, OR (because you want to dig deeper) hit < Right > to take over the buffer, and open a preview pane on the right. The focus is still on the left-split list, and items can be selected with the up and down arrows. Hitting "q" with the focus on the left should close both the list and the preview.

From here there may be many actions available, < CR > opens the selected item in a new buffer(?), but < Right > keeps the split and moves the focus to the right for viewing or editing (where applicable). After editing, what should happen? Hitting "q" should close the right part of the split, leaving the list on the left of the original buffer, but the < Left > arrow should retain the right-left layout, moving the focus back to the list.

that's it, in a nutshell, fwiw

linuxcaffe commented 9 years ago

default < leader >T keymaps could typically go directly to the split/preview layout.. or not ;-)

linuxcaffe commented 9 years ago

this issue (for now) could be boiled down to;

bind < Right > to open -auto-preview -vertical-preview

and it's not very important ;-)

blakesweeney commented 9 years ago

That would probably be a suggested mapping. We could put it in the wiki and the like. I'm not fond of having default mappings in vim plugins, they too easily conflict with users mappings (or at least too often conflict with mine). I would prefer to provide a nice set of suggested mappings.

linuxcaffe commented 9 years ago

I agree, optional mappings