terryma / vim-expand-region

Vim plugin that allows you to visually select increasingly larger regions of text using the same key combination.
MIT License
1.1k stars 46 forks source link

Quoted text not selected correctly #6

Open robcsi opened 10 years ago

robcsi commented 10 years ago

Hi,

I've been using this plugin for a while, and I like it very much.

When starting selection inside quoted text, I noticed that at the second selection action, the plugin selects outside of the quotes (space delimited text object), rather than the whole content, if the part selected at first is a word at the beginning or at the end of the quoted text.

Example:

if (method() == "some example text")

If I stand on the word text and select it, the next selection will select text"). The same happens for standing on some and selecting twice: "some will be selected. The whole content of the quotes (some example text), without them, will be selected only on the third selection action.

Is this a bug, or the designed behavior? For me it is more intuitive to have the whole content selected right after selecting either of the words in the quotes.

adevore3 commented 6 years ago

Seems like a bug as I would have also expected it to select 'some example text' before grabbing the double quotes or closing parenthesis.