Merge remote-tracking branch 'm-kru/go_kak_fix' into master
This commit is contained in:
commit
57208a5481
|
@ -134,7 +134,7 @@ define-command -hidden go-insert-on-new-line %[
|
|||
try %[ execute-keys -draft k<a-x>s^\h+<ret>"xy ] catch %[ reg x '' ]
|
||||
try %[
|
||||
# Validate previous line and that it is not closed yet.
|
||||
execute-keys -draft k<a-x> <a-k>^<c-r>x.*\{\h*\(?\h*$<ret> J}iJ<a-x> <a-K>^<c-r>x(\)?\h*\})$<ret>
|
||||
execute-keys -draft k<a-x> <a-k>^<c-r>x.*\{\h*\(?\h*$<ret> j}iJ<a-x> <a-K>^<c-r>x\)?\h*\}<ret>
|
||||
# Insert closing '}'.
|
||||
execute-keys -draft o<c-r>x}<esc>
|
||||
# Delete trailing '}' on the line below the '{'.
|
||||
|
@ -148,7 +148,7 @@ define-command -hidden go-insert-on-new-line %[
|
|||
try %[ execute-keys -draft k<a-x>s^\h+<ret>"xy ] catch %[ reg x '' ]
|
||||
try %[
|
||||
# Validate previous line and that it is not closed yet.
|
||||
execute-keys -draft k<a-x> <a-k>^<c-r>x.*\(\h*$<ret> J}iJ<a-x> <a-K>^<c-r>x(\)\h*\}?)$<ret>
|
||||
execute-keys -draft k<a-x> <a-k>^<c-r>x.*\(\h*$<ret> J}iJ<a-x> <a-K>^<c-r>x\)<ret>
|
||||
# Insert closing ')'.
|
||||
execute-keys -draft o<c-r>x)<esc>
|
||||
# Delete trailing ')' on the line below the '('.
|
||||
|
|
|
@ -41,3 +41,9 @@
|
|||
12
|
||||
{(
|
||||
bar()%( ))}
|
||||
|
||||
13
|
||||
a := []int{
|
||||
someFunction(%( )
|
||||
),
|
||||
}
|
||||
|
|
|
@ -56,3 +56,10 @@
|
|||
{(
|
||||
bar()
|
||||
)}
|
||||
|
||||
13
|
||||
a := []int{
|
||||
someFunction(
|
||||
|
||||
),
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user