Notepad++ – Define a New Language

Notepad++ is a very powerful editor and it also have this flexibile to define new “languages”, or more precisely highlighting schemes.

Let’s go through an example of adding a new language for an iCal or .ics file. By the way, ICS is a global format for calendar files widely being utilized by various calendar and email programs including Google Calendar, Apple iCal, and Microsoft Outlook.

NB: If you do not have an iCal file, go to http://www.calendarlabs.com/ical-calendar-holidays.php to download one and view it using Notepad++.

iCal file without Language in Notepad++

iCal file without Language in Notepad++

Steps to defining a new language:

  1. Go to http://docs.notepad-plus-plus.org/index.php/User_Defined_Language_Files where you can download many language files which are ready for use.
  2. Go to ‘iCalendar’ and save this xml (userDefineLang_iCalendar.xml) file to your computer.

    Save Language File (XML)

    Save Language File (XML)

  3. Launch Notepad++ and Go to ‘Language’ -> ‘Define your language…’.
  4. Click on ‘Import…’ button and select the ‘userDefineLang_iCalendar.xml’ that you have saved to computer earlier.
  5. A “Import successful” popup will appear.

    Import Successful of Language File

    Import Successful of Language File

  6. Click OK and restart Notepad++.
  7. Go to ‘Language’ menu and a new language called ‘icalendar’ should appear.

    icalendar Language

    icalendar Language

  8. The .ics file should now have a highlighting scheme as shown below 🙂

    iCal file with Language in Notepad++

    iCal file with Language in Notepad++

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s