rodi01 / renameit Goto Github PK
View Code? Open in Web Editor NEWKeep your Sketch files organized, batch rename layers and artboards.
Home Page: https://renameit.design/sketch/
License: MIT License
Keep your Sketch files organized, batch rename layers and artboards.
Home Page: https://renameit.design/sketch/
License: MIT License
v2.0.8
Sketch 45.2
MacOS 10.12.5
in Sketch 3 beta, %N just exports the string '%N', not the right numbering anymore
Hi,
Same as numbers with %N but with letters please?
Thanks!
When duplicating layers, they move up in the sketch layer tree so to speak.
User must then move the layers in reverse order so that the rename plug will properly order with %N.
Could we have an option to reverse that naming so the top most layer isn't #1 it's actually the last number in the list?
E.g. 01, 02, 03..10, 11, 12
Or 001, 002, 003, 004...112, 113, 114
With 2.0 and Sketch 40.3 i am not able to switch the focus between input fields with my keyboard (TAB switches focus between the dialogs buttons, but ignores the text fields).
Also, the first input field should receive focus when the dialog appears.
Hey there,
I love your plugin a lot! It works like a charm … :-) I'm getting frequent random Sketch crashes, though. I was trying to reproduce yesterday, but couldn't figure out unfortunately. Anybody else having this issue? Should I post a crash log?
Thanks & all the best,
Christophe
Hello,
Thanks for this great plug in its amazing,
I would like to know if you could add an option to delete some characters in layer / artboard names.
I have more than 200 artboards in the app I'm currently designing and the artboard names are this:
onboarding_0056__A23_state_1
I would like to delete the "0056_" in thoses artboard names
I tried to add a function to your plugin but I don't have enough skills to fully understand the code,
the regex I was trying to use was this: (?<=_)(.*)(?=A)
(delete everything between the first _ and the A)
If you could add a feature in your plugin it would be awesome.
Thanks
Plugin doesn't seem to work with Sketch 3.2.2
Watched the demo video 3 times. Read the instructions. Still get ten layers all named "Item %N" after running the plugin.
How about adding "%P" for the page name containing the artboard or layer? Would be useful sometimes.
Thanks for your work though, really like concept of this plugin.
Layers get messy when you insert a symbol that is part of a well organized Library...
So for example it would be great to have a command to rename all layers to the string after last "/"
Example:
"UI / Buttons / Primary Button - Active"
becomes: -> "Primary Button - Active"
This would really help make files more usable!
Thank you!
I noticed that Sketch is reporting that v2.0.7 should be available, but tapping "update" doesn't do anything.
It seems that the problem is that the 2.0.7 binary is missing:
https://github.com/rodi01/RenameIt/blob/master/RenameIt.zip?raw=true
...or at least that the file referenced in appcast.xml is a 404.
Hi there!
This is a quick note to remind you that Sketch 45 will include a plugin update system.
It would be awesome if you could add support to it (it's really easy!) before Sketch 45 comes out. Ideally, you should release an update for your plugin while we're still in Sketch 44, so your users will have a nice & easy experience when 45 is released.
For more details, please check http://sketchplugins.com/d/229-updating-plugins and http://developer.sketchapp.com/introduction/updating-plugins/
Thanks in advance!
For whatever reason, I can't seem to install any of the newer versions. I'll double click the .sketchplugin file but nothing happens. Likewise with Sketch Runner, it downloads it but it doesn't actually install. Only using v3.0.2 seems to work (i.e. bring up the 'Plugin has been installed' alert window).
I'm fine with v3.0.2, just though I'd let you know 😉
More details found @ https://github.com/integration/sketchpacks-relay
If I name my group/layer "button" then attempt to add a suffix with + button
, instead of adding the suffix, it just replaces the layer name with "+ button".
Sketch 3.0.3, latest RenameIt plugin.
Seems like I can no longer rename layers with the wildcard character as "match all after this point."
For example, I have the following layers:
Rect A
Rect B
Rect C
Try to rename via Find & Replace
Find: Rect*
Replace With: Circle %A
Expected Results:
Circle A
Circle B
Circle C
Actual Results:
Rect A
Rect B
Rect C
Nothing happens. I remember this working in the past, but it doesn't work anymore.
Hello,
Firstly I'd like to say thanks for this plugin, it's saved me a lot of time.
As of late, when renaming layers - the "name" input isn't auto focused (it used to be) when the dialog appears.
It used to auto focus the input all the time, but I'm not sure when it stopped on me. I know it's not a hardship to simply click the input to focus it, but it was very helpful when it was auto focused.
Is there any reason why this was taken out or stopped working?
Thanks!
Can you add a tab button option, so we could quickly change between input boxes in Rename window?
Hi, just wanted to add an idea that can help designers.
Have a namer "Helper" like %C that can give color hexadecimal.
(sorry if this isn't a real issue, and sorry for bad english).
Sketch measure does this (albeit too frequently), but it is helpful to know!
Thank for you for this awesome plugin, it has saved me so much time!
If possible, it'd be great to be able to enter a leading 0 in the "Starts Number Sequence From:" field. For example, I frequently rename artboards with numbers for sorting purposes, but sequence 1 - 12 sorts as: 1, 11, 12, 2, 3, 4 etc. It'd be nice to be able to create a number sequence from 01 - 12.
It would be great if you could rename symbol instances to the actual symbol name. For example, if you have 2 symbols called Button Default and Button Pressed, and you have an instance of "Button Default" that you then replace with Button Pressed, the name of the symbol instance is still "Button Default," when it's actually now an instance of Button Pressed.
Love this plugin! I wondered if you could add the ability to place a zero before the number when sorting by a number sequence. So the numbers could go "01, 02, 03,...10, 11, 12..."
Once there was a plugin which was just doing that but it’s deprecated and I miss it massively!
Hi, I found this plugin sometimes work but sometimes it fails to work.
I'm not sure if this happen because of sketch 4.3. It works fine in 3.3
It would be nice to have a starting point sometimes. Either the current layer name or the last used value would be very helpful (pre-selected so you can just start typing to clear it out).
Thanks!
Hello,
It great plugin seriously
I have strange text export from illustrator
_xA0_Image
I want drop all part phrases in all layers, but i don`t how make it
Screen:
http://prntscr.com/f573uc
Any idea?
Maybe it help a lot of people.
Regards,
Alexandr
Hello,
It'd be great if you add the ability to choose an interval eg. 20-29
Now it is possible to rename only from the starting number.
Thank you!
Best,
Ivan
Any chance of including regex support for the find and replace functionality?
I thought this was maybe already supported but realized I might have been thinking of a different plugin or else I forgot the syntax...
Trying to rename my file to make them appear properly into the finder with this kind of structure :
01-Login-step1
But I the second digit isn't working it only display '%N' :
01-Login-step%N
Any chance to solve that or do you know a workaround?
Sometimes you need to include characters like "+" or "*" inside layer names (e.g append * to a layer when building prototypes with framer.js). It could be useful to escape their special-power (e.g. putting "" before the sign, like in regular expressions)
it would be great that adding a switch for "find & replace layer names" feature like
□ whole document
□ current page
□ selected layer
Hello,
It'd be great if you add the ability to choose the type of order:
Now it is possible to rename from the first to the last layer.
Thank you!
Best,
Ivan
Hi,
First of all, I love this plugin.
I would like to ask if it's possible to have a parent variable, just like the use of the '*', but then something like '*P' which will use the name of the folder that your elements are in. This would be super useful.
Thanks!
Added the ability to rename using %w and %h for width and height.
// (ctrl cmd r)
// Rename layer(s) like a boss
// The Brain
function rename(layerName, currIdx, width, height) {
var per = basename.search("%"),
interSize = 0
isN = true;
// Interator
if (per != -1 && per != basename.length && (basename[per + 1] == "N" || basename[per + 1] == "n")) {
isN = basename[per + 1] == "N";
for (var i = per + 1; i < basename.length; ++i) {
if (isN) {
if (basename[i] != "N") break
} else if (basename[i] != "n") break;
++interSize;
}
}
var inter = isN ? selection.length() + 1 : 0,
newLayerName = basename;
if (interSize > 0) {
var interStr = (isN ? currIdx + 1 : selection.length() - currIdx).toString(10);
while (interStr.length < interSize)
interStr = "0" + interStr;
newLayerName = newLayerName.substr(0, per) + interStr + newLayerName.substr(per + 1 + interSize);
}
// Add to current name
if (newLayerName[0] == "+")
newLayerName = layerName + basename.substring(1);
// Wild Card Selector
var wildCard = newLayerName.search("\\*");
if (wildCard != -1)
newLayerName = newLayerName.substr(0, wildCard) + layerName + newLayerName.substr(wildCard + 1);
newLayerName = newLayerName.replace(new RegExp("%w", "ig"), width);
newLayerName = newLayerName.replace(new RegExp("%h", "ig"), height);
// Return new name
return newLayerName;
}
if (selection.length() > 0)
{
// Show dialog
var basename = [doc askForUserInput:'Rename Layer(s): eg. Item %N, Item %W, Item %H' initialValue:'Layer'].toString();
// Run on all selections
for (var i=0; i<selection.length(); i++) {
var layer = selection[i]
, frame = [layer frame]
, width = [frame width]
, height = [frame height]
;
var name = rename([layer name], i, width, height);
[layer setName:name];
}
}
else
{
// No layer selected
[doc showMessage: "Rename it: You need to select at least one layer"];
}
// Run
Throughout whole document including page. That would be killer.
Amazing work, Rodrigo! I have installed it but, for example, if I have five folders and, inside, some layers and I want update all these folders and layers' name, I can't to do it. Is there some way to do it?
Thanks @rodi01 !
Is here where you request a feature? sorry if not... 😖
how about changing case of [original name] by entering something like this
example name - My symbol
* - keeps current name "My symbol"
*lc - for lower case "my symbol"
*uc - for upper case "MY SYMBOL"
*tc - for title case "My Symbol"
love this plugin ❤️
Great plugin!!!
Would like to have the option to rename folders (subfolders ...) too
Best
Maik
Hello, I love the plugin! One thing that would be nice is if you could specify adding a "0" when using %N for the cases of selections that are between 1 and 9. This is because when sorting exported assets on the filesystem, "11-layername.png" with come before "2-layername.png".
Hi man, I use your plugin on a daily basis, and I find it really useful 👍
There is one detail which really annoys me though, and therefore I decided to write you about it. It's a very minor thing, but it would really speed up my workflow.
Is it possible to have the first of the input fields already active when launching the plugin? Basically when I click "rename it" I would love the modal to appear blinking, so I can start typing directly, without having to grab my mouse and point into the input field to activate it?!
it's really minor, and geeky, but I'd love that!
thanks!
At this time, it looks like %N doesn't go above 9.
Instead of numbering 9, 10, 11, 12 it returns 9, 0, 1, 2.
Edit: I know that using %NN includes leading zeros etc. but I think that the above is still true and should not go back to 0 after 9.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.