Who can share an Objective-C wordfile?

Syntax highlighting, code folding, brace matching, code indenting, and function list

Who can share an Objective-C wordfile?

Postby Buddhist[CHinA] » Mon Feb 13, 2006 5:34 am

I have to use this old programming language. But without pre-defined wordfile, I can't review the code with highlighting.
Thx in advance.
User avatar
Buddhist[CHinA]
Newbie
 
Posts: 3
Joined: Mon Feb 13, 2006 12:00 am

Re: Who can share an Objective-C wordfile?

Postby MrBillG » Mon Feb 13, 2006 3:14 pm

Hi Buddhist

First off normally you would go to page Extra Downloads.

But in this case there is no Objective-C (or I couldn't find it). So what I do in those cases is visit TextPads web site www.TextPad.com
Dig down through Download --> Add-Ons --> Syntax Definitions
Anyway sure enough they have a syntax file for "C-Objective"
http://www.textpad.com/add-ons/files/syntax/objc.zip

UltraEdit wordfiles are in a different format than TextPad but keywords are keywords no matter who's editor you are using. That's the good news!

Now roll up your sleeves, UltraEdit allows only 8 groups of keywords /C1 through /C8.
I think I would copy and paste keywords from TextPad Objective-C into a new language definition for UltraEdit.

One real nice feature is as soon as you save "MyWordfile.txt" you can see the results in a Objective-C program to see if this is what you want your code to look like!

Next thing, UltraEdit help file is fantastic! Just lookup "Syntax Highlighting"

Okay let me give you some simple steps:
  1. Download "objc.zip" from TextPad's web site.
  2. Find UltraEdit's WORDFILE.TXT maybe it's C:\Program Files\UltraEdit\WORDFILE.TXT
  3. Copy WORDFILE.TXT to MYWORDFILE.TXT (this way you have the orginal and you can play with out damaging anything.)
  4. In UltraEdit goto pull down menu "Advanced" --> "Configuration.."
    click on the plus sign on "Editor Display" last one is "Syntax Highlighting"
    Change the "full path to wordlist:" to newly copied MYWORDLIST.TXT
  5. Now edit MYWORDFILE.TXT, you can create a new language /L12 or higher or go over the top of /L1"C/C++"
    (remember you still have a good copy of WORDFILE.TXT)
This should be a good start, if you have more questions just leave a message!
Good Luck
User avatar
MrBillG
Advanced User
Advanced User
 
Posts: 65
Joined: Sat Aug 07, 2004 11:00 pm

Re: Who can share an Objective-C wordfile?

Postby Buddhist[CHinA] » Tue Feb 14, 2006 4:03 am

Thx a lot for your detailed reply
User avatar
Buddhist[CHinA]
Newbie
 
Posts: 3
Joined: Mon Feb 13, 2006 12:00 am

Re: Who can share an Objective-C wordfile? testing result

Postby elim » Fri Feb 16, 2007 3:55 pm

Thank you both for introducing the topic and providing the nice solution.
I followed the instruction as I can and get the partial success:

code like

@implementation
@end
@class

are not highlighted as expected (see attached image from an objC IDE.

also, string literal in ObjC is of the form

@"This is a string"

But the highlighting in UE does not including the leading "@" as
expected,

Other than that, things work pretty well already.

I'm putting the testing code, hightling samples, my wordfile and the objc.syn here (95k)(direct attachment error. maybe zip is not allowed)

http://www.elinkage.net/objc_wordfile.zip

Please help to see what's I'm missing. Thanks a lot.
User avatar
elim
Newbie
 
Posts: 5
Joined: Mon Sep 12, 2005 11:00 pm

Re: Who can share an Objective-C wordfile?

Postby Mofi » Fri Feb 16, 2007 4:34 pm

Following is copied from syntax highlighting help of UE v13.00 Beta 2:

String Literal Prefix

UltraEdit supports specification of the string literal format by specifying a string prefix character in the language definition line. For example, in C# .NET 2.0, the string literal prefix would be defined as follows:

String Literal Prefix = @

In this case, the @ before a string literal indicates that a backslash is not an escape character which is really useful for entering path literals. To illustrate, the following two statements are equivalent:

   "c:\\data\\"
   @"c:\data\"

The only special character in a @"..." literal is the ", which is simple doubled if you want to embed one.

So just wait a few weeks till v13.00 of UltraEdit is released.
User avatar
Mofi
Grand Master
Grand Master
 
Posts: 4039
Joined: Thu Jul 29, 2004 11:00 pm
Location: Vienna

Re: Who can share an Objective-C wordfile?

Postby Buddhist[CHinA] » Fri Mar 16, 2007 3:31 pm

Sorry for bringing up this topic again. I downloaded the wordfile defined by elim. It works.

But there is still a little bit flaw - the methods can't be listed in FuntionList.

How to do that?

Thx.
User avatar
Buddhist[CHinA]
Newbie
 
Posts: 3
Joined: Mon Feb 13, 2006 12:00 am

Re: Who can share an Objective-C wordfile?

Postby elim » Wed Jun 09, 2010 7:40 pm

Who have the better word file than my old one, please share. Thanks a lot
User avatar
elim
Newbie
 
Posts: 5
Joined: Mon Sep 12, 2005 11:00 pm


Return to Syntax Highlighting

cron