Support Cut and Paste Code or Code Formatting
If you had a choice between optimizing the forum post form around cut and paste from Visual Studio and Word or around the "format code" buttons that exist today which would you choose and why?
Option 1: Support cut and paste from the Visual Studio editor (or other rich text sources) that would preserve formatting and colorization.
Option 2: Improve and Extend the code formatting buttons that exist today.
It would be great if you could also explain why you made the choice you did.
As far as Visual Studio, I would prefer cut and paste because I don't expect to actually write code on the forum. Code formatting in Visual Studio itself is not always as good as I would like.
Now with word, I think the opposite. I would expect to want to tune any formatting I am pasting from Word in the post to fit in with my content. Word is not out of band like most code is and so I don't feel that RTF cut and paste is as important for Word.
Have you checked out CodeSaw (www.liqwidkrystal.com -seems to be down atm)? It allows you to actually run test code listed on pages. That would be really neat.
Shaun Bedingfield
blogsb.blogspot.com
shaunbed@houston.rr.com
I'd prefer to see better support for pasting from RTF editors like Visual Studio and Word. While I occassionally write code directly into the forums, the lazy features like IntelliSense to finish those especially long methods like FormsAuthentication.HashPasswordForStoringInConfigFile are really handy. Also, if you concentrated on better support for pasting Word HTML from the Visual Studio RTF (too bad VS doesn't add HTML to the clipboard) you get the code stylization for free (though there may be some inconsistencies, but most color coding should be obvious).
From the point of view of quick posts, it definately makes sense to enable support for Cut and Paste from VS. But then how would you tag the post to contain code?
Usually one would do a cut copy from VS. Even if I was typing code, I would prefer to use the Code block and let the forum auto-format it for me. Manually formatting code using more buttons seems simple waste of time.
Regards,
Saurabh Nandu
www.MasterCSharp.com
Hi,
I would definitely vote on the cut and paste from VS. Coz for me, I usually test codes in VS and after I found the solution, it would be great if I could just cut and paste the code in the forum rather than re-typing it again...
cheers,
Paul June A. Domag
Improving Cut and Paste would definitely get by vote!
Best Regards,
Bart Vries
Hi,
I vote for Option 1.
I find pasting from Visual Studio the most comfortable option as I usually copy the code from the VS IDE which would have verified the code for correctness in terms of syntax etc.
Regards,
Vikram
I also vote for Option 1 and like wise usually do my coding in VS (test) and then paste to the forum...
<quote>But then how would you tag the post to contain code?</quote>
In either case we should still be able to enclose the code with the appropriate tags:"code language="vb"" and "/code" with the brackets 0f course
Contains code... you'll also notice that the post UI has a "This post contains code" checkmark.
josh
Yes, there is the check mark, but very few users will use it. Currently it gets turned on Automatically when someone uses the Code Formatting block.
Moderators would know and use it, but message posters generally do no go through the trouble of doing that.
Ditto; to the fact of expecting them to manually wrap their code in a Code Block
Regards,
Saurabh Nandu
www.MasterCSharp.com
Option 1: Cut and paste from VS or other RTF editor!!! I tend to mock up code in VS, get it working and then cut-paste-tidy-reindent-rearrange brackets-fix linespacing-etc. Making Cut & Paste just work would be excellent. For those who want to code directly in the forums, how about hosting the VS editor directly in the web browser? Just kidding. :D
I'd support cut and paste too bcause it is sooooooooooooooooo time consuming to paste something and to then have to go back and format it.
I vote for option #1.
Hope we can see this feature soon.
I think it's alread in?
OK here is a true confession. Within the last week, I've been using a new text editor downloadable of the net called Notepad2.
Since I've been using notepad2, cut and paste has been working just fine. What is missing are the token colors and I really missed those.