Tuesday, 24 January 2012

DarkBasic and Notepad++

Syntax highlighting is my #1 requirement from an editor.  If anyone else wants to view DarkBasic source code in Notepad++, you can use the following UDL to get most of the way there.

  1. Save the XML below to "something.xml". If you mouse over the top right hand corner of the highlighted source area, you can find buttons that let you view the source and copy/paste it.
  2. Open "User-Defined Dialogue" in the view menu.
  3. Dock it.
  4. Click on the "Import" button and select the saved XML file.
  5. Close any open DarkBasic files and reopen them to ensure they get the hightlighting (needed? dunno).

    
        
            
            
            
        
        
            000000
            
            
            ' - ! " # $ % & ( ) * , . / : ; ? @ [ \ ] ^ { | } ~ + < = >
             1 2 0`
            dim as dword for to rng rnd sync on rate skipsyncmode set display mode desktop width height autocam hide next position inc prepare matrix texture trim make object box sphere update add delete rotate limb offset do loop if endif else text end curvevalue camera point constant function create bitmap endfunction ink get image save and or write memblock from atanfull sin cos circle wrapvalue mouse color backdrop aspect tile show mesh
            
            
            
        
        
            
            
            
            
            
            
            
            
            
            
            
            
            
            
        
    

2 comments:

  1. Well, that didn't work. "Import failed." message.

    ReplyDelete
  2. You'll have to sort it out yourself, sorry. It's likely a cut and paste error, where the blog post has munged the formatting. If you compare the text to an existing notepad++ syntax file, it should be easy fix. Or you can hand-build it, like I did.

    ReplyDelete