Hi everyone, in this video we're going to look at... this amazing bulk renaming option in Figma... we'll do some easy stuff, we'll do some cool stuff where we tidy up... a lot of our components and instances... and then we'll get really fancy, and I'll show you how... I can't really write an expression...
but I can show you how to copy and paste one... to do some fun stuff in the bulk renamer... but don't get too excited, I don't really know... what I'm doing with coding expressions... but it's good to know that they're there... and I'll give you a good example of how to make it work...
and where to find more info, all right, let the bulk renaming fun begin. Let's start by renaming these super cool plasticine icons... I know you'll ask, they're from Icons8, 3D Plastilina, super cool... so let's start with some easy renaming, so I'm going to select these three... and I'm going to open the bulk renaming... now bulk renaming is just the same shortcut...
'Command R', or 'Ctrl R' on a PC... but because we've got multiple things selected... this kind of bulk renaming window opens. Do we need to match anything? Not in this case, I'm just going to rename this... it's going to be "Icon", and I'm going to use underscore, '_'...
and I'm going to say, I want some, like downwards numbering... I could delete that, and I could make... it's like ascending or descending numbers... that works for me, 01, 02, 03... you can kind of see this, this is interesting-ish... this is code for, put a number in descending...
I don't know how it works, it's called, it's a regular expression... and I kind of can Google my way through making stuff happen. So we'll do a little bit in this video but just keep an eye on these... these are ways that the computer can find things in our text... sort through it, organize it, they're called regular expressions... anyway, let's say, like we can modify them, you know, like caveman style...
look, it's put in 01, I can put in another in... to put in 3, 4, lots of ins... you can kind of figure out what it's doing, a little bit... so there we go, I want 3001, perfect, renamed it. Bulk renumbering gets better when, let's find... these are my original icons here, these are the main components...
so I'm going to rename these... I'm going to select them all, use my same shortcut, 'Command R', or 'Ctrl R'... and where bulk rename is really handy... is when you want to group components using the slash, '/' method... because at the moment-- let's have a look at our Assets panel, we have... all of our stuff, just kind of like hanging out in here...
if you've got a thousand icons, they're just going to end up hanging out here... and they're quite tricky to use, some documents will have 100, 200 icons. So what we can do is, we can say, all of you people... switch back to the Layers menu so you can see it, use my command R... and I'm going to say, actually, they're going to be, we're going to rename them... going to put them in a folder called-- not folder, but a group called "Icon"...
and then use their current name... so dollar sign, ampersand, is the regular expression for current name... so that's it, it's going to put the icons, slash, and then their regular name... this preview is really handy. Now if you did the Essentials course you'll know that when I do this... and you can kind of see it over here...
in my Assets panel now, I will have just, where's my icon? There we go, Page 1, and my main components, I have icon... but they're all grouped together, can you see... they're on one, nice little bit... and it does make it easier later on when you're going-- let's use an instance of this... and over here, can you see, I've got magnifying glass...
but in that same little icon group I can pick the heart, or I can pick... the user regular... it's an easy way to switch out between these instances... just using that forward slash, '/'. Next thing is, is that I'm going to use this kind of group of icons... again, you won't have these, so just grab them from any plugin, Icons8 is good...
there's loads of free stuff in there, and what I've got here... is, I've got a solid and an outline mode of the same icon... there's just times where the solid one is required... because, like we're using outlined, I'm using outline here... because I like the look of them... but there's just going to be times where...
they're too small against a mixed background... we're actually going to have to pick the solid option, I want the two options. So let's do the bulk renaming, let's select it all... use 'Command R', or 'Ctrl R' to rename them... and I'm going to say, let's add them to the icon folder... you do that by adding the slash, '/'...
some people like to have spaces either side of their slash, it doesn't matter... arguably looks nicer, but it doesn't matter... I am going to say, icons are, in icon folder, use the current name... but also I want to go another level down and say... actually, I want to find a solid version, I'm going to copy that... and these ones are going to be the outline versions...
click 'Rename', let's drag out an instance... which I realize now I can't do... because these are actually over here, they're just frames... so it doesn't really matter when you turn these into components... before, after all the naming... I've accidentally left mine afterwards...
but we're going to create multiple components, happy days. Now drag in an instance, and over here now... I've got a little bit better structure... so messiness, tidiness, look, all under Icon... let's say I want to find the Delete... and can you see in here, I've got an outline, or...
a solid version, handy. Another thing we might do is, let's have a look at the Assets panel... it's starting to get messy in here, like our Assets panel, our local components... ah, it's messy, it's not too bad, like... can you see, these though are getting kind of all split off... they're on Page one, in my main components, which was handy at the beginning...
inside of Icon, inside of Bookmark... now though we're starting to get to-- actually, I want to do something... I want to grab all of these, so I'm going to cut them off this page... I'm going to make a new page, where's my pages? There we are... plus I'm going to have my "Components" page...
now when should you do this? I do it about this sort of stage, you can do at the beginning... just make sure you've got a page with all your main components, all over here... it can be just a tidier way for you to work... or if you're like me, I just kind of bump into it, I'm like, "This needs fixing"... I'm going to spend the next little while getting it working.
I'm going to start by making a section or a frame... and just to rename it and call it "Icons", so I've got somewhere to put my icons... I'm going to paste my icons in from that other page... they're my main components, just double check they've got the right icons... they're not instances... and there we go, it's just going to be a bit tidier...
now when you're working with an instance... to say, actually you, my friend, are... on my Components page... you're an icon, what kind of icon? I need the Delete, and I need the Solid one, there you go. One thing that might happen though is...
either you're tidying up somebody else's document... you've opened, like the iOS design system or Material... or something else, and you just need to get rid of, there's like... there's a lot of structure that you don't need... let's say that you just, you're not going to use the solid ones... so they're gone from your file, what's going to happen now is...
you've got this kind of separation, can you see, outline at the end... we just don't need it, so we can tidy it up... because at the moment we still have this kind of extra step that we don't need... so we're going to go... so we're going to go into our Icons, we're going to say, yeah, give me the Delete... then we're going to go and pick the outline version, there's just one extra step.
Let's grab these, use 'Command R', and say, I want to find... keep an eye on the preview over here, I want to get rid of all of the outline... not just outline, but the '/outline'... to clean it all up, then I can do that... that has kind of removed a chunk of that naming convention... now I've got an instance that says, you...
are, on my Components page, you're an icon, and they're just listed... you don't have to go inside of Bookmark and click it one step down. The next thing I want to show you is... something to do with regular expressions or rejects... I mentioned it earlier, I'm going to put my hand up and say... "I don't know a lot about how to code it"...
but I know it exists, and it can be handy... but for me, need help from a developer to help write some of these search queries. So I've got this example here, we've got the word Icon_001, we did that earlier... so I'm going to rename them all... and what I want to do is switch the words with the numbers... there is no option in here that says, pick all the names...
and then switch them over for the numbers... but if we know that we can do some... coding in these fields, we should be able to do it... and this is where I reach out to a developer, and say... "Hey, can you help me make this?" I'm going to walk you through an example... basically, I just took it from the Figma website...
I'll leave the link to this article, it's just the search article here... and it just starts with a basic one... and then has some reference material which is still well above my head... but have a look, you can see some of the search patterns that you can type in... but again, let's just do an example so that you are... you can squirrel it away in your back pocket...
to know that if you do have something tricky to do... you can probably get help, because it might save a lot of time. So I'm going to copy this, in the Match field... and I kind of half understand it... says, grab all the upper and lower case words or letters... that also have an underscore in between them...
and it also has, I think that's for all numbers, /D... find all that, so all the letters that has a hyphen between it... and then all the numbers, grab all of those... and then '$1', which is the first thing I've pulled out... but actually, put the '$2' first... so it's going to put the numbers...
whatever the second kind of thing you grabbed over here first... and the first bit, second, let's just put an underscore, '_' between them... so we're able to switch it around from being Icon001 to 0001Icon... "Good example, Dan." It's more I guess, just, I want you to be aware that... search, especially bulk search can do lot more than what's available in there... imagine the dialog box itself will upgrade over time to give you more options...
but anyway, forget about how bad I am at coding that stuff... and let's focus on how cool those little pluses and icons are... there you go, that is bulk renaming in Figma, does some amazing stuff... all right, that is it, I will see you in the next video.