mirror of
https://github.com/mawww/kakoune.git
synced 2024-12-28 22:22:41 +03:00
Add 'when' to list of keywords that signifies end for ruby-insert-on-new-line
This commit is contained in:
parent
d6e3c1ff19
commit
322d0659fd
@ -169,7 +169,7 @@ define-command -hidden ruby-insert-on-new-line %[
|
||||
# Check if previous line opens a block
|
||||
execute-keys -draft k<a-x> <a-k>^<c-r>x(begin|case|class|def|for|if|module|unless|until|while|.+\bdo$|.+\bdo\h\|.+(?=\|))[^0-9A-Za-z_!?]<ret>
|
||||
# Check that we do not already have an end for this indent level which is first set via `ruby-indent-on-new-line` hook
|
||||
execute-keys -draft }i J <a-x> <a-K> ^<c-r>x(end|else|elsif|rescue)[^0-9A-Za-z_!?]<ret>
|
||||
execute-keys -draft }i J <a-x> <a-K> ^<c-r>x(end|else|elsif|rescue|when)[^0-9A-Za-z_!?]<ret>
|
||||
]
|
||||
execute-keys -draft o<c-r>xend<esc> # insert a new line with containing end
|
||||
]
|
||||
|
Loading…
Reference in New Issue
Block a user