Cleanup the various trailing space removal hooks

This commit is contained in:
Maxime Coste 2015-11-04 09:48:47 +00:00
parent 9b90e6ec02
commit beab7dbf41
19 changed files with 38 additions and 92 deletions

View File

@ -29,11 +29,8 @@ addhl -group /cabal/code regex ^\h*([A-Za-z][A-Za-z0-9_-]*)\h*: 1:identifier
# ‾‾‾‾‾‾‾‾
def -hidden _cabal_filter_around_selections %{
eval -draft -itersel %{
exec <a-x>
# remove trailing white spaces
try %{ exec -draft s \h+$ <ret> d }
}
# remove trailing white spaces
try %{ exec -draft -itersel <a-x> s \h+$ <ret> d }
}
def -hidden _cabal_indent_on_new_line %[

View File

@ -50,11 +50,8 @@ addhl -group /coffee/code regex \<(break|case|catch|class|const|continue|debugge
# ‾‾‾‾‾‾‾‾
def -hidden _coffee_filter_around_selections %{
eval -draft -itersel %{
exec <a-x>
# remove trailing white spaces
try %{ exec -draft s \h+$ <ret> d }
}
# remove trailing white spaces
try %{ exec -draft -itersel <a-x> s \h+$ <ret> d }
}
def -hidden _coffee_indent_on_new_line %{

View File

@ -41,11 +41,8 @@ addhl -group /css/selector regex [*]|[#.][A-Za-z][A-Za-z0-9_-]* 0:identifier
# ‾‾‾‾‾‾‾‾
def -hidden _css_filter_around_selections %{
eval -draft -itersel %{
exec <a-x>
# remove trailing white spaces
try %{ exec -draft s \h+$ <ret> d }
}
# remove trailing white spaces
try %{ exec -draft -itersel <a-x> s \h+$ <ret> d }
}
def -hidden _css_indent_on_new_line %[

View File

@ -61,11 +61,8 @@ addhl -group /cucumber/code regex \<(Feature|Business\h+Need|Ability|Background|
# ‾‾‾‾‾‾‾‾
def -hidden _cucumber_filter_around_selections %{
eval -draft -itersel %{
exec <a-x>
# remove trailing white spaces
try %{ exec -draft s \h+$ <ret> d }
}
# remove trailing white spaces
try %{ exec -draft -itersel <a-x> s \h+$ <ret> d }
}
def -hidden _cucumber_indent_on_new_line %{

View File

@ -34,11 +34,8 @@ addhl -group /fish/code regex \<(and|begin|bg|bind|block|break|breakpoint|builti
# ‾‾‾‾‾‾‾‾
def -hidden _fish_filter_around_selections %{
eval -draft -itersel %{
exec <a-x>
# remove trailing white spaces
try %{ exec -draft s \h+$ <ret> d }
}
# remove trailing white spaces
try %{ exec -draft -itersel <a-x> s \h+$ <ret> d }
}
def -hidden _fish_indent_on_char %{

View File

@ -38,11 +38,8 @@ addhl -group /haml/code regex ^\h*%([A-Za-z][A-Za-z0-9_-]*)([#.][A-Za-z][A-Za-z0
# ‾‾‾‾‾‾‾‾
def -hidden _haml_filter_around_selections %{
eval -draft -itersel %{
exec <a-x>
# remove trailing white spaces
try %{ exec -draft s \h+$ <ret> d }
}
# remove trailing white spaces
try %{ exec -draft -itersel <a-x> s \h+$ <ret> d }
}
def -hidden _haml_indent_on_new_line %{

View File

@ -36,11 +36,8 @@ addhl -group /haskell/code regex \<(Int|Integer|Char|Bool|Float|Double|IO|Void|A
# http://en.wikibooks.org/wiki/Haskell/Indentation
def -hidden _haskell_filter_around_selections %{
eval -draft -itersel %{
exec <a-x>
# remove trailing white spaces
try %{ exec -draft s \h+$ <ret> d }
}
# remove trailing white spaces
try %{ exec -draft -itersel <a-x> s \h+$ <ret> d }
}
def -hidden _haskell_indent_on_new_line %{

View File

@ -38,11 +38,8 @@ addhl -group /html/tag/content/string fill string
# ‾‾‾‾‾‾‾‾
def -hidden _html_filter_around_selections %{
eval -draft -itersel %{
exec <a-x>
# remove trailing white spaces
try %{ exec -draft s \h+$ <ret> d }
}
# remove trailing white spaces
try %{ exec -draft -itersel <a-x> s \h+$ <ret> d }
}
def -hidden _html_indent_on_char %{

View File

@ -40,11 +40,8 @@ addhl -group /javascript/code regex \<(break|case|catch|class|const|continue|deb
# ‾‾‾‾‾‾‾‾
def -hidden _javascript_filter_around_selections %{
eval -draft -itersel %{
exec <a-x>
# remove trailing white spaces
try %{ exec -draft s \h+$ <ret> d }
}
# remove trailing white spaces
try %{ exec -draft -itersel <a-x> s \h+$ <ret> d }
}
def -hidden _javascript_indent_on_char %<

View File

@ -26,11 +26,8 @@ addhl -group /json/code regex \<(true|false|null)\> 0:value
# ‾‾‾‾‾‾‾‾
def -hidden _json_filter_around_selections %{
eval -draft -itersel %{
exec <a-x>
# remove trailing white spaces
try %{ exec -draft s \h+$ <ret> d }
}
# remove trailing white spaces
try %{ exec -draft -itersel <a-x> s \h+$ <ret> d }
}
def -hidden _json_indent_on_char "

View File

@ -31,11 +31,8 @@ addhl -group /lisp/code regex \<(def[a-z]+|if|do|let|lambda|catch|and|assert|whi
# ‾‾‾‾‾‾‾‾
def -hidden _lisp_filter_around_selections %{
eval -draft -itersel %{
exec <a-x>
# remove trailing white spaces
try %{ exec -draft s \h+$ <ret> d }
}
# remove trailing white spaces
try %{ exec -draft -itersel <a-x> s \h+$ <ret> d }
}
def -hidden _lisp_indent_on_new_line %{

View File

@ -52,8 +52,8 @@ def -hidden _markdown_indent_on_new_line %{
eval -draft -itersel %{
# preserve previous line indent
try %{ exec -draft <space> K <a-&> }
# filter previous line
try %{ exec -draft k : _markdown_filter_around_selections <ret> }
# remove trailing white spaces
try %{ exec -draft -itersel %{ k<a-x> s \h+$ <ret> d } }
# 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 }
}

View File

@ -38,11 +38,8 @@ addhl -group /python/code regex \<(bool|buffer|bytearray|complex|dict|file|float
# ‾‾‾‾‾‾‾‾
def -hidden _python_filter_around_selections %{
eval -draft -itersel %{
exec <a-x>
# remove trailing white spaces
try %{ exec -draft s \h+$ <ret> d }
}
# remove trailing white spaces
try %{ exec -draft -itersel <a-x> s \h+$ <ret> d }
}
def -hidden _python_indent_on_new_line %{

View File

@ -34,11 +34,8 @@ addhl -group /ragel/code regex \<(action|alnum|alpha|any|ascii|case|cntrl|contai
# ‾‾‾‾‾‾‾‾
def -hidden _ragel_filter_around_selections %{
eval -draft -itersel %{
exec <a-x>
# remove trailing white spaces
try %{ exec -draft s \h+$ <ret> d }
}
# remove trailing white spaces
try %{ exec -draft -itersel <a-x> s \h+$ <ret> d }
}
def -hidden _ragel_indent_on_char "

View File

@ -60,11 +60,8 @@ addhl -group /ruby/code regex \<(alias|and|begin|break|case|class|def|defined|do
# ‾‾‾‾‾‾‾‾
def -hidden _ruby_filter_around_selections %{
eval -draft -itersel %{
exec <a-x>
# remove trailing white spaces
try %{ exec -draft s \h+$ <ret> d }
}
# remove trailing white spaces
try %{ exec -draft -itersel <a-x> s \h+$ <ret> d }
}
def -hidden _ruby_indent_on_char "

View File

@ -36,11 +36,8 @@ addhl -group /rust/code regex \<(Share|Copy|Send|Sized|Add|Sub|Mul|Div|Rem|Neg|N
# ‾‾‾‾‾‾‾‾
def -hidden _rust_filter_around_selections %{
eval -draft -itersel %{
exec <a-x>
# remove trailing white spaces
try %{ exec -draft s \h+$ <ret> d }
}
# remove trailing white spaces
try %{ exec -draft -itersel <a-x> s \h+$ <ret> d }
}
def -hidden _rust_indent_on_new_line %~

View File

@ -34,11 +34,8 @@ addhl -group /sass/code regex !important 0:keyword
# ‾‾‾‾‾‾‾‾
def -hidden _sass_filter_around_selections %{
eval -draft -itersel %{
exec <a-x>
# remove trailing white spaces
try %{ exec -draft s \h+$ <ret> d }
}
# remove trailing white spaces
try %{ exec -draft -itersel <a-x> s \h+$ <ret> d }
}
def -hidden _sass_indent_on_new_line %{

View File

@ -39,11 +39,8 @@ addhl -group /scala/code regex "'[_A-Za-z0-9$]+" 0:identifier
# ‾‾‾‾‾‾‾‾
def -hidden _scala_filter_around_selections %{
eval -draft -itersel %{
exec <a-x>
# remove trailing white spaces
try %{ exec -draft s \h+$ <ret> d }
}
# remove trailing white spaces
try %{ exec -draft -itersel <a-x> s \h+$ <ret> d }
}
def -hidden _scala_indent_on_new_line %[

View File

@ -32,11 +32,8 @@ addhl -group /yaml/code regex \<(true|false|null)\> 0:value
# ‾‾‾‾‾‾‾‾
def -hidden _yaml_filter_around_selections %{
eval -draft -itersel %{
exec <a-x>
# remove trailing white spaces
try %{ exec -draft s \h+$ <ret> d }
}
# remove trailing white spaces
try %{ exec -draft -itersel <a-x> s \h+$ <ret> d }
}
def -hidden _yaml_indent_on_new_line %{