|
Any tips or good plugins for writing HTML with vim? Two things that I'd find really helpful: A command to jump from a tag to the corresponding close tag (like jump from <div> to </div>) A command to replace the contents of the open and close tag at the same time (like if I replace <h1> with <h2> it will simultaneously replace </h1> with </h2>)
|
# ¿ Apr 25, 2014 11:57 |
|
|
# ¿ May 1, 2024 15:37 |
|
Thanks Lumpy! I feel like pretty much every thread I ask a question in you are usually the one who provides a useful answer!
|
# ¿ Apr 25, 2014 17:00 |
|
Lumpy posted:Sparkup: https://github.com/tristen/vim-sparkup Update: I can't live without this now. I still haven't quite found a solution for this one though: fuf posted:A command to jump from a tag to the corresponding close tag (like jump from <div> to </div>) This doesn't work unfortunately: The Laplace Demon posted:Place cursor over div, and press %. (it jumps from between the opening and closing brackets of <div>, but not from <div> to </div>) The closest thing I've found is this plugin which highlights the closing tag (pretty useful in itself): https://github.com/gregsexton/MatchTag http://www.vim.org/scripts/script.php?script_id=3818 If I knew how I'd edit the plugin code to add a way to jump between matched tags.
|
# ¿ May 9, 2014 17:13 |
|
The Laplace Demon posted:Oops, I use sensible.vim, which automatically runs runtime! macros/matchit.vim. That macro has been included in vim since 6.0, and it's what adds the jump between tag behavior. Oh hey it works! Thanks.
|
# ¿ May 9, 2014 18:04 |
|
I used to have a shortcut that would open a fullscreen list of all open buffers that you could scroll through and switch to with <enter>. It wasn't :ls, and I'm sure it wasn't a plugin. Any ideas?
|
# ¿ Jun 18, 2014 17:48 |
|
|
# ¿ May 1, 2024 15:37 |
|
gg=G works great on html files, except for inline javascript. It just pushes anything inside the <script> tag all the way to the left:code:
|
# ¿ Jan 29, 2016 14:56 |