Jump to:

3431 Posts in 1025 Topics by 864 members

Template Questions

SilverStripe Forums » Template Questions » HOWTO: Get gedit to recognise .ss files as HTML

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 1494 Views
  • mobius
    Avatar
    Community Member
    54 Posts

    HOWTO: Get gedit to recognise .ss files as HTML Link to this post

    Hi guys,

    It took me a while to figure this, so I'm posting it here in the hope it will be helpful to others.

    If you use Linux/GNOME as your development environment you may be annoyed by the fact that .ss files, when opened by gedit, display as just plain text with no syntax highlighting.

    To fix this, simply edit ~/.local/share/mime/packages/user-extension-ss.xml to look like the following:

    <?xml version="1.0" encoding="UTF-8"?>
    <mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info">
    <mime-type type="application/x-extension-ss">
    <comment>ss document</comment>
    <glob pattern="*.ss"/>
    <sub-class-of type="text/html"/>
    </mime-type>
    </mime-info>

    Then run

    update-mime-database ~/.local/share/mime

    , restart gedit and you should be good to go!

  • Willr
    Avatar
    Forum Moderator
    5482 Posts

    Re: HOWTO: Get gedit to recognise .ss files as HTML Link to this post

    You should make a page on our tools section - http://doc.silverstripe.com/doku.php?id=tools.

  • Artyom
    Avatar
    Community Member
    22 Posts

    Re: HOWTO: Get gedit to recognise .ss files as HTML Link to this post

    Which Linux / GNOME are you running? I, for one don't have a share/mime dir... I'm running Ubuntu 8.04

  • mobius
    Avatar
    Community Member
    54 Posts

    Re: HOWTO: Get gedit to recognise .ss files as HTML Link to this post

    Artyom: I'm running Ubuntu 9.04. Make sure you have hidden files shown (note the '.' in .local). Let me know if you're still having troubles (and check the wiki link below, I've been a bit more detailed)

    Willr: done: http://doc.silverstripe.com/doku.php?id=tools:gedit

  • Artyom
    Avatar
    Community Member
    22 Posts

    Re: HOWTO: Get gedit to recognise .ss files as HTML Link to this post

    [EDIT]

    Sorry, false alarm. Not sure why I couldn't find it yesterday... must have been late. (I though i could see ~/.local/share, but had no mime dir in it... )

    Worked beautifully. thanks for the tip!

    [/EDIT]

    1494 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.