Thursday, October 2, 2014

View source code quickly with windows preview


If you want to view your source code in windows preview you will need to add two items to the registry entry for that file type.  Open your registry editor (window key+R, regedit.exe) and find the class definition for your file type.  In the registry editor it will be under Computer\HKEY_CLASSES_ROOT\.  The example I'm using is for Progress 4GL .p source code files.


Then you will need to add a string named "Content Type" with a value of text/plain and another string named "PerceivedType" with a value of text.

Now you can see your code in the preview window.