From 68cdfb9b9d677391399f99e2ca26b4aedd14c85c Mon Sep 17 00:00:00 2001 From: Dmitry Matveyev Date: Fri, 21 Jun 2019 13:55:14 +0300 Subject: [PATCH] Add more ending blocks for ruby "end" keyword autoinsertion --- rc/filetype/ruby.kak | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rc/filetype/ruby.kak b/rc/filetype/ruby.kak index 43c3d2fd..4f6cc631 100644 --- a/rc/filetype/ruby.kak +++ b/rc/filetype/ruby.kak @@ -169,7 +169,7 @@ define-command -hidden ruby-insert-on-new-line %[ # Check if previous line opens a block execute-keys -draft k ^x(begin|case|class|def|for|if|module|unless|until|while|.+\bdo$|.+\bdo\h\|.+(?=\|))\b # 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 ^xend$ + execute-keys -draft }i J ^x(end|else|elsif|rescue)\b ] execute-keys -draft oxend # insert a new line with containing end ]