Copy and paste code in Hopscotch


#1

Copying and pasting is now possible! You can still discuss below. The Hopscotch Team are planning to expand on the feature further by allowing you to copy from one project and paste in another in the future.

What copying and pasting looks like in app:

Continuing the discussion from Download new Hopscotch update!:



Continuing the discussion from [Undo and Redo for Hopscotch](http://forum.gethopscotch.com/t/undo-and-redo-for-hopscotch/635/6):

Hopscotch is planning to add a copy and paste feature which is great! We just have to be patient :smiley:

We can discuss this feature here, since it is leading off onto a new topic from the old post.


Undo and Redo for Hopscotch
#2

Yessss. Coping and pasting code would be a dream, but then, you should only be able to copy and paste code from your own projects. (People could copy code from other projects and claim it as theirs)
Kiwicute2015


#3

Yes I would love copying and pasting code too! It would save a lot of repeating dragging code out.

I didn't think of only copying and pasting from your own projects but if we are able to transfer code from other Hopscotcher's projects it would be useful, for example if they had a feature that you would like to use in your project.

Like the feature might require a lot of code to program, and you could remix the person's project I guess, but you're might be mostly making your own unique project with only that feature from the other person's code, and maybe you'd like to make it from scratch. Then you could add that person's code in when you need it and tweak it for your project.

Unfortunately I do see how people could just copy other projects though and without giving credit, so copying and pasting only from your own projects is the best way I think as well. This is an awesome feature anyway!


#4

@t1_hopscotch It's upsetting that some people would just copy and paste somebody else's entire game and take credit for it, but copy and paste for code would be so helpful.

For example, if you make websites a lot it would be so easy just to paste the code for scrolling so you don't have to do it every time. But, I guess doing all of that is the whole point of coding, so there's pros and cons :wink:


#5

Yeah it is upsetting :confused:

Like when I made my HSB colour picker, I remixed ToasterRebellion's code to make a smooth gradient palette of colours. It was really helpful and I also used code I learned from other Hopscotchers as well.

Original:

New remix from me:

My colour picker is a pretty different project to the original though so it would be less confusing if it was a separate project, since people sometimes got confused that ToasterRebellion made the colour picker itself originally. I don't mind so much though and I gave everyone credits in the project.

It would have been useful if I was able to copy the code into a fresh project and tweak it instead of having to delete stuff from the old project, and I would give credit to everyone. But I agree people could just copy and not give credit unfortunately.


#6

I agree. Transferring code would be great.


#7

Maybe, when you copy someone else's code, it shows up on the screenshot (the grey part) so you would be giving credit automatically. It would be like branching. Of course, there's that one hacker who knows how to get rid of the name. :sweat:

My other idea is that you are able to have a screenshot of the code you want to copy at the bottom of your project so you are able to see what you are copying without switching from project to project. If what I am saying is unclear, I can give a picture.

Kiwicute2015


#8

Or Hopscotch could make a credits page for your project, instead of a username, which would include all copied-and-pasted code, along with all remixes


#9

That's a really great idea @Kiwicute2015 and I really like the idea of a screenshot as well! That would save me having to switch back and forth when I take photos of my code sometimes.

Awesome suggestion @KathrynJaneway and I think that would work really well with @Fishyguitars's idea of having an option where you can view everyone who branched a project:

Maybe it could have branched under a person's name if they branched it, or something like code contribution if code from their project was used (can't think of a better name for "code contribution").


#10

What I do is I go on a project and take a screen shot and look back at the two, not for copying though, just for learning new codes I can't find a video on. That's how I learn't smooth backgrounds.


#11

That does sound really cool @t1_hopscotch


#12

Cool ideas you guys have great plans for hopscotch


#13

This is a very useful and old topic, and it will definently come in handy to a lot of people! :grinning:


#14

How do u copy and paste code like how do u place it?


#15

Hi @Over_powered_wizard1 after holding down and copying the blocks you want, hold down on a blank space and you'll see "Paste" come up. Here's a gif:


#16

But I can't copie and paste code across projects


#17

It won't work across hopscotch games also I got permission to copie so don't worry


#18

Oh, copy across projects hasn't been added yet but Hopscotch is hoping to :smiley:

Very nice of you to get permission though!


#19

Sorry didn't see the eventually sorryXD


#20

That's no problem! :smiley: