File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -17,6 +17,7 @@ let b:switch_definitions =
1717 \ g: switch_builtins .rspec_expect,
1818 \ g: switch_builtins .rspec_to,
1919 \ g: switch_builtins .rspec_be_truthy_falsey,
20+ \ g: switch_builtins .ruby_keyword_string,
2021 \ g: switch_builtins .ruby_string,
2122 \ g: switch_builtins .ruby_short_blocks,
2223 \ g: switch_builtins .ruby_array_shorthand,
Original file line number Diff line number Diff line change @@ -52,11 +52,15 @@ let g:switch_builtins =
5252 \ ' if false and (\(.*\))' : ' if \1' ,
5353 \ ' if \%(true\|false\)\@!\(.*\)' : ' if true or (\1)' ,
5454 \ },
55- \ ' ruby_string ' : {
55+ \ ' ruby_keyword_string ' : {
5656 \ ' "\(\k\+\%([?!]\)\=\)"' : ' ' ' \1'' ' ,
5757 \ ' ' ' \(\k\+\%([?!]\)\=\)'' ' : ' :\1' ,
5858 \ ' :\(\k\+\%([?!]\)\=\)\@>\%(\s*=>\)\@!' : ' "\1"\2' ,
5959 \ },
60+ \ ' ruby_string' : {
61+ \ ' "\(\%([^"\\]\|\\.\)*\)"' : ' ' ' \1'' ' ,
62+ \ ' ' ' \(\%([^'' \\]\|\\.\)*\)'' ' : ' "\1"' ,
63+ \ },
6064 \ ' ruby_short_blocks' : {
6165 \ ' \(\k\+\)(&:\(\k\+[!?]\=\))' : ' \1 { |x| x\.\2 }' ,
6266 \ ' \(\k\+\)\s\={\s*|\(\k\+\)|\s*\2.\(\S\+\)\s*}' : ' \1(&:\3)' ,
You can’t perform that action at this time.
0 commit comments