Reputation: 8086
See the H2
tags? How can I change them all to p
tags without manually going from line to line. cmd+d
is not viable because of the varying lengths of the inner content.
I found something called Emmet Plugin which I installed but can't get it to work. (Followed steps and confused by docs http://docs.emmet.io/actions/go-to-pair/).
Thanks for the help.
--UPDATE--
Not using a regex. Just to clarify I want something that will automatically update the closing tag
if I change the open tag
.
Upvotes: 5
Views: 8918
Reputation: 391
If you have emmet installed: Cmd+Shift+K on mac, Ctrl+Shift+ on windows
Upvotes: 0
Reputation: 1742
Here are some solutions which does not require any plugins. All solutions works on sublime2, sublime3 and atom
PS: For those who does not have the tags in same line, of they do have then all the contents are of different number of lines method 1 will not work both other methods will still work
Upvotes: 1
Reputation: 4198
I use Emmet and CTRL+SHIFT+' does not work for me.
I changed the key shortcut of the command.
Preferences -> Key Bindings -> User
Content:
[
{ "keys": ["ctrl+shift+;"], "command": "rename_tag" }
]
Upvotes: 3
Reputation: 2691
You need “Rename Tag” action: https://github.com/sergeche/emmet-sublime#available-actions
Upvotes: 10
Reputation: 384
Just use regexp. They are supported by Sublime Text 2 (in the CTRL + H).
Upvotes: -1