User:MjolnirPants/mediawiki lang npp

I have found it useful to be able to edit wikipedia outside of wikipedia itself. Rather than opening a second tab or window with my sandbox in it, I've taken to editing in Notepad++. This has the advantage of giving me the entire width of my screen for editing, as well as providing a storage place from which I can easily cut and paste. This page hosts the UDL (User Defined Language) .xml file I use for this purpose. I've included a screen shot to show the formatting it creates.

If you have any suggestions or comments, feel free to let me know here or on my user talk page. I've found this very useful, and I hope someone else does, too.

Notes, features & limitations

 * This UDL does not allow folding of code (meaning you cannot collapse sections).
 * It does not recognize keywords such as template or article names, and so it will not warn you if you typo something.
 * It will 'bleed' formatting past a tag if you forget to close it out.
 * It doesn't recognized nested tags, so it will not format a wikilink within a template, for instance.
 * There is currently no way to preview in Notepad++.
 * There is currently no way to implement additional text styles (right now there are 8, some of which are used for multiple markups.)

Installation
If you don't have it already, please download and install Notepad++. Don't worry, it's free and open-source. Once that's done, follow these steps.
 * 1) Open notepad (or Notepad++) and copy the code above into it.
 * 2) Save the file with whatever name you like, with the extension  . Make sure the   drop-down is set to   before you save. (If you use Notepad++ to save it, you can choose XML from that dropdown, instead of typing in the extension yourself.)
 * 3) Open Notepad++ and create a new document.
 * 4) Type some mediaWiki code into it. (Give it a section or two, add some wikilinks and comments and so on.)
 * 5) Save the document as whatever name you like, with the file extension  . Make sure that the   drop down list is set to.
 * 6) Click on   in the menu bar and select   from the drop-down.
 * 7) In the window that opens up, select the   button at the top.
 * 8) Browse to the location you saved the .xml file to and select it.
 * 9) If the text in your .wiki file hasn't changed formatting, click on the   menu item again. This time, you should notice   at the bottom of the list, below  . Select it.
 * 10) Enjoy your offline editing!

File Association
As an optional step, if you are using Windows you can also set Notepad++ to open .wiki files by default. To do this, complete the following steps:
 * Browse to the .wiki file you saved and double click on it.
 * When the dialog box stating that Windows can't open the file appears, choose  and click.
 * In the next window, make sure that  is checked at the bottom, and either find Notepad++ in the list of programs shown, or click   and browse to the folder that contains it.
 * Click  as many times as needed to close the boxes, and watch it open in Notepad++.

Linux Users
If you are a Linux user, you can still download Notepad++ and use this UDL. Just  Wine and make sure it is installed and working properly before downloading and installing Notepad++. Once this is done, follow the steps above for installation. If you use Ubuntu, Wine is available on the Ubuntu Software Center (at least it was the last time I checked).

Mac Users
If you are a Mac user, please do yourself a favor and get a computer that isn't designed to be the blackest box on the market. Just kidding! There is plenty of compatibility layer software designed to allow you to run Windows applications on your Mac. Unfortunately, few of them are free, so I'm not going to suggest one here.