For example with the line:
<tr><td><code><a href=http://www.somesite.com/directoy
style=text-decoration:none>description</a>
</code></td><td>quanity</td></tr>
Starting in the first column,
currently the first w positions after the "<" the next w before the ">"
and the third w skips over the >< and cursor is positioned before the "td"
I would like the w to skip to the end of the <tr>
In the following the pipe "|" shows the desired words
<tr>|<td>|<code>|<a| href=http://www.somesite.com/directory|
style=text-decoration:none>description</a>|
</code>|</td>|<td>|quanity|</td>|</tr>
Thanks in advance.
I don't know of a readily available way to do this. You can get
a somewhat close approximation to your "not consider the
characters" bit by adding
set isk+=>
set isk+=.
set isk+=/
set isk+==
to your list of "word" characters as defined by the 'iskeyword'
setting. However this isn't quite what you want for the first
question of "treat[ing] HTML tags as words". My next suggestion
would be to use the f/F/t/T/,/; family of commands so you can do
things like
f<
or
t>
to rapidly move within the line to the desired character. More
on those at
:help f
(and following)
My last suggestion would involve knowing why you want to move by
these jumps, and if the HTML/XML-specific text-objects would help
you out. With your cursor in the word "description", you can do
things like
vit
dat
and with your cursor inside a tag such as on the "o" on
"somesite", you can do things like
ca<
yi<
which you can read about at
:help i<
:help a<
:help it
:help at
:help tag-blocks
So while none of them are exactly what you asked for, some mix
thereof may help bring you closer to what you want. I use the
text objects and the f/F/t/T/,/; suite on a near daily
basis...hopefully you'll find them as useful for your HTML/XML
editing too.
-tim
Dennis
On Nov 5, 2009, at 10:50 AM, Tim Chase <v...@tim.thechases.com> wrote:
>