This file is indexed.

/usr/share/kak/rc/base/markdown.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
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
# http://daringfireball.net/projects/markdown
# ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾

# Detection
# ‾‾‾‾‾‾‾‾‾

hook global BufCreate .*[.](markdown|md|mkd) %{
    set buffer filetype markdown
}

# Highlighters
# ‾‾‾‾‾‾‾‾‾‾‾‾

addhl -group / regions -default content markdown \
    c          ```c          ```          '' \
    cabal      ```cabal      ```          '' \
    clojure    ```clojure    ```          '' \
    coffee     ```coffee     ```          '' \
    cpp        ```cpp        ```          '' \
    css        ```css        ```          '' \
    cucumber   ```cucumber   ```          '' \
    d          ```d          ```          '' \
    diff       ```diff       ```          '' \
    dockerfile ```dockerfile ```          '' \
    fish       ```fish       ```          '' \
    gas        ```gas        ```          '' \
    go         ```go         ```          '' \
    haml       ```haml       ```          '' \
    haskell    ```haskell    ```          '' \
    html       ```html       ```          '' \
    ini        ```ini        ```          '' \
    java       ```java       ```          '' \
    javascript ```javascript ```          '' \
    json       ```json       ```          '' \
    julia      ```julia      ```          '' \
    kak        ```kak        ```          '' \
    kickstart  ```kickstart  ```          '' \
    latex      ```latex      ```          '' \
    lisp       ```lisp       ```          '' \
    lua        ```lua        ```          '' \
    makefile   ```makefile   ```          '' \
    moon       ```moon       ```          '' \
    objc       ```objc       ```          '' \
    perl       ```perl       ```          '' \
    pug        ```pug        ```          '' \
    python     ```python     ```          '' \
    ragel      ```ragel      ```          '' \
    ruby       ```ruby       ```          '' \
    rust       ```rust       ```          '' \
    sass       ```sass       ```          '' \
    scala      ```scala      ```          '' \
    scss       ```scss       ```          '' \
    sh         ```sh         ```          '' \
    swift      ```swift      ```          '' \
    tupfile    ```tupfile    ```          '' \
    yaml       ```yaml       ```          '' \
    code       ```           ```          '' \
    code       ``            ``           '' \
    code       `             `            ''

addhl -group /markdown/code fill meta

addhl -group /markdown/c          ref c
addhl -group /markdown/cabal      ref cabal
addhl -group /markdown/clojure    ref clojure
addhl -group /markdown/coffee     ref coffee
addhl -group /markdown/cpp        ref cpp
addhl -group /markdown/css        ref css
addhl -group /markdown/cucumber   ref cucumber
addhl -group /markdown/d          ref d
addhl -group /markdown/diff       ref diff
addhl -group /markdown/dockerfile ref dockerfile
addhl -group /markdown/fish       ref fish
addhl -group /markdown/gas        ref gas
addhl -group /markdown/go         ref go
addhl -group /markdown/haml       ref haml
addhl -group /markdown/haskell    ref haskell
addhl -group /markdown/html       ref html
addhl -group /markdown/ini        ref ini
addhl -group /markdown/java       ref java
addhl -group /markdown/javascript ref javascript
addhl -group /markdown/json       ref json
addhl -group /markdown/julia      ref julia
addhl -group /markdown/kak        ref kak
addhl -group /markdown/kickstart  ref kickstart
addhl -group /markdown/latex      ref latex
addhl -group /markdown/lisp       ref lisp
addhl -group /markdown/lua        ref lua
addhl -group /markdown/makefile   ref makefile
addhl -group /markdown/moon       ref moon
addhl -group /markdown/objc       ref objc
addhl -group /markdown/perl       ref perl
addhl -group /markdown/pug        ref pug
addhl -group /markdown/python     ref python
addhl -group /markdown/ragel      ref ragel
addhl -group /markdown/ruby       ref ruby
addhl -group /markdown/rust       ref rust
addhl -group /markdown/sass       ref sass
addhl -group /markdown/scala      ref scala
addhl -group /markdown/scss       ref scss
addhl -group /markdown/sh         ref sh
addhl -group /markdown/swift      ref swift
addhl -group /markdown/tupfile    ref tupfile
addhl -group /markdown/yaml       ref yaml

# Setext-style header
addhl -group /markdown/content regex (\A|\n\n)[^\n]+\n={2,}\h*\n\h*$ 0:title
addhl -group /markdown/content regex (\A|\n\n)[^\n]+\n-{2,}\h*\n\h*$ 0:header

# Atx-style header
addhl -group /markdown/content regex ^(#+)(\h+)([^\n]+) 1:header

addhl -group /markdown/content regex ^\h?+((?:[\s\t]+)?[-\*])\h+[^\n]*(\n\h+[^-\*]\S+[^\n]*\n)*$ 0:list 1:bullet
addhl -group /markdown/content regex ^([-=~]+)\n[^\n\h].*?\n\1$ 0:block
addhl -group /markdown/content regex \B\+[^\n]+?\+\B 0:mono
addhl -group /markdown/content regex \B\*[^\n]+?\*\B 0:italic
addhl -group /markdown/content regex \b_[^\n]+?_\b 0:italic
addhl -group /markdown/content regex \B\*\*[^\n]+?\*\*\B 0:bold
addhl -group /markdown/content regex \B__[^\n]+?__\B 0:bold
addhl -group /markdown/content regex <(([a-z]+://.*?)|((mailto:)?[\w+-]+@[a-z]+[.][a-z]+))> 0:link
addhl -group /markdown/content regex ^\h*(>\h*)+ 0:comment
addhl -group /markdown/content regex \H\K\h\h$ 0:PrimarySelection

# Commands
# ‾‾‾‾‾‾‾‾

def -hidden _markdown_indent_on_new_line %{
    eval -draft -itersel %{
        # preserve previous line indent
        try %{ exec -draft <space> K <a-&> }
        # remove trailing white spaces
        try %{ exec -draft -itersel %{ k<a-x> s \h+$ <ret> d } }
        # copy block quote(s), list item prefix and following white spaces
        try %{ exec -draft k x s ^\h*\K((>\h*)|[*+-])+\h* <ret> y j p }
    }
}

# Initialization
# ‾‾‾‾‾‾‾‾‾‾‾‾‾‾

hook -group markdown-highlight global WinSetOption filetype=markdown %{ addhl ref markdown }

hook global WinSetOption filetype=markdown %{
    hook window InsertChar \n -group markdown-indent _markdown_indent_on_new_line
}

hook -group markdown-highlight global WinSetOption filetype=(?!markdown).* %{ rmhl markdown }

hook global WinSetOption filetype=(?!markdown).* %{
    rmhooks window markdown-indent
}