home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 5 Edit / 05-Edit.zip / vile-src.zip / vile-8.1 / doc / hilite.doc < prev    next >
Internet Message Format  |  1998-09-29  |  1KB

  1. Date: Mon, 28 Sep 1998 19:37:47 -0700 (PDT) 
  2. From: "Kuntal M. Daftary" <daftary@cisco.com> 
  3. Subject: syntax hiliting 
  4.  
  5. now that the latest patch is out, i can forward you guys this syntax 
  6. hiliting perl library i have been using for some time.  
  7.  
  8. the library utilizes the concept of syntax definitions where in the user 
  9. defines the syntax for each different language - like the keywords, 
  10. identifiers, types, varibales, constructs, constants, comments, etc. 
  11. the library then uses the majormode to decide which syntax definition to 
  12. use and hilites the file accordingly using a common hiliting procedure. 
  13.  
  14. the library includes examples for perl, tcl and c languages. 
  15.  
  16. optionally, one can define the hiliting procedure rather than using the 
  17. builtin one (example for "mailmode" included). 
  18.  
  19. the following two lines need to be added to .vilerc 
  20.  
  21. ---------------------------------------- 
  22. perl "Vile::register 'synon', 'synon', 'Syntax Hilighting, do', 'syntax.pl'" 
  23. perl "Vile::register 'synoff', 'synoff', 'Syntax Hilighting, undo', 'syntax.pl'" 
  24. ---------------------------------------- 
  25.  
  26. this way :synon turns on hiliting and :synoff turns off hiliting. 
  27.  
  28. also put the attached files in your ~/.vile/perl directory. 
  29.  
  30. warning: be warned that the hiliting is a little slow, and not 100% 
  31. robust. it is not as clean as vim's :-( due to the simplistic approach. 
  32. but maybe with a concept of "contained" it can be improved. 
  33.  
  34.  
  35. Kuntal Daftary 
  36. daftary@cisco.com 
  37.