freitass / todo.txt-vim

Vim plugin for Todo.txt
488 stars 121 forks source link

add focus/ignore mappings #67

Open ramses0 opened 6 years ago

ramses0 commented 6 years ago

Given more todo.txt items than fit on the screen...

I am aware of <leader>s.... for sorting by priority, tag, context, etc.

This patch adds <leader>f, <leader>i mnemonic focus/ignore for word under cursor.

Use case is to navigate to a tag (/+work), and then <leader>f which maintains previous sort, but brings all items with that tag up to the top of the file (focus). Conversely: /+home<cr>, <leader>i would "ignore" items tagged with home.

Please try it out, give feedback, and consider for inclusion. With local leader of , the interaction would be something like:

,s              ... sort todos by default priority
/+work<cr>      ... search for "work"
,f              ... "focus" on work (word under cursor, move to top)
/+personal<cr>  ... search for "personal"
,i              ... "ignore" personal (word under cursor, move to bottom)
ggn             ... go back to "personal" block at bottom of file
VG              ... visually grab "personal" through end of file
,jk             ... de-prioritize all "personal" items
,s              ... re-sort by priority

...if there is interest in the feature / functionality, or improvements to it, I'd be willing to try and champion a feature like this and integrate feedback, etc.