vrapper/vrapper — pull request #199 by albertdev (2013-05-03 09:29:26+00:00)
Title: Tag Text Objects: Ignore indentation in front of elements

I love how the recent commits have greatly improved Vrapper's XML support, but there was one thing missing in XML tag movements. Basically, Vim ignores white space if its used for indentation and selects the XML tag on the current line. This means that Vrapper should search to the right of the cursor, instead of selecting the tag *around* the current cursor position.

The commits in this pull request accomplish just that: if we are inside indentation, move the cursor to the right until we are inside the first tag, then run the rest of the XML code.
If the cursor sits on whitespace and the first non-whitespace character on the right is not an angle bracket, it's assumed the rest of the tag is text and hence the original outer tag will be matched.

A small example (* represents the cursor):
```` xml

* ok

````
Pressing the keys "cit" in normal mode will now change it to this ( | for insert cursor):
```` xml

|

````
The rest of the features can be seen in the unit tests.

I want to add though that I had one particular problem when the cursor sat at the end of the line: in Visual mode, the cursor service returns model offset + 1 which made me go past the end of the line's content. I copied a workaround from a different class to fix this, as I don't know if there's a more structural fix for it.