From 280a3be87f49193cbb1293616bd5b82d924c5bfa Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Mon, 6 Nov 2017 20:39:39 +1300 Subject: Move tag pattern into variable --- plugin/nextag.vim | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 -- cgit v1.2.3