/usr/share/kak/rc/extra/taskpaper.kak is in kakoune 0~2016.12.20.1.3a6167ae-1build1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 | # https://www.taskpaper.com
# ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾
# Detection
# ‾‾‾‾‾‾‾‾‾
hook global BufCreate .*\.taskpaper %{
set buffer filetype taskpaper
}
# Highlighters
# ‾‾‾‾‾‾‾‾‾‾‾‾
addhl -group / group taskpaper
addhl -group /taskpaper regex ^\h*([^:\n]+):\h*\n 1:header
addhl -group /taskpaper regex \h@\w+(?:\(([^)]*)\))? 0:identifier 1:value
addhl -group /taskpaper regex ^\h*([^-:\n]+)\n 1:+i
addhl -group /taskpaper regex ^\h*-\h+[^\n]*@done[^\n]* 0:+d
addhl -group /taskpaper regex (([a-z]+://\S+)|((mailto:)[\w+-]+@\S+)) 0:link
# Commands
# ‾‾‾‾‾‾‾‾
def -hidden _taskpaper-indent-on-new-line %{
eval -draft -itersel %{
# preserve previous line indent
try %{ exec -draft \;K<a-&> }
## If the line above is a project indent with a tab
try %{ exec -draft Z k<a-x> <a-k>^\h*([^:\n]+):<ret> z i<tab> }
# cleanup trailing white spaces on previous line
try %{ exec -draft k<a-x> s \h+$ <ret>d }
}
}
# Initialization
# ‾‾‾‾‾‾‾‾‾‾‾‾‾‾
hook -group taskpaper-highlight global WinSetOption filetype=taskpaper %{
addhl ref taskpaper
hook window InsertChar \n -group taskpaper-indent _taskpaper-indent-on-new-line
}
hook -group taskpaper-highlight global WinSetOption filetype=(?!taskpaper).* %{
rmhl taskpaper
rmhooks window taskpaper-indent
}
|