Grow your CSS skills. Land your dream job.

Using Sublime Text 2 with PRE and CODE annoyance.

  • # October 19, 2012 at 5:37 pm

    Howdy beautiful people of css-tricks… I use Sublime Text 2 religiously and love it, but as of late im having an annoying problem (more like annoyance).

    On my website i show code snippets. What i use is Google’s prittyprint and a custom theme i created, well a couple different themes. But when i add my code in Sublime i cannot add any indentions between the pre element. Otherwise it will indent my code when rendered.

    I was wondering if anyone else has had this problem or if this is just a common “suck it up and deal with it” kind of situation.

    If yall need some more clarification ill take some screen shots. Basically i want to indent my pre elements in my text editor (to have nice clean readable code) rather than having them indent on my actual page.

    Thanks guys…

    # October 21, 2012 at 2:21 am

    I use google Prettyprint without knowing quite that well how it works…but I am not understanding what “indentations between pre” is…

    # November 11, 2012 at 2:49 pm

    Basically, when i write some code (< pre >< code >), i want it to look aligned with the rest of the code, readable, etc. When i use pre and code tags, it makes it difficult because if i add any tabs or spaces, it will render those tabs and spaces as well

    Code indention:
    Pre Code Tabing

    Code Rendering:
    Pre Code Rendering

    # November 11, 2012 at 3:17 pm

    I think I’d call this a “Suck it up and deal with it” situation. You can’t really get around it since you want your text-editor not to show you the *actual* HTML. There are ways of achieving what you want but it would be much to much effort for very little reward.

    # November 11, 2012 at 3:20 pm

    @jamy_za, alright man. Doing some research on the matter i think you’re right. Im just gonna have to suck it up. Thanks for confirming lol..

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".