It is currently 21 April 2025, 16:36 Advanced search

Visual Code copy and paste

In this forum you can post your ideas on how Instant Developer could be enhanced, so we can discuss them together.

Visual Code copy and paste

Postby jacobe » 3 November 2013, 22:06

A feature I would like to see is improved support for copy and pasting Visual Code in In.De.

Using the "Copy to Text" function copies code to the clipboard as unformatted HTML.

I would like to see support for copy and pasting multiple data formats such as plain text, rich text, and HTML (similar to how many programs are able to copy / paste multiple data formats simultaneously).

For example, when posting code to a Word document all the formatting is lost and I must clean up the pasted code to make it readable. The ability to paste formatted/rich text would be perfect.

Another example is when posting code examples to the forum most people are using screen captures, when instead it would be so much easier to paste directly into the message editor.

I would also like to see the ability to paste text / external code into the Visual Code editor. For example if I want to share a small piece of code the person I am sharing it with must type it in by hand or have a copy of the project to paste from. It would also make it a lot easier when pasting a value into the editor (for example, a complex URL).
Last edited by jacobe on 4 November 2013, 16:36, edited 1 time in total.
jacobe
 
Posts: 35
Joined: 9 August 2013, 14:08
Location: Orlando, FL USA

Re: Visual Code copy and paste

Postby t.simoncini » 4 November 2013, 11:13

I also would like this feature!
t.simoncini
 
Posts: 1585
Joined: 5 March 2012, 14:00

Re: Visual Code copy and paste

Postby john w » 4 November 2013, 17:15

This would be very useful and a feature worth adding. Has my vote
Regards

John W
User avatar
john w
 
Posts: 834
Joined: 24 October 2012, 16:29
Location: Apple Valley, Minnesota USA

Re: Visual Code copy and paste

Postby bobalston » 6 November 2013, 21:30

I also agree that such would be very helpful. However, I wonder, given the tight integration of code to the objects in the project, if such would ever be possible.

bob
bobalston
 
Posts: 158
Joined: 26 July 2013, 19:23
Location: Dallas, TX

Re: Visual Code copy and paste

Postby lucabaldini » 11 November 2013, 15:23

A feature I would like to see is improved support for copy and pasting Visual Code in In.De.
Using the "Copy to Text" function copies code to the clipboard as unformatted HTML.
I would like to see support for copy and pasting multiple data formats such as plain text, rich text, and HTML (similar to how many programs are able to copy / paste multiple data formats simultaneously).
For example, when posting code to a Word document all the formatting is lost and I must clean up the pasted code to make it readable. The ability to paste formatted/rich text would be perfect.
Another example is when posting code examples to the forum most people are using screen captures, when instead it would be so much easier to paste directly into the message editor.

I thought that the "Copy To Text" feature was't used by anyone for code lines :-)
I use it for creating the Instant Developer documentation. It simplifies my job when I need to show sample code in our HTML documentation. I select the procedure or block, activate the "Copy To Text" menu command and I have a good HTML in my clipboard.
Anyway, I think that your idea is interesting. It's something that, sometime, I asked for myself!
I've created a new ticket in our ticketing system: NPQ01268. Check the Instant Developer Roadmap and when it will be evaluated you will be able to vote it.

I would also like to see the ability to paste text / external code into the Visual Code editor. For example if I want to share a small piece of code the person I am sharing it with must type it in by hand or have a copy of the project to paste from. It would also make it a lot easier when pasting a value into the editor (for example, a complex URL).

That is going to be really difficult. You are asking a multi-language parser that parses any code (C#, Java, Javascript?) and creates the internal structure In.de uses for storing code. You know that In.de uses something that we called "relational programming" and anything that you type in the Visual Code Editor is, internally, stored as a graph. It would be really difficult to "parse" a plain text and decide what is a variable, what is a constant and so on... I'll think about it...
I don't understand when you say "pasting a value into the editor"... you can paste a complex URL or a complex value into the Visual Code Editor. Could you explain a little more what you mean?
User avatar
lucabaldini
Pro Gamma
Pro Gamma
 
Posts: 4990
Joined: 1 October 2010, 17:03
Location: Bologna

Re: Visual Code copy and paste

Postby jacobe » 11 November 2013, 20:53

lucabaldini wrote:I thought that the "Copy To Text" feature wasn't used by anyone for code lines :-)

The data in the clipboard is in text format (CF_TEXT) instead of HTML (CF_HTML).

When I paste it in an HTML aware program, it pastes the contents as text and not as HTML. This is OK if I'm editing HTML in a text mode editor (like notepad, most programming editors,etc.), but not for editors that support rich formatting (like Word). I was just looking for an easy way to get code in and out of In.De (for sharing and documentation purposes).

lucabaldini wrote:I don't understand when you say "pasting a value into the editor"... you can paste a complex URL or a complex value into the Visual Code Editor. Could you explain a little more what you mean?

Ok, I see this does work, just not how I thought it would.

I was trying to paste while the Editor was waiting for an expression to be entered:
expression.jpg
expression.jpg (4.87 KiB) Viewed 12783 times

If I press space before pasting it does work (I'm still new to the Visual Code Editor and I still find it confusing to use for some tasks).
jacobe
 
Posts: 35
Joined: 9 August 2013, 14:08
Location: Orlando, FL USA

Re: Visual Code copy and paste

Postby lucabaldini » 13 November 2013, 14:06

For the CF_TEXT / CF_HTML you are right... i built that feature (copy as text from Visual Code Editor) for myself... I'll extend it and change it to TEXT (and, maybe, HTML if you'll press the SHIFT or ALT key). And when I'll do that i'll set the correct format in the clipboard.

For the second part (paste when an expression have to be entered) you are right... normally I start with " (double quote) because that is a constant and if I use Visual Studio or Eclipse I have to do that way either... I have to type " then CTRL-V.

Anyway, I can even check that if I press CTRL-V and there is text in the clipboard and In.de decides to copy from there it can "push" the " key before pasting... In this way you don't even have to type " or space... you just paste.
User avatar
lucabaldini
Pro Gamma
Pro Gamma
 
Posts: 4990
Joined: 1 October 2010, 17:03
Location: Bologna


Return to Improvement Suggestions

Who is online

Users browsing this forum: No registered users and 3 guests