aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2017-11-06 19:56:12 +1300
committerTom Ryder <tom@sanctum.geek.nz>2017-11-06 19:56:12 +1300
commit1367651b84cf5be5de40b9cf5347f1caab961704 (patch)
tree24f9d4e360f9dd616b90a2e26530de3dc5dddc5d
parentStrip trailing whitespace (diff)
downloadvim-nextag-1367651b84cf5be5de40b9cf5347f1caab961704.tar.gz
vim-nextag-1367651b84cf5be5de40b9cf5347f1caab961704.zip
Adjust indentation to conventional 2-spaces
-rw-r--r--plugin/nextag.vim28
1 files changed, 14 insertions, 14 deletions
diff --git a/plugin/nextag.vim b/plugin/nextag.vim
index 56290bc..5ae1a17 100644
--- a/plugin/nextag.vim
+++ b/plugin/nextag.vim
@@ -13,7 +13,7 @@
" in compatible mode or running a version of Vim that's too old.
"
if exists('g:loaded_nextag') || &compatible || v:version < 700
- finish
+ finish
endif
let g:loaded_nextag = 1
@@ -21,25 +21,25 @@ let g:loaded_nextag = 1
" Search for a SGML tag with the specified flag.
"
function! s:MoveToSGMLTag(direction, mode, count)
- 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)
- call search('\m<\/\?\w\+[^>]*>', a:direction == 'next' ? 'W' : 'Wb')
- if l:visualfix
- normal! l
- endif
- endfor
+ 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)
+ call search('\m<\/\?\w\+[^>]*>', a:direction == 'next' ? 'W' : 'Wb')
if l:visualfix
- normal! h
+ normal! l
endif
+ endfor
+ if l:visualfix
+ normal! h
+ endif
endfunction
"
" Default remappings.
"
for s:mode in ['n', 'o', 'v']
- execute s:mode . 'map <silent> <leader>. :<C-U>call <SID>MoveToSGMLTag("next", "' . s:mode . '", v:count1)<CR>'
- execute s:mode . 'map <silent> <leader>, :<C-U>call <SID>MoveToSGMLTag("prev", "' . s:mode . '", v:count1)<CR>'
+ execute s:mode . 'map <silent> <leader>. :<C-U>call <SID>MoveToSGMLTag("next", "' . s:mode . '", v:count1)<CR>'
+ execute s:mode . 'map <silent> <leader>, :<C-U>call <SID>MoveToSGMLTag("prev", "' . s:mode . '", v:count1)<CR>'
endfor