From c08151045b651d3b720504403a66e008f3b552fe Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Sat, 11 Feb 2012 05:06:39 +1300 Subject: Refined regex; ignores SGML comments and PHP tags. --- plugin/nextag.vim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'plugin') diff --git a/plugin/nextag.vim b/plugin/nextag.vim index 13ee404..2f15f8a 100644 --- a/plugin/nextag.vim +++ b/plugin/nextag.vim @@ -11,7 +11,7 @@ " Wrapper to prevent overloading and signal our presence, and check we're not " in compatible mode or running a version of Vim that's too old. " -if exists("g:loaded_nextag") || &compatible || (v:version < 700) +if exists('g:loaded_nextag') || &compatible || v:version < 700 finish endif let g:loaded_nextag = 1 @@ -25,7 +25,7 @@ function! s:MoveToSGMLTag(direction, mode, count) endif let l:visualfix = a:mode == 'v' && a:direction == 'next' && &selection != 'exclusive' ? 1 : 0 for l:iteration in range(1, a:count) - call search("<\S*[^>]*>", a:direction == "next" ? "W" : "Wb") + call search('<\/\?\w\+[^>]*>', a:direction == 'next' ? 'W' : 'Wb') if l:visualfix normal! l endif -- cgit v1.2.3