Using this XML snippet:
<?xml version="1.0"?>
<root_tag>
<SomeTag>
<SomeTagPlusText>content</SomeTagPlusText>
</SomeTag>
<another_tag></another_tag>
</root_tag>
I place my cursor on SomeTag and hit vit. It acts like I placed my
cursor on root_tag. Same with vat. In other words, vat selects the
entire <root_tag>...</root_tag> text, whereas I expect it to highlight
only <SomeTag>...</SomeTag>
If I make a minor change to the XML:
<?xml version="1.0"?>
<root_tag>
<SomeTag>
<SomeOtherTag>content</SomeOtherTag>
</SomeTag>
<another_tag></another_tag>
</root_tag>
Then everything works as I expect. Pressing vat on SomeTag will
highlight only from <SomeTag> to </SomeTag>.
It does not seem to depend on the length of the tag. This also does
not work:
<?xml version="1.0"?>
<root_tag>
<T>
<T2>content</T2>
</T>
<another_tag></another_tag>
</root_tag>
Visual mode is not needed, it also acts on the wrong area when using
dat for example (which is what I tried first, got confused, pressed u,
tried again, got frustrated, used V%d instead).
This is with gvim -N -u NONE -i NONE on 64-bit Windows XP.
VIM - Vi IMproved 7.3 (2010 Aug 15, compiled Aug 29 2011 13:23:47)
MS-Windows 32-bit GUI version with OLE support
Included patches: 1-289
Compiled by [email protected]
Huge version with GUI. Features included (+) or not (-):
+arabic +autocmd +balloon_eval +browse ++builtin_terms +byte_offset
+cindent +clientserver +clipboard +cmdline_compl +cmdline_hist
+cmdline_info +comments
+conceal +cryptv +cscope +cursorbind +cursorshape +dialog_con_gui
+diff +digraphs -dnd -ebcdic +emacs_tags +eval +ex_extra +extra_search
+farsi
+file_in_path +find_in_path +float +folding -footer +gettext/dyn -
hangul_input +iconv/dyn +insert_expand +jumplist +keymap +langmap
+libcall +linebreak
+lispindent +listcmds +localmap +lua/dyn +menu +mksession
+modify_fname +mouse +mouseshape +multi_byte_ime/dyn +multi_lang
+mzscheme/dyn +netbeans_intg +ole
+path_extra +perl/dyn +persistent_undo -postscript +printer +profile
+python/dyn -python3 +quickfix +reltime +rightleft +ruby/dyn
+scrollbind +signs
+smartindent -sniff +startuptime +statusline -sun_workshop +syntax
+tag_binary +tag_old_static -tag_any_white +tcl/dyn -tgetent -
termresponse +textobjects
+title +toolbar +user_commands +vertsplit +virtualedit +visual
+visualextra +viminfo +vreplace +wildignore +wildmenu +windows
+writebackup -xfontset -xim
-xterm_save -xpm_w32
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php