jed-users mailing list

[2007 Date Index] [2007 Thread Index] [Other years]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]

Folding & Perl Mode


The default fold marker "#{{{" doesn't work nicely with indentation in
perl. For example:

if (1) {
    some_code();
    if (0) {
    #{{{1st fold
#indentation lost
some_more_code();
#}}}
    # indentation level restored
    more_code();
}

Changing the fold marker to "# {{{" would seem to fix the indentation
problem, but I have not been able to accomplish this.

I have read this thread (see link below) and tried the example code, but I
cannot seem to get perl mode to use anything besides the default fold
marker.

  http://207.106.6.205/jed-users/msg01903.html

This is my .jedrc :

LINENUMBERS=1;
USE_TABS=0;

Fold_Mode_Ok = 1;

% see http://207.106.6.205/jed-users/msg01903.html
define global_mode_hook (mode_hook)
{
   switch (mode_hook)
     {
      case "sh_mode_hook":
        mode_set_mode_info ("SH", "fold_info", "# {{{\r# }}}\r\r");
      case "perl_mode_hook":
        mode_set_mode_info ("PERL", "fold_info", "# {{{\r# }}}\r\r");
     }

   if (NULL == mode_get_mode_info ("fold_info"))
     mode_set_mode_info ("fold_info", "# {{{\r# }}}\r\r");
   if (mode_hook != "fold_mode_hook")
     folding_mode ();
}

Has anyone successfully change the fold marker for perl?

Martin




--------------------------
To unsubscribe send email to <jed-users-request@xxxxxxxxxxx> with
the word "unsubscribe" in the message body.
Need help? Email <jed-users-owner@xxxxxxxxxxx>.


[2007 date index] [2007 thread index]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]