mirror of
https://github.com/mawww/kakoune.git
synced 2024-11-10 04:51:53 +03:00
doc.kak: Use a github compatible anchor generation
Convert session names to lowercase and replace spaces with minus to generate anchor names.
This commit is contained in:
parent
b8fdcff7b0
commit
8aa35c0724
@ -83,7 +83,7 @@ command *q!* has to be used). Aliases are mentionned below each commands.
|
||||
|
||||
*-markup*:::
|
||||
expand the markup strings in *text* (See
|
||||
<<expansions#Markup strings,`:doc expansions 'Markup strings'`>>)
|
||||
<<expansions#markup-strings,`:doc expansions markup-strings`>>)
|
||||
|
||||
*-debug*:::
|
||||
print the given text to the *\*debug** buffer
|
||||
@ -138,7 +138,7 @@ command *q!* has to be used). Aliases are mentionned below each commands.
|
||||
|
||||
*define-command* [<flags>] <name> <command>::
|
||||
*alias* def +
|
||||
define a new command (c.f. the 'Declaring new commands' section below)
|
||||
define a new command (See <<declaring-new-commands,Declaring new commands>>)
|
||||
|
||||
*map* <scope> <mode> <key> <keys>::
|
||||
bind a list of keys to a combination (See <<mapping#,`:doc mapping`>>)
|
||||
|
@ -39,7 +39,7 @@ define-command -hidden doc-parse-anchors %{
|
||||
# Find sections as add them as imlicit anchors
|
||||
execute-keys \%s ^={2,}\h+([^\n]+)$ <ret>
|
||||
evaluate-commands -itersel %{
|
||||
set-option -add buffer doc_anchors "%val{selection_desc}|%reg{1}"
|
||||
set-option -add buffer doc_anchors "%val{selection_desc}|%sh{printf '%s' \"$kak_reg_1\" | tr '[A-Z ]' '[a-z-]'}"
|
||||
}
|
||||
|
||||
# Parse explicit anchors and remove their text
|
||||
|
Loading…
Reference in New Issue
Block a user