What text editor do you use?

Recently, I've been doing more work with modifying RibbonX (XML) code.  I started off in the CustomUI editor, which is essentially just a text editor that links to Office's XML schema for validation.  As the files got longer, and scrolled off the screen, however, this great little program started to get really annoying.  It started flashing... a lot.

When your code does not all fit in one screen, and the top line has scrolled off the screen, the editor keeps refreshing to put your cursor on the last visible line of code.  So if you're editing and want to read something five lines below, you need to type, scroll down, type, scroll down.  Every time you start hitting keystrokes, it refreshes with a flash to make sure the line of code you are writing is at the bottom of the screen.  Honestly, it's enough to give you a headached.

Another shortcoming of the program is that there is no Find/Replace ability in it.  Personally, I'm not so used to XML that I write everything correctly the first time, and I'm also not totally used to my naming conventions either.  I frequently go back to update things to make them conform to what I want.

My solution is to copy all my XML to Notepad, edit it there, then copy it back to the CustomUI editor for validation and saving.  It's painful, but it does work.  Notepad, of course, leaves some wants there as well.
Does anyone use other text editors?  Can you link it to validate the XML right in the editor?  I'm curious to know if I could get one (free) full featured program to do all of my editing, and just paste it back to the CustomUI editor for saving.

5 thoughts on “What text editor do you use?

  1. Not too bad once you get use to it.

    The best method for getting the xml from notepad to CustomUI editor is to use the menu item View > Source.
    This opens standard note pad and allows you to return some layout structure to the file.

  2. Hi Andy,

    I managed to download and have a very brief play with it. Got the XML schema hooked in, which is cool. It seems that you have to grab your existin CustomUI, save it to Notepad and save as an XML file to open it in the XML Notepad app... unless I'm missing something really simple (which I hope I am.)

    The UI looks interesting at first glance though. I like that you can right click and get a list of elements. That's very cool. 🙂

  3. Yes getting the xml into notepad is a little bit of a pain.
    You have to go via customui or through the steps MS outline, which is to change the file extension to ,zip and then naviagate through the file structure to the xml file.

  4. One of the things that surprised me the most about this is that there is no File|New command in there. You must open up an existing xml file. So if you're trying to start off a new CustomUI, you either need to create it in plain old notepad (not XMLNotepad) first, or start with the CustomUI editor anyway.

    Going the "classic" route of changing to zip would work, although again, if it's your first trip in there, you'd need to start everything from scratch.

    Thinking out loud... one could build a standard xml file (containing the framework up to and including the portion as a template, and drop it in there. Just leaves the rels linkage to deal with then. Or maybe the setup is done via CustomUI, then the building done in XMLNotepad since CustomUI takes care of all the UI file creation and rels linkages.

    It's a shame that the XMLNotepad can't be set to automagically open OpenXML files like CustomUI. (Probably can, but I'm guessing you'd need to know C#.) Regardless it won't have the callback generation feature that CustomUI has either.

    I have yet to build a full customization in XMLNotepad, and may tonight, but I can certainly see some advantages in doing it in this app. I really liked the drop-down list of arguments for the attributes that you don't get in CustomUI. Much easier than looking through tables of documentation and hoping you've got all the cases just right. 🙂

If you have a comment or question about the blog post content, please feel free to post it here. If you need help adapting this solution to your own needs, please post in our free help forum.

Your email address will not be published. Required fields are marked *