diff options
| author | John Isom <John.Isom2001@gmail.com> | 2020-07-28 14:18:09 -0600 |
|---|---|---|
| committer | John Isom <John.Isom2001@gmail.com> | 2020-07-28 14:58:42 -0600 |
| commit | 94ab56d123c07b0318583ac10d45706a1729e58f (patch) | |
| tree | 0f9688a178d931fbdd8e51a3376bc89fc855f4e2 /rc/filetype/php.kak | |
| parent | 85d5f503767238cb3b73a5e578f9354dd11ab669 (diff) | |
Fix indentation rule for php.kak
Diffstat (limited to 'rc/filetype/php.kak')
| -rw-r--r-- | rc/filetype/php.kak | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/rc/filetype/php.kak b/rc/filetype/php.kak index e296b4fa..6ecd8728 100644 --- a/rc/filetype/php.kak +++ b/rc/filetype/php.kak @@ -23,7 +23,7 @@ hook -group php-highlight global WinSetOption filetype=php %{ hook -once -always window WinSetOption filetype=.* %{ remove-highlighter window/php-file } } -provide-module php %( +provide-module php %§ require-module html # Highlighters @@ -93,7 +93,9 @@ define-command -hidden php-indent-on-new-line %< try %_ execute-keys -draft k <a-x> <a-k> ^\h*[[{]|[[{]$ <ret> j <a-gt> _ # append " * " on lines starting a multiline /** or /* comment try %{ execute-keys -draft k <a-x> s ^\h*/[*][* ]? <ret> j gi i <space>*<space> } + # deindent closer token(s) when after cursor + try %_ execute-keys -draft <a-x> <a-k>^\h*[})]+\h*$<ret> hm <a-S> 1<a-&> _ > > -) +§ |
