Tagged: source code Toggle Comment Threads | Keyboard Shortcuts

  • Jay Versluis 10:08 am on November 15, 2013 Permalink | Reply
    Tags: source code   

    Categories: Dreamweaver ( 12 )

    How to auto indent and collapse source code in Dreamweaver 

    I keep forgetting where and how to find this feature. Turns out the Command menu gives us such features:

    Screen Shot 2013-11-15 at 09.58.24

    • Commands – Apply Source Formatting (to Selection)

    Applies the correct indentations to the entire file, or your selection only. It’s the equivalent of Xcode’s “Editor – Structure – Re-Indent”.

    To manually move blocks of code, select the lines that need to be shifted, then hold down OPTION + CMD and press the square brackets to indent and outdent respectively. Not sure what these keys are on Windows.

    Collapsing Code

    On this note, it is also possible to collapse code that you don’t want to look at. It’s not as easy as using Xcode’s method collapse option. In Dreamweaver, you select the code you want to collapse, then hit one of the little triangles that appears on the left hand side.

    Selected but uncollapsed code

    Selected but uncollapsed code

    Click on the triangle to collapse/uncollapse

    Click on the triangle to collapse/expand

  • Jay Versluis 11:44 am on April 2, 2011 Permalink | Reply
    Tags: , , source code   

    Categories: Screencast, WordPress ( 76 )

    How to post code when you leave a comment 

    Sometimes you want to leave a comment and post code to demonstrate what is or isn’t working. For security though, pure HTML and PHP is filtered out – otherwise evildoers could post malicious code wherever they can.

    In this screencast I will show you how to post code in comments so it can be displayed but not executed. This is meant to be for WordPress, but may well work with any system that let’s you post as a user.


  • Jay Versluis 2:40 pm on January 25, 2011 Permalink | Reply
    Tags: , discussion, , , source code, ,   

    Categories: WordPress ( 140 )

    Workshop: How to post Source Code in your Comments 

    In this workshop I’ll show you how you can make source code show up in your comments. I’ll also show you how to format it so it looks different to ordinairy text.

    By default, WordPress strips out most HTML tags for security reasons. That’s a good thing, however if you’d like to share some HTML or PHP source code with someone it won’t show up. The workaround is to paste the code into an empty post via the visual editor, then switch to the HTML editor and copy the resulting transcoded characters.

    This works because single characters are not executable by the web browser and hence do not pose a security risk. It’s a bit tedious if you deal with code a lot, but it’s a safe solution and does not require any plugins.


compose new post
next post/next comment
previous post/previous comment
show/hide comments
go to top
go to login
show/hide help
shift + esc