Home Download Buy Blog Forum Support

Command to remove a specific tag from a selection?

Command to remove a specific tag from a selection?

Postby handycam on Mon Jan 16, 2012 1:13 pm

I was wondering if I was missing there being a command or plugin that would remove a specific tag from a document or selection (if there was one).

For example, remove all SPAN tags, regardless of whether they had any attributes, or with specific attributes (span class="foo").

I have been doing something like this every time:
Code: Select all
Find: <span.*?>(.*?)</span>
Replace: \1


And would like to make that into a simple command, if one does not already exist. If it doesn't already exist, how does one make a command out of a set of find/replace parameters?
Mac OS 10.9.3
ST 3 (3059)
handycam
 
Posts: 271
Joined: Tue Jan 03, 2012 2:42 pm

Re: Command to remove a specific tag from a selection?

Postby C0D312 on Mon Jan 16, 2012 1:48 pm

You can try the RegReplace plugin by Facelessuser to set a command to a specific find/replace.

Or you can use the tag plugin to remove a selected tag...
C0D312
 
Posts: 1063
Joined: Sun Jul 10, 2011 3:23 am

Re: Command to remove a specific tag from a selection?

Postby tito on Mon Jan 16, 2012 1:49 pm

https://github.com/SublimeText/Tag

"Edit -> Tag -> Remove..."
Give APIs, let the community build the rest!
https://github.com/titoBouzout
tito
 
Posts: 855
Joined: Thu Sep 29, 2011 2:27 pm
Location: Montevideo, Uruguay

Re: Command to remove a specific tag from a selection?

Postby handycam on Mon Jan 16, 2012 3:37 pm

tito wrote:https://github.com/SublimeText/Tag

"Edit -> Tag -> Remove..."


Thanks, remove picked tag, I hadn't realized that's what that meant.
Mac OS 10.9.3
ST 3 (3059)
handycam
 
Posts: 271
Joined: Tue Jan 03, 2012 2:42 pm


Return to General Discussion

Who is online

Users browsing this forum: Google [Bot], Narretz, Yahoo [Bot] and 27 guests