Notepad++ Color Scheme for Sublime Text 2

2 August 2012, Danny Connell

After several years of editing my HTML, PHP, JS, CSS (and every other type of) files with the fantastic Notepad++, I recently switched to (the even more fantastic) Sublime Text 2. I will be writing a detailed article on my reasons for the switch soon. In the meantime, this color scheme might help you take the jump too.

Although there are many things I love about Sublime Text 2, one thing I couldn't get cosy with was the built-in (syntax highlighting) color schemes. I missed the color scheme from Notepad++, so decided to rebuild the theme for Sublime Text 2.

The following images show the same file open in Notepad++ and Sublime Text 2 (with the Notepad++ theme). There are a few subtle differences as you can see, but I'd say it's pretty darn close and you'll barely notice the difference (at least for HTML, JS, CSS editing anyway).

Notepad++

Notepad++

Sublime Text 2 - with Notepad++ Color Sheme

Sublime Text 2 - with Notepad++ Color Sheme

The color scheme is based on this color scheme from jQuery 4u.

This was a good start (thanks Sam!), but had many color differences from the default Notepad++ scheme, which I've (hopefully) fixed!

Installation (for Windows Vista/7):

  • Save the Notepad++ Color Scheme for Sublime Text 2 (.tmTheme file) to the following folder:
    C:Users[your username]AppDataRoamingSublime Text 2PackagesColor Scheme - Default
  • In Sublime, choose from the menu Preferences > Color Scheme > Notepad++
  • To seal the deal, go to Preferences > Settings - User.
  • Add the following lines before the last bracket in the file and save:
    "font_face": "Courier New",
    "highlight_line": true,
    "line_padding_bottom": 1,
    "line_padding_top": 1

Shout up if you find any glaring problems with the color scheme that you want me to fix.

Enjoy!

Read more

Right click > "Add new website template" in Windows 7

1 August 2012, Danny Connell

      Like many developers, I have a website template that I use as a starting point for every web project I do, whether it's a client project, or just a quick demo page.

This is made up of an index.html file, along with a folder named assets which contains folders for css, fonts, images and js and some respective files therein.

I find myself using this template more and more frequently, and every time I must: open Explorer, navigate to my template folder, then copy and paste it to the location I'm currently working in.

Bit of a ballache!

Wouldn't it be great if I could just right click anywhere and have an option to create a new website folder right there?

Here's how!

  • Press Win Key, type regedit and hit Enter to launch the registry editor
  • Navigate to HKEY_CLASSES_ROOT > Directory > Background > shell
  • Right click on shell and choose New > Key
  • Enter the name NewWebsiteTemplate and hit Enter
  • On the right hand pane, double click (Default)
  • In the text field, enter New website template (or whatever you want it to say on the right-click menu).
  • Right click on NewWebsiteTemplate and choose New > Key
  • Enter the name Command and hit Enter
  • In the right-hand pane, double click (Default)
  • Enter the following text, replacing the first path with the path where you keep your template (I keep mine in a dropbox subfolder so that I always have an up-to-date copy wherever I am):
    xcopy "C:\Dropbox\website template" "%V\New website template\" /E
  • Hit Enter

Registy editor - Right click > Add new website template in Windows 7

And that's it! Alternatively, you can save the following file, open it, change the first path to the path of your template, save it and double click it to apply the registry changes.

Download registry file

If anyone can make this better and add the option to the right click > New menu, please shout up!

Read more