Skip to content

Commit 8c4c87e

Browse files
committed
Fix another issue with HTML tag joining
1 parent 215c96b commit 8c4c87e

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

autoload/sj/html.vim

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,13 @@ function! sj#html#JoinTags()
4545
let skip = sj#SkipSyntax(['htmlString'])
4646
let opening_tag = sj#GetMotion('va>')
4747
let opening_lineno = line('.')
48+
4849
let tag_name = expand('<cword>')
50+
if tag_name == '>'
51+
" Then va> put us on the closing bracket, jump to the opening one:
52+
normal! %
53+
let tag_name = expand('<cword>')
54+
endif
4955

5056
if searchpair($'<{tag_name}\>', '', $'</{tag_name}>', 'W', skip) <= 0
5157
return

0 commit comments

Comments
 (0)