Sublime Forum

Vintage (and Vim) movements not following Ruby idiom

#1

I’ve been learning Vintage keystrokes as my main means of navigation for a few days now, and there are a couple places in trying to edit Ruby files that seem broken:

**1. Arguments to code blocks
**

@preprint_hash = preliminary_binder_hash.select {|pub, settings| SCHEDULE[day_of_week].include?(pub)}

Here, if I have the cursor placed on the first “|” character, and try to use “%” to move to the closing “|” character, nothing happens. Similarly, if I am inside the two: “| . . . |”, and I try to use “ci|” or “vi|”, nothing happens. I.e., there is no recognition that some code between pipe characters is contained within those pipes. (I tried these combinations in Vim, and they didn’t work there, either.)

**2. Brackets around interpolations in strings
**

    puts "#{contents_entry.title_string} -- #{contents_entry.caption}"

Same basic problem as with the example above. “%” does not move to the paired bracket in the “#{ . . . }”, and “vi{” and “ci{” don’t work. (Unlike the example above, though, Vim DOES handle this case, where ST’s Vintage does not.)

Since these constructs turn up pretty often in Ruby, I would like to make this problem go away. Does anyone have any advice for improving ST’s understanding of the Ruby file it’s reading?

0 Likes