diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2017-11-06 20:39:39 +1300 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2017-11-06 20:39:39 +1300 |
commit | 280a3be87f49193cbb1293616bd5b82d924c5bfa (patch) | |
tree | 7e4eac7107773fe523e4c909b73a3f22acf1e772 | |
parent | Use v:count1 directly in function (diff) | |
download | vim-nextag-280a3be87f49193cbb1293616bd5b82d924c5bfa.tar.gz vim-nextag-280a3be87f49193cbb1293616bd5b82d924c5bfa.zip |
Move tag pattern into variable
-rw-r--r-- | plugin/nextag.vim | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/plugin/nextag.vim b/plugin/nextag.vim index 97f220f..04c2160 100644 --- a/plugin/nextag.vim +++ b/plugin/nextag.vim @@ -17,6 +17,8 @@ if exists('g:loaded_nextag') || &compatible || v:version < 700 endif let g:loaded_nextag = 1 +let s:tag = '\m<\/\?\w\+[^>]*>' + " " Search for a SGML tag with the specified flag. " @@ -26,7 +28,7 @@ function! s:MoveToSGMLTag(direction, mode) endif let l:visualfix = a:mode ==# 'v' && a:direction ==# 'next' && &selection !=# 'exclusive' ? 1 : 0 for l:iteration in range(1, v:count1) - call search('\m<\/\?\w\+[^>]*>', a:direction ==# 'next' ? 'W' : 'Wb') + call search(s:tag, a:direction ==# 'next' ? 'W' : 'Wb') if l:visualfix normal! l endif |