Giter Site home page Giter Site logo

thierryc / sketch-find-and-replace Goto Github PK

View Code? Open in Web Editor NEW
709.0 33.0 37.0 12.09 MB

Sketch plugin to do a find and replace on text within layers

License: Apache License 2.0

JavaScript 99.92% HTML 0.08%
sketch sketch-plugin sketchapp sketch-app regex ux-design ux-ui ux

sketch-find-and-replace's Introduction

Find and Replace V2 for Sketch

Find and Replace (text) for Sketch

Folow me on twitter to be posted.

sketch 62 and >. (version: 2.6.0)

New Shortcut : "cmd option shift f"

How to

Remembers your settings - Remembers your settings for next time you do a find/replace (doesn't remember find/replace/scope as these will change each time)

Regex new feature

Get the Regex Power ! ⚡️

"John Smith" to "Smith John"

Find

(\w+)\s+(\w+)

Replace with

$2 $1

Result: Smith John.

Replace all double spaces

Find

\s{2,}

Replace with

(one space)

Follow me on twitter for more tips.

https://twitter.com/Autre_planete

Issues or ideas

If you have any problems, or ideas, please open an issue!

Credits and Thanks

V1 Created by Martin Steven - @mscodemonkey - Thank you Martin.

V2 Created by Thierry Charbonnel - @thierryc.

V2 Maintained and improved by Thierry Charbonnel - @thierryc.

Thanks to Aby Nimbalkar - @abynim - for the SketchPlugin-Remember code to save user settings.

Thanks to Autre Planete - @thierryc - for writing the code to change text within symbol overrides.

Thanks to Vincenzo Petito - @vincenzopetito - for code within Shapr showing how to focus the text field on start and tabbing between input fields found within the dialog.

Thanks to Sean Dellis - @seandellis - for his help, test sketch doc and issues review.

Thanks to @iconmaster - for his test.

Disclaimer

I take no responsibility for what you find and replace, or for any changes made unintentionally due to this software erroring. I do test it before I release it so the chances of bugs are minimised, but still, use wisely and completely at your own risk. Remember, cmd-z is your saviour.*

sketch-find-and-replace's People

Contributors

boakenfull avatar moeffju avatar mscodemonkey avatar thierryc avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sketch-find-and-replace's Issues

Not working with Sketch v42

This used to work GREAT, but in the last couple updates of Sketch notice it's no longer working. Are there any plans to continue maintaining, just so users can know if we need to look for a replacement? Thank you!

Not working in Sketch 43.2

Hi, I've used this plugin in the past with delight, but alas it's no longer working for me. Here's the trouble I'm running into, would you be willing to take a look?
Repro steps

  • Have text in symbols on the symbols page that I want to replace
  • Access the plugin Plugins > Find and Replace > Find and Replace
  • Enter the text I want to replace and what I want to replace it with
  • Observe the results: none of the specified text changes.

Sketch version 43.2 (39069)

I appreciate the work you put into developing this plugin and am hopeful you'll be able to find time to look into the issue I mentioned. Thanks!

Not working in 44.1

even selecting text so it appears in the find replace box and typing in something new does nothing.

Dialog inputs focus

Hi,

Would it be possible to set the focus on the first input when the dialog opens? And also to allow using tab to quickly go to the second input?

Keeping hands on the keyboard when using the plugin, that would be really convenient. ⌨️ 👐

Regards,
Thibaut

^\s and replacing

Most commands are working! Thank you.

I'm running into one issue: Using this string to find spaces at the beginning of text layers ^\s and replacing them with no space (to remove the space). It doesn't seem to work with the ^ modifier, but does work with just \s ... this wont work for my use because I need spaces between the words

Ex. trying to take " Type something" to "Type Something" (note the space at the beginning of the first string.

Thoughts?

Only Replace the Text - Nothing else.

Nice Plugin - but either I am too stupid or theres a Feature missing where I ONLY replace the Text in the Document and not in the Layername, neither the Style.

Example: My Layer name is like "Colors/Red" and the Text says "Red" – I want that the "Red" is replaced by "Blue" for example - but leave the Layername untouched OR also Only change the Red that the layername becomes "Colors/Blue"

Hope that was understandable.

Not working as intended

When I tried to find & replace it said no instances found Ref Pic below

image

So i tried changing it to match whole words then it did something weird plz chk img below

screen shot 2016-03-03 at 7 24 55 pm

Issue is.. instead of jus replacing the text characters it changed the color & style of the words next to the searched characters as well which isnt what i wanted..

screen shot 2016-03-03 at 7 25 12 pm

How to fix this ?

Sketch find and replace Website (GHPAGE)

I need help to create a website (gh-page) for your favorite plug-in.
Any help, suggestion and translation are welcome.


                                                     
88        88  88888888888  88           88888888ba   
88        88  88           88           88      "8b  
88        88  88           88           88      ,8P  
88aaaaaaaa88  88aaaaa      88           88aaaaaa8P'  
88""""""""88  88"""""      88           88""""""'    
88        88  88           88           88           
88        88  88           88           88           
88        88  88888888888  88888888888  88           
                                                     
                                                     


Tab through Find and Replace dialogue

Hopefully a pretty easy one!

It would be very handy if I could tab from field to field in the F&R dialogue box rather than having to select each field with the mouse, especially the "Find" and "Replace with" text fields (since I don't tend to change the radio buttons once I've set them as I like them).

Keep up the great work!

Custom Text length

Hello, I am looking to find an replace text, hopefully a large amount, possibly 3 paragraphs or longer.
Can you identify within the script of your plugin, which line, I need to rewrite that modifies the Text input limit?

Thank you for creating a wonderful app!

Great idea, but didn't work

This is (potentially) a great time saver, but I couldn't get it to work not even on the simplest document. See?

screencast

Multi-line replace changes styles

I would love to be able to replace a single line of text in multi-line box that has different styles without changing the style of all the text in the box. I'm sure some of this may be inherent to Sketch, but would be awesome if there was a way around this.

It's forcing me to not use any additional text styles in my text-boxes which is great when I'm creating the Sketch files–but if I want to find/replace someone else's (like now), I'm out of luck.

Thanks for creating this incredible tool!

Can’t be blank?

Hello,

I’ve got lots of labels like this: ‘55 points’ and want them to read ‘55’, i. e. remove the ‘ points’. I’d expect this to work if I search for the phrase ‘ points’ and leave the replacement field blank, but all I get is a popup telling me that find or replace can’t be blank.

Is there a workaround or would you consider adding this feature?

Thanks,
Julian

Replace in Symbols

It would be awesome if scope could be enhanced to optionally include symbols as well. Thanks for the great plugin!

Replace by blank or remove.

From twitter: Very grateful that you give us such a helpful plugin. but i am confusing about when i only select some texts and replace it with nothing in the [find], the plugin tell me 'find and replace cannot be blank'. i wonder that weather the plugin can fix my requirement, or just i ignore this feature~ thinks very much

Find in Artboard

Hello,
Can you extend it by the option to find and replace for selected artboard(s) ?

Layout cluster f*

Layout Issue:
screen shot 2017-02-21 at 10 22 25 am

Sketch Version: Sketch 42
OS: 10.12.1
List of other plugins/potential conflicts:

screen shot 2017-02-21 at 10 23 58 am

Update or maintain this code

Dear Martin,

Sean Dellis and Me are able to update or maintain this code if you want.

You don't use Sketch any more ?
Why ? What is your new favorite tools ?

Best regards
Thierryc

Find/Replace text but not style

First: this is an excellent plugin. Love it. This issue should in no way detract from that fact. But it's something I've encountered and thought I'd post it.

In a text block in which different styling occurs (e.g.,: text block that might read "This Week: Wombats" one might have colored "This Week:" black, and "Wombats" white. Or another example would be specific, highlighted words in a paragraph) I find that when I do a find/replace changing just one word within that block (e.g., changing all instances of "Wombats" to "Owls") the style of the changed text gets carried over to the entire block of text (e.g., "This Week: Owls" turns all white).

Just thought I'd post it. But maybe I'm missing something.

thanks.

hope to support Chinese characters

find and replace is a great sketch life saving plugin.
However, i found it can replace English perfectly but failed to do it with Chinese.
hope to support Chinese characters.
it will save millions of Chinese UI designers' lives.

Support Sketch 45 plugin update system

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!

Find but don't Replace

Love this! Could we also get "Find" without the "Replace?" I need to find text and rewrite it, but I can't do it globally.

Changing Colors

Hello, would it be nice to have the choice about changing colors like Adobe Fireworks does :-)
Find: ededed - Replace with: 000000 and all objects with this light grey will change to black

Or, on more detail/choice - only objects (not text elements)

Best, Maik

Feature request

I have a big text box (table/list)) with currencies.
I have to change all "." to a "," ...

The is current no chance to do that, right.
Whats a bout a feature then, where i can change any letter in the selected layer(s)?

Cheers

Feature request

Any chance to have the option for "find only", placed in a list?
And then from there, a link to the appropriate layer :-)

Best!!!

RegEx not working in Sketch 47

RegEx expressions are not resulting in changes being made in Sketch 47

Attempting both examples in the Read.me don't work

Erasing line breaks

Hi, I just tried this plugin with a text box that had a line break and then a line of text that started with "How to". So I tried to find/replace it with the words "Learn to" and it replaced the "How to" but also erased the preceding line break. I would have expected it to ignore the line break and only replace the text I wanted replaced?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.