diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2017-11-06 20:09:17 +1300 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2017-11-06 20:09:17 +1300 |
commit | 2ea929bd90ebbd589bf24255ce520d796f8e03f0 (patch) | |
tree | bffa6a2f2dfecb46dfa53f819eba426f918e7f8e | |
parent | Break long remap lines up semantically (diff) | |
download | vim-nextag-2ea929bd90ebbd589bf24255ce520d796f8e03f0.tar.gz vim-nextag-2ea929bd90ebbd589bf24255ce520d796f8e03f0.zip |
Use v:count1 directly in function
There's no particular reason to pass it in.
-rw-r--r-- | plugin/nextag.vim | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/plugin/nextag.vim b/plugin/nextag.vim index eb543c6..97f220f 100644 --- a/plugin/nextag.vim +++ b/plugin/nextag.vim @@ -20,12 +20,12 @@ let g:loaded_nextag = 1 " " Search for a SGML tag with the specified flag. " -function! s:MoveToSGMLTag(direction, mode, count) +function! s:MoveToSGMLTag(direction, mode) if a:mode ==# 'v' normal! gv endif let l:visualfix = a:mode ==# 'v' && a:direction ==# 'next' && &selection !=# 'exclusive' ? 1 : 0 - for l:iteration in range(1, a:count) + for l:iteration in range(1, v:count1) call search('\m<\/\?\w\+[^>]*>', a:direction ==# 'next' ? 'W' : 'Wb') if l:visualfix normal! l @@ -41,19 +41,19 @@ endfunction " nnoremap <silent> \ <leader>. - \ :<C-U>call <SID>MoveToSGMLTag('next', 'n', v:count1)<CR> + \ :<C-U>call <SID>MoveToSGMLTag('next', 'n')<CR> nnoremap <silent> \ <leader>, - \ :<C-U>call <SID>MoveToSGMLTag('prev', 'n', v:count1)<CR> + \ :<C-U>call <SID>MoveToSGMLTag('prev', 'n')<CR> onoremap <silent> \ <leader>. - \ :<C-U>call <SID>MoveToSGMLTag('next', 'o', v:count1)<CR> + \ :<C-U>call <SID>MoveToSGMLTag('next', 'o')<CR> onoremap <silent> \ <leader>, - \ :<C-U>call <SID>MoveToSGMLTag('prev', 'o', v:count1)<CR> + \ :<C-U>call <SID>MoveToSGMLTag('prev', 'o')<CR> vnoremap <silent> \ <leader>. - \ :<C-U>call <SID>MoveToSGMLTag('next', 'v', v:count1)<CR> + \ :<C-U>call <SID>MoveToSGMLTag('next', 'v')<CR> vnoremap <silent> \ <leader>, - \ :<C-U>call <SID>MoveToSGMLTag('prev', 'v', v:count1)<CR> + \ :<C-U>call <SID>MoveToSGMLTag('prev', 'v')<CR> |