I have the following piece of code in a file that I opened in Vim
:
<p>Hello stackoverflow!</p>
How can I delete <p>
and </p>
tags but keep the contents between them? That is, what should I press to end with:
Hello stackoverflow!
I know pressing d i t will do opposite.
I'm using Janus.
press d ("d") to delete it.
For example, you may type <li>example</ then press Ctrl-x Ctrl-o to automatically finish typing the tag so the text reads <li>example</li> . With this abbreviation, you can simply type </ then press Space to automatically complete the tag.
With the surround.vim plugin installed, press d s t to delete surrounding tag.
Similar shortcuts:
()
""
''
and so on...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With