# current issues/requests
# - [ ] call arbitrary shell command
# - [ ] non-blocking opening of files
# - [ ] distinguish in config between aliases for multiline/table
# - [ ] update view after more operations
# - if I call an 'update' command (e.g. set new tag or read status), it will not update in list until 'edit' command invoked and rebuilding the list
# - two selection additions:
# - [ ] select all in view
# - [ ] limit view to currently selected
#
base:
vimflavour: nvim
documentlist:
defaultstyle: multiline
marked-icon: ""
multilinestyle:
rows:
# TODO: show if already note attached; have info window display note content?
- "{' ' if 'priority' not in doc or doc['priority'] > 3 else ' ' if doc['priority'] <= 1 else ' '}{doc.alias('type')} {doc['ref']} {doc.alias('readstatus')} {' ' if doc['notes'] else ''}"
- "{doc.html_escape['title']}"
- "{doc.html_escape['author']}"
- "{doc.foreach('tags', '({})', split = ', ', sep = ' ')}"
tablestyle:
separator: " "
headerstyle: "underline|bold"
rowstyle: "white_bg"
cursorrowstyle: "black_white|bold"
columns:
- {
header: "",
content: "{'' if 'priority' not in doc or doc['priority'] > 3 else '' if doc['priority'] <= 1 else ''}",
width: 1,
}
- {
header: "",
content: "{'' if doc['readstatus'] == 'read' else '' if doc['readstatus'] == 'skimmed' else ' '}",
width: 1,
}
- {
header: "",
content: "{'' if doc['notes'] else '' if doc['note'] else ' '}",
width: 1,
}
- {
header: "",
content: "{doc.alias('type')}",
width: 1,
}
- { header: "Authors", content: "{doc['author']}", width: 25 }
- { header: "Year", content: "{str(doc['year'])}", width: 4 }
- { header: "Title", content: "{doc['title']}", width: 125 }
- { header: "Reference", content: "{doc['ref']}", width: 15 }
- {
header: "",
content: "{str(len(doc.get_files()) if len(doc.get_files()) > 0 else '')}",
width: 1,
}
- { header: "Tags", content: "{doc['tags'] if isinstance(doc['tags'], str) else doc.foreach('tags', '{}', sep=', ')}", width: 35 }
aliases:
type:
{
article: "",
book: "",
inbook: "",
incollection: "",
software: "",
presentation: "",
thesis: "",
techreport: "",
_default_: "",
}
readstatus:
{
read: "",
skimmed: ""
}
keymappings:
q: quit
"?": help
T: toggle_style
S: cmd "sort "
/: search_mode
: scroll_down
: scroll_up
: page_down
: page_up
G: jump_to_bottom
gg: jump_to_top
j: scroll_down
k: scroll_up
o: open -r "pdf$"
O: open -d
b: browse
B: browse -k doi
R: view_reset
: 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 read entries
"'r":
- search "NOT readstatus:read AND NOT readstatus:skimmed"
- limit to unread 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
",ph":
- papis update -s priority 1 papis_id:{doc['papis_id']}
- set priority high
",pm":
- papis update -s priority 2 read papis_id:{doc['papis_id']}
- set priority medium
",pl":
- papis update -s priority 3 read papis_id:{doc['papis_id']}
- set priority low
i:
- info_toggle
- "Toggle info window"
I:
- info_cycle
- "Cycle info windows"
: info_scroll_up
: 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,style='apa')}"
abstract:
content: "{doc['abstract']}"
linewrap: True
height: 8
commandline:
search:
keyword_aliases: { a: "author:", t: "title:", y: "year:", k: "tags:" }
statusbar:
left:
default: " {info['mode_upper']} "
normal: " {info['mode_upper']} "
command: " {info['mode_upper']} "
select: " {info['mode_upper']} "
search: " {info['mode_upper']} "
right:
default: "{info['sortkeys']} {info['idx']} < {info['marked']} < {info['view']} < {info['items']} "