From 7bf235b0ee0ea368067ac61dd62b4dc06fd1d85e Mon Sep 17 00:00:00 2001 From: Jimmy Thrasher Date: Wed, 24 Jan 2018 14:19:52 -0500 Subject: [PATCH] Add heredoc support for ruby.kak --- rc/base/ruby.kak | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/rc/base/ruby.kak b/rc/base/ruby.kak index edd11633..756363f7 100644 --- a/rc/base/ruby.kak +++ b/rc/base/ruby.kak @@ -11,7 +11,7 @@ hook global BufCreate .*(([.](rb))|(irbrc)|(pryrc)|(Capfile|[.]cap)|(Gemfile)|(G # Highlighters # ‾‾‾‾‾‾‾‾‾‾‾‾ -add-highlighter shared/ regions -default code ruby \ +add-highlighter shared/ regions -default code -match-capture ruby \ double_string '"' (? < \ + heredoc '<<-?(\w+)' '^\h*(\w+)$' '' \ division '[\w\)\]](/|(\h+/\h+))' '\w' '' # Help Kakoune to better detect /…/ literals # Regular expression flags are: i → ignore case, m → multi-lines, o → only interpolate #{} blocks once, x → extended mode (ignore white spaces) @@ -32,6 +33,7 @@ add-highlighter shared/ruby/double_string regions regions interpolation \Q#{ \} add-highlighter shared/ruby/double_string/regions/interpolation fill meta add-highlighter shared/ruby/single_string fill string +add-highlighter shared/ruby/heredoc fill string add-highlighter shared/ruby/backtick fill meta add-highlighter shared/ruby/backtick regions regions interpolation \Q#{ \} \{