Getting Edit | Comment Add to use block comments

Getting Edit | Comment Add to use block comments

1
NewbieNewbie
1

    Mar 29, 2005#1

    Hello,

    I do a lot of HTML/ColdFusion work and those languages tend to only have block comments.

    Is there a way to set up UE so that it will use block comments instead of single line comments for the Edit | Comment Add feature? This feature is always greyed out (disabled). I think that is because there isn't a line comment defined in my wordfile.

    I'm working on converting from MultiEdit 9.x to UE and ME could put a block comment on each line or as a block depending on how you highlighted the code to be commented. Example:

    <!--- single block
    comment for lots
    of lines
    of code when highlighed in a stream. --->

    or

    <!--- many block --->
    <!--- comments for lots --->
    <!--- of lines --->
    <!--- of code when highlighted as full lines. --->

    I also had hot keys for quickly commenting/uncommenting code. That should be easy to set up if I can get UE to use block comments...

    Thanks,
    sj

    6,605548
    Grand MasterGrand Master
    6,605548

      Mar 30, 2005#2

      This can be solved with macros, which are assigned to hotkeys and automatically loaded (not executed) at start of UE. The macros modify only when something is selected and the file extension is .html or .htm.

      Macro for adding "line" comments:

      InsertMode
      ColumnModeOff
      HexOff
      UnixReOff
      IfSel
      IfExtIs "html"
      Find RegExp "%^(*^)$"
      Replace All SelectText "<!-- ^1 -->"
      Else
      IfExtIs "htm"
      Find RegExp "%^(*^)$"
      Replace All SelectText "<!-- ^1 -->"
      EndIf
      EndIf
      EndIf

      Macro for removing "line" comments:

      InsertMode
      ColumnModeOff
      HexOff
      UnixReOff
      IfSel
      IfExtIs "html"
      Find RegExp "%<!-- ^(*^) -->$"
      Replace All SelectText "^1"
      Else
      IfExtIs "htm"
      Find RegExp "%<!-- ^(*^) -->$"
      Replace All SelectText "^1"
      EndIf
      EndIf
      EndIf
      Best regards from an UC/UE/UES for Windows user from Austria