PCgoblin's Blog

Fixing everyday PC problems on my PC

Add custom syntax formatting to Notepad++ for VFP (Visual FoxPro)

I am a great fan of the open-source Notepad++, the ideal — and free-of-charge — text editor.

Notepad++  overcomes the severe limitations of the basic Notepad which comes with Windows.

As an occasional user of VFP 9 (Visual FoxPro), I wondered how to use Notepad++ as my default editor for .PRG files.

Being extensible, Notepad++  allows for user defined language files, to add syntax colouring. and formatting. An extensive list of languages is provided for download on Sourceforge.

To install support for VFP:

  • Locate the entry for Visual FoxPro and download file userDefineLang_VisualFoxPro.xml.
  • Check whether you already have a userDefineLang.xml.  As mentioned on the SourceForge page, with my 64-bit Windows 7, rather than this being in C:\Program Files (x86)\Notepad++, it was required in <user>\AppData\Roaming\Notepad++.
  • If you do not have an userDefineLang.xml file already: save the file userDefineLang_VisualFoxPro.xml in this folder, then rename it to userDefineLang.xml.
  • If you do have an userDefineLang.xml file already: select all the text from userDefineLang_VisualFoxPro.xml, and paste it at the end of userDefineLang.xmlThis will probably have created a spurious </Notepad_Plus><Notepad_plus> pair (or similar) in the middle, each tag on a line by itself. Remove these two consecutive lines.
  • Close Notepad++.
  • Run Notepad++.
  • Take menu option Languages. Near the bottom of the menu you should find an entry for “Visual FoxPro”. Syntax formatting should now work for this!

April 10, 2013 - Posted by | Uncategorized | , ,


  1. thank you so much. you know what, foxpro stuff are hard to find nowadays. viva la fox!

    Comment by xiaoxing | December 5, 2013 | Reply

  2. Exactly what I needed. Thanks a lot!

    Comment by FoxDev | February 20, 2014 | Reply

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 )

Google+ photo

You are commenting using your Google+ 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 )

Connecting to %s

%d bloggers like this: