papis: Change key bindings

Unified key bindings roughly to

localleader=, anything with `,` in front will affect the current
documents somehow (e.g. mark them read, add a tag, ..).
jumpto=' prepending with `'` will affect the current view
(e.g. limit to unread documents, limit to entries with notes, ..).

Sorting can be done with `S`, like in vifm.
Display style can be toggled to table with `T`.
This commit is contained in:
Marty Oehme 2023-08-31 12:23:34 +02:00
parent 248f171f48
commit 01405b9438
Signed by: Marty
GPG key ID: EDBF2ED917B2EF6A

View file

@ -62,7 +62,8 @@ documentlist:
keymappings: keymappings:
q: quit q: quit
"?": help "?": help
S: toggle_style T: toggle_style
S: cmd "sort "
/: search_mode /: search_mode
<key_down>: scroll_down <key_down>: scroll_down
<key_up>: scroll_up <key_up>: scroll_up
@ -74,29 +75,87 @@ keymappings:
k: scroll_up k: scroll_up
o: open -r "pdf$" o: open -r "pdf$"
O: open -d O: open -d
r: view_reset b: browse
R: reload B: browse -k doi
e: edit R: view_reset
n: papis edit -n papis_id:{doc['papis_id']} <c-r>: reload
e:
- edit
- edit info
n:
- papis edit -n papis_id:{doc['papis_id']}
- edit notes
"'n":
- search "notes:.+"
- limit to entries with notes
"'u":
- search "readstatus:read OR readstatus:skimmed"
- limit to unread entries
"'r":
- search "NOT readstatus:read AND NOT readstatus:skimmed"
- limit to read entries
" ": mark_selected " ": mark_selected
mm: mark_selected mm: mark_selected
M: mark_down M: mark_down
J: mark_down
mu: unmark_all mu: unmark_all
mv: mark_view mv: mark_view
t: cmd "tag " ",r":
- papis update -s readstatus read papis_id:{doc['papis_id']}
- set readstatus read
",k":
- papis update -s readstatus skimmed papis_id:{doc['papis_id']}
- set readstatus skimmed
",u":
- papis update -s readstatus "" papis_id:{doc['papis_id']}
- set readstatus unread
",t": cmd "tag "
i: i:
- info_toggle - info_toggle
- "Toggle info window" - "Toggle info window"
I: I:
- info_cycle - info_cycle
- "Cycle info windows" - "Cycle info windows"
<ctrl-p>: info_scroll_up
<ctrl-n>: info_scroll_down
# all require 'clip' script to be available on PATH
yy:
- copy_to_clipboard "[@{doc['ref']}]"
- yank pandoc-styled reference
ss:
- vim_send "[@{doc['ref']}]"
- send vim pandoc-styled reference
yl:
- copy_to_clipboard "\\cite\{{doc['ref']}\}"
- yank latex-styled reference
sl:
- vim_send "\\cite\{{doc['ref']}\}"
- send vim latex-styled reference
yr:
- copy_to_clipboard "{format_reference(doc,style='apa')}"
- yank apa-styled reference
sr:
- vim_send "{format_reference(doc,style='apa')}"
- send vim apa-styled reference
yt:
- copy_to_clipboard "{doc['title']}"
- yank title
yu:
- copy_to_clipboard "{doc['url']}"
- yank url
yd:
- copy_to_clipboard "{doc['doi']}"
- yank doi
# TODO look into https://github.com/supersambo/papis-tui vim-send mappings # TODO look into https://github.com/supersambo/papis-tui vim-send mappings
infowindow: infowindow:
default_on: False default_on: False
views: views:
doc:
content: "author: {doc['author'].strip()}\n title: {doc['title'].strip()}\n tags:{doc['tags'] if isinstance(doc['tags'], str) else doc.foreach('tags', '{}', sep=', ')}"
height: 8
apa: apa:
content: "{format_reference(doc)}" content: "{format_reference(doc,style='apa')}"
abstract: abstract:
content: "{doc['abstract']}" content: "{doc['abstract']}"
linewrap: True linewrap: True