Discussion Forums Code Formatter

All Replies

  • Monday, January 11, 2010 5:40 PM
     
     
    Let me throw the first stone then: Isn't the fact that we need an app for this a sign that the forum guys should get their sh*t together and make the feature work properly? Having an app is nice but the only people that know about it are the ones that hang around here a lot and they rarely ask questions. Personally i've gotten to the point if the first post looks like a mess i'm not even reading the question anymore which is (i know) unfair for the topic starter, taking the effort to include code is usually a good sign but they get screwed over by the forum platform mutalating whatever they pasted.  It's been a mess for quite a while now, what's going on?!
  • Monday, January 11, 2010 5:43 PM
     
     
    Is it possible to add Format Document to Forums Code Editor? i mean something like Edit->Advanced->Format Document in Visual Studio Edit menu.

    Also

    Is it possible to add IntelliSense to it?
    With best regards, Yasser Zamani
  • Monday, January 11, 2010 6:05 PM
     
     
    Perhaps I have been lucky, but the editor only causes me issues when I add textual data while <code> markup exists on the page.  

    When creating new posts I insert code blocks as a last step. 

    When editing existing posts I make a habit of extracting all my source code and deleting the <code> section (marked off with the square box).  Then, I make the textual changes I desire.  Finally, reinsert the code sitting on the clipboard using "insert code block". 


    BrianMackey.NET
  • Monday, January 11, 2010 6:21 PM
    Moderator
     
     
    I use FireFox, problem solved.

    Mark the best replies as answers. "Fooling computers since 1971."
  • Monday, January 11, 2010 6:30 PM
     
     
    Is it possible to add Format Document to Forums Code Editor? i mean something like Edit->Advanced->Format Document in Visual Studio Edit menu.

    Also

    Is it possible to add IntelliSense to it?

    These features are available in the IDE.  The formatter simply tries to retain the formatting of the code you copy from the IDE. 

    Brian Mackey:

    Have been as lucky trying to edit the code you posted using the Code editor?

    It's really personal preferences.  I like my code to reain the colorization and font size.  I also like it to be able to be copied, pasted, compiled and run in the IDE as it was when I posted it.
  • Monday, January 11, 2010 6:33 PM
     
     
    I use FireFox, problem solved.

    Mark the best replies as answers. "Fooling computers since 1971."

    Some features provided by Microsoft sites are (or were) only available to users of Internet Explorer. 
  • Monday, January 11, 2010 6:37 PM
     
      Has Code

    John Wein:

    When i copy from IDE there is always a offset from left of editor for all lines because i don't copy namespaces, classes, ... when i want to paste just a simple code. see following which is a code in namespace x class c method m in my IDE:

                byte[] bs = System.Text.Encoding.Unicode.GetBytes("Yasser.Zamani.Iran");
                string s = "";
                foreach (byte b in bs)
                    s += String.Format("{0:X}", b) + ",";
                Clipboard.SetText(s);
                return;
    

     

    there is 12 spaces in it's left, in other words it need reformatting.


    With best regards, Yasser Zamani
  • Monday, January 11, 2010 7:05 PM
    Moderator
     
     
    I use FireFox, problem solved.

    Mark the best replies as answers. "Fooling computers since 1971."

    Some features provided by Microsoft sites are (or were) only available to users of Internet Explorer. 


    Yep.  Tis true.

    Mark the best replies as answers. "Fooling computers since 1971."
  • Monday, January 11, 2010 7:18 PM
     
     
    there is 12 spaces in it's left, in other words it need reformatting.
    I'm guided by the KISS principle.  Please modify the code as you wish and post your enhanced version.
  • Monday, January 11, 2010 7:54 PM
     
     

    Unless Microsoft decides to enforce strict HTML, stops correcting open tags with no closing tags, and all kinds of other design error corrections we will not see an end to the design problems.  There's too much hand holding for poorly skilled designers/web makers.  All the hand holding leads to difficult debugging and often incorrect-corrections. 

    Combine those issues with a lack of good conversions from RTF to HTML and too much emphasis on legacy HTML compatability and we have this ugly mess.  I urge MS to stick to standardizations and quit allowing such loose coherence in the design side of things.  I don't blame Microsoft programmers for not being able to fix stoopid. 

    Tools should be easy to use because of their intuitive layouts, not because they ignore all of one's mistakes.  While I enjoy much of Microsoft's "fall into the pit of success" philosophy, we shouldn't let success = bypassing failure.

    Sure, keep windows simple enough so my Grandma can keep playing solitaire, but don't encourage her to start web design without any study (unless your goal is to create a new standard for web design, not to use existing HTML and legacy compatibility to make them do something they never intended to).


    BrianMackey.NET
  • Tuesday, January 12, 2010 5:55 AM
     
     
    there is 12 spaces in it's left, in other words it need reformatting.
    I'm guided by the KISS principle.  Please modify the code as you wish and post your enhanced version.

    Hi John Wein
    I am not captious of your great code, i mean the code editor which launch when i click "Insert Code Block" button in reply editor.
    Sorry!
    With best regards, Yasser Zamani