Merge remote-tracking branch 'danr/fix-copy-previous-indent'
This commit is contained in:
commit
7dae25c33f
|
@ -45,7 +45,7 @@ def -hidden _haskell_indent_on_new_line %{
|
||||||
# filter previous line
|
# filter previous line
|
||||||
try %{ exec -draft k : _haskell_filter_around_selections <ret> }
|
try %{ exec -draft k : _haskell_filter_around_selections <ret> }
|
||||||
# copy -- comments prefix and following white spaces
|
# copy -- comments prefix and following white spaces
|
||||||
try %{ exec -draft k x s ^\h*\K--\h* <ret> y j p }
|
try %{ exec -draft k x s ^\h*\K--\h* <ret> y gh j P }
|
||||||
# indent after lines beginning with condition or ending with expression or =(
|
# indent after lines beginning with condition or ending with expression or =(
|
||||||
try %{ exec -draft <space> k x <a-k> ^\h*(if)|(case\h+[\w']+\h+of|do|let|where|[=(])$ <ret> j <a-gt> }
|
try %{ exec -draft <space> k x <a-k> ^\h*(if)|(case\h+[\w']+\h+of|do|let|where|[=(])$ <ret> j <a-gt> }
|
||||||
}
|
}
|
||||||
|
|
|
@ -53,7 +53,7 @@ def -hidden _javascript_indent_on_new_line %<
|
||||||
# filter previous line
|
# filter previous line
|
||||||
try %{ exec -draft k : _javascript_filter_around_selections <ret> }
|
try %{ exec -draft k : _javascript_filter_around_selections <ret> }
|
||||||
# copy // comments prefix and following white spaces
|
# copy // comments prefix and following white spaces
|
||||||
try %{ exec -draft k x s ^\h*\K#\h* <ret> y j p }
|
try %{ exec -draft k x s ^\h*\K#\h* <ret> y gh j P }
|
||||||
# indent after lines beginning / ending with opener token
|
# indent after lines beginning / ending with opener token
|
||||||
try %_ exec -draft k x <a-k> ^\h*[[{]|[[{]$ <ret> j <a-gt> _
|
try %_ exec -draft k x <a-k> ^\h*[[{]|[[{]$ <ret> j <a-gt> _
|
||||||
>
|
>
|
||||||
|
|
|
@ -131,7 +131,7 @@ def -hidden _markdown_indent_on_new_line %{
|
||||||
# remove trailing white spaces
|
# remove trailing white spaces
|
||||||
try %{ exec -draft -itersel %{ k<a-x> s \h+$ <ret> d } }
|
try %{ exec -draft -itersel %{ k<a-x> s \h+$ <ret> d } }
|
||||||
# copy block quote(s), list item prefix and following white spaces
|
# copy block quote(s), list item prefix and following white spaces
|
||||||
try %{ exec -draft k x s ^\h*\K((>\h*)|[*+-])+\h* <ret> y j p }
|
try %{ exec -draft k x s ^\h*\K((>\h*)|[*+-])+\h* <ret> y gh j P }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -132,7 +132,7 @@ def -hidden _ruby_indent_on_new_line %{
|
||||||
def -hidden _ruby_insert_on_new_line %{
|
def -hidden _ruby_insert_on_new_line %{
|
||||||
eval -no-hooks -draft -itersel %{
|
eval -no-hooks -draft -itersel %{
|
||||||
# copy _#_ comment prefix and following white spaces
|
# copy _#_ comment prefix and following white spaces
|
||||||
try %{ exec -draft k x s ^ \h * \K \# \h * <ret> y j p }
|
try %{ exec -draft k x s ^ \h * \K \# \h * <ret> y gh j P }
|
||||||
# wisely add end structure
|
# wisely add end structure
|
||||||
eval -save-regs x %{
|
eval -save-regs x %{
|
||||||
try %{ exec -draft k x s ^ \h + <ret> \" x y } catch %{ reg x '' }
|
try %{ exec -draft k x s ^ \h + <ret> \" x y } catch %{ reg x '' }
|
||||||
|
|
|
@ -46,7 +46,7 @@ def -hidden _rust_indent_on_new_line %~
|
||||||
# filter previous line
|
# filter previous line
|
||||||
try %{ exec -draft k : _rust_filter_around_selections <ret> }
|
try %{ exec -draft k : _rust_filter_around_selections <ret> }
|
||||||
# copy // comments prefix and following white spaces
|
# copy // comments prefix and following white spaces
|
||||||
try %{ exec -draft k x s ^\h*\K//\h* <ret> y j p }
|
try %{ exec -draft k x s ^\h*\K//\h* <ret> y gh j P }
|
||||||
# indent after lines ending with { or (
|
# indent after lines ending with { or (
|
||||||
try %[ exec -draft k <a-x> <a-k> [{(]\h*$ <ret> j <a-gt> ]
|
try %[ exec -draft k <a-x> <a-k> [{(]\h*$ <ret> j <a-gt> ]
|
||||||
# align to opening paren of previous line
|
# align to opening paren of previous line
|
||||||
|
|
|
@ -46,7 +46,7 @@ def -hidden _scala_indent_on_new_line %[
|
||||||
# filter previous line
|
# filter previous line
|
||||||
try %[ exec -draft k : _scala_filter_around_selections <ret> ]
|
try %[ exec -draft k : _scala_filter_around_selections <ret> ]
|
||||||
# copy // comments prefix and following white spaces
|
# copy // comments prefix and following white spaces
|
||||||
try %[ exec -draft k x s ^\h*\K#\h* <ret> y j p ]
|
try %[ exec -draft k x s ^\h*\K#\h* <ret> y gh j P ]
|
||||||
# indent after lines ending with {
|
# indent after lines ending with {
|
||||||
try %[ exec -draft k x <a-k> \{$ <ret> j <a-gt> ]
|
try %[ exec -draft k x <a-k> \{$ <ret> j <a-gt> ]
|
||||||
]
|
]
|
||||||
|
|
|
@ -39,7 +39,7 @@ def -hidden _yaml_indent_on_new_line %{
|
||||||
# filter previous line
|
# filter previous line
|
||||||
try %{ exec -draft k : _yaml_filter_around_selections <ret> }
|
try %{ exec -draft k : _yaml_filter_around_selections <ret> }
|
||||||
# copy '#' comment prefix and following white spaces
|
# copy '#' comment prefix and following white spaces
|
||||||
try %{ exec -draft k x s ^\h*\K#\h* <ret> y j p }
|
try %{ exec -draft k x s ^\h*\K#\h* <ret> y gh j P }
|
||||||
# indent after :
|
# indent after :
|
||||||
try %{ exec -draft <space> k x <a-k> :$ <ret> j <a-gt> }
|
try %{ exec -draft <space> k x <a-k> :$ <ret> j <a-gt> }
|
||||||
}
|
}
|
||||||
|
|
|
@ -36,7 +36,7 @@ def -hidden _cabal_indent_on_new_line %[
|
||||||
# filter previous line
|
# filter previous line
|
||||||
try %[ exec -draft k : _cabal_filter_around_selections <ret> ]
|
try %[ exec -draft k : _cabal_filter_around_selections <ret> ]
|
||||||
# copy '#' comment prefix and following white spaces
|
# copy '#' comment prefix and following white spaces
|
||||||
try %[ exec -draft k x s ^\h*\K#\h* <ret> y j p ]
|
try %[ exec -draft k x s ^\h*\K#\h* <ret> y gh j P ]
|
||||||
# indent after lines ending with { or :
|
# indent after lines ending with { or :
|
||||||
try %[ exec -draft <space> k x <a-k> [:{]$ <ret> j <a-gt> ]
|
try %[ exec -draft <space> k x <a-k> [:{]$ <ret> j <a-gt> ]
|
||||||
]
|
]
|
||||||
|
|
|
@ -60,7 +60,7 @@ def -hidden _coffee_indent_on_new_line %{
|
||||||
# filter previous line
|
# filter previous line
|
||||||
try %{ exec -draft k : _coffee_filter_around_selections <ret> }
|
try %{ exec -draft k : _coffee_filter_around_selections <ret> }
|
||||||
# copy '#' comment prefix and following white spaces
|
# copy '#' comment prefix and following white spaces
|
||||||
try %{ exec -draft k x s ^ \h * \K \# \h * <ret> y j p }
|
try %{ exec -draft k x s ^ \h * \K \# \h * <ret> y gh j P }
|
||||||
# indent after start structure
|
# indent after start structure
|
||||||
try %{ exec -draft k x <a-k> ^ \h * (case|catch|class|else|finally|for|function|if|switch|try|while|with) \b | (=|->) $ <ret> j <a-gt> }
|
try %{ exec -draft k x <a-k> ^ \h * (case|catch|class|else|finally|for|function|if|switch|try|while|with) \b | (=|->) $ <ret> j <a-gt> }
|
||||||
}
|
}
|
||||||
|
|
|
@ -68,7 +68,7 @@ def -hidden _cucumber_indent_on_new_line %{
|
||||||
# filter previous line
|
# filter previous line
|
||||||
try %{ exec -draft k : _cucumber_filter_around_selections <ret> }
|
try %{ exec -draft k : _cucumber_filter_around_selections <ret> }
|
||||||
# copy '#' comment prefix and following white spaces
|
# copy '#' comment prefix and following white spaces
|
||||||
try %{ exec -draft k x s ^\h*\K#\h* <ret> y j p }
|
try %{ exec -draft k x s ^\h*\K#\h* <ret> y gh j P }
|
||||||
# indent after lines containing :
|
# indent after lines containing :
|
||||||
try %{ exec -draft <space> k x <a-k> : <ret> j <a-gt> }
|
try %{ exec -draft <space> k x <a-k> : <ret> j <a-gt> }
|
||||||
}
|
}
|
||||||
|
|
|
@ -45,7 +45,7 @@ def -hidden _haml_indent_on_new_line %{
|
||||||
# filter previous line
|
# filter previous line
|
||||||
try %{ exec -draft k : _haml_filter_around_selections <ret> }
|
try %{ exec -draft k : _haml_filter_around_selections <ret> }
|
||||||
# copy '/' comment prefix and following white spaces
|
# copy '/' comment prefix and following white spaces
|
||||||
try %{ exec -draft k x s ^\h*\K/\h* <ret> y j p }
|
try %{ exec -draft k x s ^\h*\K/\h* <ret> y gh j P }
|
||||||
# indent after lines beginning with : or -
|
# indent after lines beginning with : or -
|
||||||
try %{ exec -draft k x <a-k> ^\h*[:-] <ret> j <a-gt> }
|
try %{ exec -draft k x <a-k> ^\h*[:-] <ret> j <a-gt> }
|
||||||
}
|
}
|
||||||
|
|
|
@ -81,7 +81,7 @@ def -hidden _moon_indent_on_new_line %{
|
||||||
# filter previous line
|
# filter previous line
|
||||||
try %{ exec -draft k : _moon_filter_around_selections <ret> }
|
try %{ exec -draft k : _moon_filter_around_selections <ret> }
|
||||||
# copy -- comment prefix and following white spaces
|
# copy -- comment prefix and following white spaces
|
||||||
try %{ exec -draft k x s ^ \h * \K -- \h * <ret> y j p }
|
try %{ exec -draft k x s ^ \h * \K -- \h * <ret> y gh j P }
|
||||||
# indent after start structure
|
# indent after start structure
|
||||||
try %{ exec -draft k x <a-k> ^ \h * (class|else(if)?|for|if|switch|unless|when|while|with) \b | ([:=]|[-=]>) $ <ret> j <a-gt> }
|
try %{ exec -draft k x <a-k> ^ \h * (class|else(if)?|for|if|switch|unless|when|while|with) \b | ([:=]|[-=]>) $ <ret> j <a-gt> }
|
||||||
# deindent after return statements
|
# deindent after return statements
|
||||||
|
|
|
@ -50,7 +50,7 @@ def -hidden _php_indent_on_new_line %<
|
||||||
# filter previous line
|
# filter previous line
|
||||||
try %{ exec -draft k : _php_filter_around_selections <ret> }
|
try %{ exec -draft k : _php_filter_around_selections <ret> }
|
||||||
# copy // comments prefix and following white spaces
|
# copy // comments prefix and following white spaces
|
||||||
try %{ exec -draft k x s ^\h*\K#\h* <ret> y j p }
|
try %{ exec -draft k x s ^\h*\K#\h* <ret> y gh j P }
|
||||||
# indent after lines beginning / ending with opener token
|
# indent after lines beginning / ending with opener token
|
||||||
try %_ exec -draft k x <a-k> ^\h*[[{]|[[{]$ <ret> j <a-gt> _
|
try %_ exec -draft k x <a-k> ^\h*[[{]|[[{]$ <ret> j <a-gt> _
|
||||||
>
|
>
|
||||||
|
|
|
@ -56,7 +56,7 @@ def -hidden _pug_indent_on_new_line %{
|
||||||
# filter previous line
|
# filter previous line
|
||||||
try %{ exec -draft k : _pug_filter_around_selections <ret> }
|
try %{ exec -draft k : _pug_filter_around_selections <ret> }
|
||||||
# copy '//', '|', '-' or '(!)=' prefix and following whitespace
|
# copy '//', '|', '-' or '(!)=' prefix and following whitespace
|
||||||
try %{ exec -draft k x s ^\h*\K[/|!=-]{1,2}\h* <ret> y j p }
|
try %{ exec -draft k x s ^\h*\K[/|!=-]{1,2}\h* <ret> y gh j P }
|
||||||
# indent unless we copied something above
|
# indent unless we copied something above
|
||||||
try %{ exec -draft <a-gt> <space> b s \S <ret> g l <a-lt> }
|
try %{ exec -draft <a-gt> <space> b s \S <ret> g l <a-lt> }
|
||||||
}
|
}
|
||||||
|
|
|
@ -49,7 +49,7 @@ def -hidden _ragel_indent_on_new_line %<
|
||||||
# filter previous line
|
# filter previous line
|
||||||
try %{ exec -draft k : _ragel_filter_around_selections <ret> }
|
try %{ exec -draft k : _ragel_filter_around_selections <ret> }
|
||||||
# copy _#_ comment prefix and following white spaces
|
# copy _#_ comment prefix and following white spaces
|
||||||
try %{ exec -draft k x s ^\h*\K#\h* <ret> y j p }
|
try %{ exec -draft k x s ^\h*\K#\h* <ret> y gh j P }
|
||||||
# indent after lines ending with opener token
|
# indent after lines ending with opener token
|
||||||
try %< exec -draft k x <a-k> [[{(*]$ <ret> j <a-gt> >
|
try %< exec -draft k x <a-k> [[{(*]$ <ret> j <a-gt> >
|
||||||
>
|
>
|
||||||
|
|
|
@ -41,7 +41,7 @@ def -hidden _sass_indent_on_new_line %{
|
||||||
# filter previous line
|
# filter previous line
|
||||||
try %{ exec -draft k : _sass_filter_around_selections <ret> }
|
try %{ exec -draft k : _sass_filter_around_selections <ret> }
|
||||||
# copy '/' comment prefix and following white spaces
|
# copy '/' comment prefix and following white spaces
|
||||||
try %{ exec -draft k x s ^\h*\K/\h* <ret> y j p }
|
try %{ exec -draft k x s ^\h*\K/\h* <ret> y gh j P }
|
||||||
# avoid indent after properties and comments
|
# avoid indent after properties and comments
|
||||||
try %{ exec -draft k x <a-K> [:/] <ret> j <a-gt> }
|
try %{ exec -draft k x <a-K> [:/] <ret> j <a-gt> }
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user