diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2012-02-11 05:06:39 +1300 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2012-02-11 05:06:39 +1300 |
commit | c08151045b651d3b720504403a66e008f3b552fe (patch) | |
tree | 131e23ef51db82a1f8480c81107fb804666551c8 | |
parent | Nicer structure for function. (diff) | |
download | vim-nextag-c08151045b651d3b720504403a66e008f3b552fe.tar.gz vim-nextag-c08151045b651d3b720504403a66e008f3b552fe.zip |
Refined regex; ignores SGML comments and PHP tags.
-rw-r--r-- | plugin/nextag.vim | 4 |
1 files changed, 2 insertions, 2 deletions
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 |