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
1 changed files with 66 additions and 7 deletions

View File

@ -62,7 +62,8 @@ documentlist:
keymappings:
q: quit
"?": help
S: toggle_style
T: toggle_style
S: cmd "sort "
/: search_mode
<key_down>: scroll_down
<key_up>: scroll_up
@ -74,29 +75,87 @@ keymappings:
k: scroll_up
o: open -r "pdf$"
O: open -d
r: view_reset
R: reload
e: edit
n: papis edit -n papis_id:{doc['papis_id']}
b: browse
B: browse -k doi
R: view_reset
<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
mm: mark_selected
M: mark_down
J: mark_down
mu: unmark_all
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:
- info_toggle
- "Toggle info window"
I:
- info_cycle
- "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
infowindow:
default_on: False
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:
content: "{format_reference(doc)}"
content: "{format_reference(doc,style='apa')}"
abstract:
content: "{doc['abstract']}"
linewrap: True