Ticket #2606 (new enhancement)

Opened 13 years ago

Last modified 12 years ago

exim configuration syntax highlight

Reported by: 1099511627776 Owned by:
Priority: trivial Milestone: Future Releases
Component: mcedit Version: 4.8.0-pre2
Keywords: Cc:
Blocked By: Blocking:
Branch state: no branch Votes for changeset:

Description

syntax file for exim configuration:

wholechars abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_01234567890.-
context default
    keyword = white
    keyword : yellow
    keyword ! red
    keyword # brown
    keyword \/\/ brown
    keyword ${ green
    keyword } green
    keyword whole domainlist brightcyan
    keyword whole begin brightcyan
    keyword whole acl brightcyan

    keyword whole warn cyan
    keyword whole accept cyan
    keyword whole reject cyan
    keyword whole drop cyan
    keyword whole deny cyan
    
    keyword whole condition brightcyan
    keyword whole set brightcyan
    keyword whole verify brightcyan
    keyword whole sender brightcyan
    keyword whole recipient brightcyan
    keyword whole hosts brightcyan
    keyword whole domain brightcyan    
    keyword whole transport brightcyan
    keyword whole driver brightcyan
    keyword whole log_message brightcyan
    keyword whole message brightcyan
    keyword whole add_header brightcyan
    keyword whole authenticated brightcyan
    keyword whole callout brightcyan
    keyword whole local_parts brightcyan
    keyword whole domains brightcyan
    keyword whole endpass brightcyan
    keyword whole no_more brightcyan
    keyword whole primary_hostname brightcyan
    keyword whole relay_from_hosts brightcyan
    keyword whole hostlist brightcyan
    keyword whole auth_advertise_hosts brightcyan
    keyword whole daemon_smtp_ports brightcyan
    keyword whole smtp_receive_timeout brightcyan
    keyword whole log_selector brightcyan
    keyword whole spamd_address brightcyan
    keyword whole av_scanner brightcyan
    keyword whole qualify_domain brightcyan
    keyword whole allow_domain_literals brightcyan
    keyword whole never_users brightcyan
    keyword whole ignore_bounce_errors_after brightcyan
    keyword whole ignore_fromline_hosts brightcyan
    keyword whole ignore_fromline_local brightcyan
    keyword whole timeout_frozen_after brightcyan

    keyword whole message_size_limit brightcyan
    keyword whole split_spool_directory brightcyan
    keyword whole remote_max_parallel brightcyan
    keyword whole return_size_limit brightcyan

    keyword whole spf brightcyan
    keyword whole helo_allow_chars brightcyan
    keyword whole auto_thaw brightcyan
    
    keyword whole senders brightcyan
    keyword whole decode brightcyan
    keyword whole spam brightcyan
    keyword whole malware brightcyan
    keyword whole demime brightcyan
    keyword whole data brightcyan
    keyword whole mode brightcyan
    keyword whole user brightcyan
    keyword whole group brightcyan
    keyword whole allow_fail brightcyan
    keyword whole allow_defer brightcyan
    keyword whole file_transport brightcyan
    keyword whole pipe_transport brightcyan
    keyword whole reply_transport brightcyan

    keyword whole public_name brightcyan
    keyword whole return_path_add brightcyan
    keyword whole quota brightcyan
    keyword whole delivery_date_add brightcyan
    keyword whole check_string brightcyan
    keyword whole directory brightcyan
    keyword whole directory_mode brightcyan
    keyword whole envelope_to_add brightcyan
    keyword whole return_output brightcyan
    keyword whole create_directory brightcyan
    keyword whole address_retry_include_sender brightcyan
    keyword whole hide brightcyan
    keyword whole mysql_servers brightcyan
    
    keyword wholeright smtp_* brightcyan
    keyword wholeright rfc1413_* brightcyan
    keyword wholeright recipients_max* brightcyan
    keyword wholeright system_filter* brightcyan
    keyword wholeright maildir_* brightcyan
    keyword wholeright message_* brightcyan
    keyword wholeright quota_warn_* brightcyan
    keyword wholeright server_* brightcyan
    
    
    keyword wholeright dkim_* brightcyan
    keyword wholeright tls_* brightcyan

    keyword wholeright acl_m* brightgreen
    keyword wholeright acl_c* brightgreen

    keyword wholeright acl_* yellow
    
context " " green
    spellcheck

context exclusive # \n brown

context exclusive = \n magenta
wholechars abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_01234567890
    keyword \\\n red
    keyword \\ red
    keyword \/\/ brown
    keyword "*" green
    keyword '*' green
    keyword \/\/*\n brown
    keyword wholeright $* brightgreen

context exclusive \/\/ \n brown

    
context exclusive ${ } green
    spellcheck

Attachments

exim.syntax (4.2 KB) - added by 1099511627776 13 years ago.
exim.syntax

Change History

Changed 13 years ago by 1099511627776

exim.syntax

comment:1 Changed 13 years ago by 1099511627776

  • Keywords syntax highlight added

comment:2 follow-up: ↓ 3 Changed 12 years ago by andrew_b

  • Keywords syntax highlight removed

Patch for Syntax file is also required.

comment:3 in reply to: ↑ 2 Changed 12 years ago by 1099511627776

Replying to andrew_b:

Patch for Syntax file is also required.

I'm afraid that patch Syntax file would be an universal solution for all platforms.
For example in FreeBSD by default the configuration file is called "configuration" and is put to the /usr/local/etc/exim folder.
In debian squeeze the are a bunch of files in /etc/exim4/ folder and sub-folders called:

  • 01_exim4-config_listmacrosdefs
  • 02_exim4-config_options
  • 03_exim4-config_tlsoptions

and so on
For freeBSD i can give you a patch and it would look like this:

 diff -rcs ./ss ./Syntax
*** ./ss        Fri Jul 27 12:02:50 2012
--- ./Syntax    Fri Mar 23 09:55:27 2012
***************
*** 241,245 ****
--- 241,249 ----
  file ..\*\\.(l|y|yxx|ypp)$ Lex/Flex/Yacc/Bison\ssource
  include yxx.syntax

+ file .\configure exim
+ include exim.syntax
+
  file .\* unknown
  include unknown.syntax
+

comment:4 Changed 12 years ago by andrew_b

Ok, we can't use file name because it can be any. We can try to use first line of file to detect that file is exim configuration. We can expect that first line should be something like this:

# exim configuration

In this case, the item in Syntax will be:

file .\* Exim\sConfiguration ^#\sexim\sconfiguration
include exim.syntax

comment:5 Changed 12 years ago by 1099511627776

That's ok with me

Note: See TracTickets for help on using tickets.