From ad06f3f92cc5e2a5cebe7ebe6f8451aded0ecf08 Mon Sep 17 00:00:00 2001 From: Frank LENORMAND Date: Thu, 10 Mar 2016 15:08:01 +0200 Subject: [PATCH] Remove hooks that trim trailing whitespaces --- rc/base/ruby.kak | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/rc/base/ruby.kak b/rc/base/ruby.kak index 1454b8b8..fe4272fe 100644 --- a/rc/base/ruby.kak +++ b/rc/base/ruby.kak @@ -61,14 +61,6 @@ addhl -group /ruby/code regex \<(alias|and|begin|break|case|class|def|defined|do # Commands # ‾‾‾‾‾‾‾‾ -def -hidden _ruby_filter_around_selections %{ - eval -draft -itersel %{ - exec - # remove trailing white spaces - try %{ exec -draft s \h + $ d } - } -} - def -hidden _ruby_indent_on_char %{ eval -draft -itersel %{ # align middle and end structures to start @@ -83,8 +75,6 @@ def -hidden _ruby_indent_on_new_line %{ eval -draft -itersel %{ # preserve previous line indent try %{ exec -draft K } - # filter previous line - try %{ exec -draft k : _ruby_filter_around_selections } # copy _#_ comment prefix and following white spaces try %{ exec -draft k x s ^ \h * \K \# \h * y j p } # indent after start structure @@ -103,7 +93,6 @@ def -hidden _ruby_indent_on_new_line %{ hook global WinSetOption filetype=ruby %{ addhl ref ruby - hook window InsertEnd .* -group ruby-hooks _ruby_filter_around_selections hook window InsertChar .* -group ruby-indent _ruby_indent_on_char hook window InsertChar \n -group ruby-indent _ruby_indent_on_new_line