mirror of
https://github.com/mawww/kakoune.git
synced 2024-12-02 00:46:42 +03:00
VHDL filetype: Fix if statement behavior.
This commit is contained in:
parent
f3a05d41cb
commit
ce18ac9918
@ -182,7 +182,7 @@ define-command -hidden vhdl-insert-on-new-line %[
|
|||||||
evaluate-commands %[
|
evaluate-commands %[
|
||||||
try %[
|
try %[
|
||||||
# Validate previous line and that it is not closed yet.
|
# Validate previous line and that it is not closed yet.
|
||||||
execute-keys -draft kx <a-k>^\h*(?i)((then|(.*:\h*)?if\b.*\bthen)$)<ret> j}ijx <a-K>^<c-r>x(?i)end\b<ret>
|
execute-keys -draft kx <a-k>^\h*(?i)((then|(.*:\h*)?if\b.*\bthen)$)<ret> j}ijx <a-K>^<c-r>x(?i)(elsif|else|end)\b<ret>
|
||||||
# Don't add for "if ... generate", it requires "end generate;".
|
# Don't add for "if ... generate", it requires "end generate;".
|
||||||
execute-keys -draft kx <a-K>(?i)\bgenerate\b<ret>
|
execute-keys -draft kx <a-K>(?i)\bgenerate\b<ret>
|
||||||
execute-keys -draft o<c-r>xend<space>if<semicolon><esc>
|
execute-keys -draft o<c-r>xend<space>if<semicolon><esc>
|
||||||
@ -191,7 +191,7 @@ define-command -hidden vhdl-insert-on-new-line %[
|
|||||||
# Wisely add "end generate;".
|
# Wisely add "end generate;".
|
||||||
evaluate-commands %[
|
evaluate-commands %[
|
||||||
try %[
|
try %[
|
||||||
execute-keys -draft kx <a-k>^\h*(?i).*\bgenerate$<ret> j}ijx <a-K>^<c-r>x(?i)(begin|end|else)\b<ret>
|
execute-keys -draft kx <a-k>^\h*(?i).*\bgenerate$<ret> j}ijx <a-K>^<c-r>x(?i)(begin|elsif|else|end)\b<ret>
|
||||||
# Don't add in case of comment line.
|
# Don't add in case of comment line.
|
||||||
execute-keys -draft kx <a-K>^\h*--<ret>
|
execute-keys -draft kx <a-K>^\h*--<ret>
|
||||||
execute-keys -draft o<c-r>xend<space>generate<semicolon><esc>
|
execute-keys -draft o<c-r>xend<space>generate<semicolon><esc>
|
||||||
|
Loading…
Reference in New Issue
Block a user