Sublime Forum

Vi Extent commands > 'i' inner object and 'a' all delimiters

#1

Vintage mode is sweeet, but i can’t seem to get extent commands to work with operators unless the cursor is positioned exactly on the first character of a selection. for example, if I type 54G and then c , i , (single quote) on the following line:

54  $autoload'helper'] = array('url');

I’d expect the text “helper” to be removed with the cursor in between the first two single quotes in insert mode, but this is not the case.

alternatively if I jump over to the first character, “h” ,and use the same command, ST2 seems to use the next single quote to set the extent.

By any chance could someone more knowledgeable than me shed some light on how this is implemented and what extent commands are available?

p.s. Sublime Text 2 is AWESOME !! :smiley:

0 Likes

#2

It’s just a subtlety that Jon didn’t know about when he implemented Vintage. The % operator has the same problem. To be fair, the “search forward from beginning of the line” behavior is exclusive to the quote text objects and I actually didn’t know about it before reading your post. The other text objects generally work as expected with the exception that text objects crossing line boundaries seem to be getting set to linewise mode. Implementation is ViExpandToQuotes in packages/Vintage/vintage_motions.py.

I’ve been lurking the forum since the Hacker News post announcing Vintage mode and have paid for (keep up the good work Jon!) but don’t actually use ST2 because the subtle Vintage bugs drive me crazy and I’ll wind up fixing them all myself, which is not something I want to spend time on. If there’s a centralized list of Vintage bugs somewhere, I don’t mind contributing but I feel random bug reports just get lost in the noise.

0 Likes