diff --git a/rc/filetype/vhdl.kak b/rc/filetype/vhdl.kak index bceab2f21..05a2e9337 100644 --- a/rc/filetype/vhdl.kak +++ b/rc/filetype/vhdl.kak @@ -182,7 +182,7 @@ define-command -hidden vhdl-insert-on-new-line %[ evaluate-commands %[ try %[ # Validate previous line and that it is not closed yet. - execute-keys -draft kx ^\h*(?i)((then|(.*:\h*)?if\b.*\bthen)$) j}ijx ^x(?i)end\b + execute-keys -draft kx ^\h*(?i)((then|(.*:\h*)?if\b.*\bthen)$) j}ijx ^x(?i)(elsif|else|end)\b # Don't add for "if ... generate", it requires "end generate;". execute-keys -draft kx (?i)\bgenerate\b execute-keys -draft oxendif @@ -191,7 +191,7 @@ define-command -hidden vhdl-insert-on-new-line %[ # Wisely add "end generate;". evaluate-commands %[ try %[ - execute-keys -draft kx ^\h*(?i).*\bgenerate$ j}ijx ^x(?i)(begin|end|else)\b + execute-keys -draft kx ^\h*(?i).*\bgenerate$ j}ijx ^x(?i)(begin|elsif|else|end)\b # Don't add in case of comment line. execute-keys -draft kx ^\h*-- execute-keys -draft oxendgenerate