AutoYADM commit: 2025-06-23 14:40:14
This commit is contained in:
parent
dc956a9ae8
commit
d2b0e6155d
2 changed files with 3 additions and 2 deletions
|
@ -19,13 +19,12 @@ define-command -hidden autowrap-cursor %{ evaluate-commands -save-regs '/"|^@m'
|
|||
reg m "%val{selections_desc}"
|
||||
|
||||
## if we're adding characters past the limit, just wrap them around
|
||||
## DANIEL: added <esc>ghH<a-&> to preserve prev line indent when wrapping.
|
||||
## PATCH: added <esc>ghH<a-&> to preserve prev line indent when wrapping.
|
||||
execute-keys -draft "<a-h><a-k>.{%opt{autowrap_column}}\h*[^\s]*<ret>1s(\h+)[^\h]*\z<ret>c<ret><esc>ghH<a-&>"
|
||||
} catch %{
|
||||
## if we're adding characters in the middle of a sentence, use
|
||||
## the `fmtcmd` command to wrap the entire paragraph
|
||||
evaluate-commands %sh{
|
||||
notify-send "this runs"
|
||||
if [ "${kak_opt_autowrap_format_paragraph}" = true ] \
|
||||
&& [ -n "${kak_opt_autowrap_fmtcmd}" ]; then
|
||||
format_cmd=$(printf %s "${kak_opt_autowrap_fmtcmd}" \
|
||||
|
|
|
@ -24,6 +24,8 @@ hook global WinSetOption filetype=toml %{
|
|||
|
||||
hook global WinSetOption filetype=latex %{
|
||||
set-option window formatcmd "tex-fmt --stdin"
|
||||
set-option window autowrap_fmtcmd 'tex-fmt --stdin -l %c'
|
||||
set-option window autowrap_format_paragraph true
|
||||
hook -group latex-auto-format window BufWritePre .* %{
|
||||
try format
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue