n0v1c3 / vira

Create and update your Jira issues while inside Vim!
MIT License
94 stars 12 forks source link

How to create custom filters? #80

Closed xbot closed 2 years ago

xbot commented 2 years ago

I know how to set the default filter, but there are times when I want to filter issues on other conditions, for now, I have to reset the current filter and set them one by one, it's ineffective and stupid.

Is it possible to preset some groups of filters and switch to one of them with a single hotkey?

mikeboiko commented 2 years ago

I can recommend 2 methods:

  1. Run :ViraFilterEdit
  2. Configure all your filters in vira_projects.yaml Then set some mappings to jump between them. This is useful to jump between jira projects as well.
    nnoremap <silent> <leader>vbm :ViraLoadProject __default__<cr>:ViraIssues<cr>
    nnoremap <silent> <leader>vbv :ViraLoadProject vira<cr>:ViraIssues<cr>
    nnoremap <silent> <leader>vbw :ViraLoadProject Work<cr>:ViraIssues<cr>
xbot commented 2 years ago

Thanks for your answer.

Yeah, that's what I do for now, but it's not elegant and counter-intuitive. Not considering implementing something like custom filters?

Mike @.***> 于2022年8月10日周三 00:34写道:

Closed #80 https://github.com/n0v1c3/vira/issues/80 as completed.

— Reply to this email directly, view it on GitHub https://github.com/n0v1c3/vira/issues/80#event-7157120368, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAIEZ2K6MEOFUQC4CWCK7F3VYKB7RANCNFSM557ZNTIA . You are receiving this because you authored the thread.Message ID: @.***>

mikeboiko commented 2 years ago

I'm not sure if I understand exactly what you're proposing with "custom filters". Feel free to make a PR though.