AutoYADM commit: 2025-07-26 18:19:36
This commit is contained in:
parent
ef79ece47e
commit
0d40c01bbe
1 changed files with 9 additions and 5 deletions
|
@ -191,13 +191,17 @@ hook global BufWritePost .*/\.config/niri/.*\.kdl(##.+)? %{
|
|||
}
|
||||
|
||||
declare-filetype-mode markdown
|
||||
define-command -params 0..1 markdown-code-block %{
|
||||
execute-keys 'o```<esc>o```<esc><c-l>kA'
|
||||
hook -once window InsertKey <ret> %{
|
||||
execute-keys '<c-l>'
|
||||
define-command -docstring %{
|
||||
markdown-code-block [<lang>]: inserts a markdown code block with
|
||||
optional language id.
|
||||
} -params 0..1 markdown-code-block %{
|
||||
evaluate-commands -save-regs a %{
|
||||
set-register a %arg{1}
|
||||
execute-keys "o```<c-r>a<ret>```<esc><a-O>k"
|
||||
try %{ tree-sitter-buffer-update }
|
||||
}
|
||||
}
|
||||
map -docstring 'codeblock' global markdown ` ': markdown-code-block<ret>'
|
||||
map -docstring 'codeblock' global markdown ` ': markdown-code-block<space>'
|
||||
map -docstring 'bold' global markdown b ':surround-add-pair "**" "**"<ret>'
|
||||
map -docstring 'unbold' global markdown <a-b> ':surround-delete-key *<ret>:surround-delete-key *<ret>'
|
||||
map -docstring 'emph' global markdown e ':surround-add-pair "_" "_"<ret>'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue