Tapatalk

Create a "plain text" syntax definition for e-mail quoting

Create a "plain text" syntax definition for e-mail quoting

25
Basic UserBasic User
25

    Jan 28, 2006#1

    I wanted to be able to use the "Comment Add" and "Comment Remove" to add and remove "> " e-mail quote marks in plain text files, or files that don't have a syntax highlight definition in the word file. I discovered that this isn't directly possible, but I worked around this limitation by creating the following definition in my word file:

    Code: Select all

    /L1"Text" "Line Comment Num = 2> " Line Comment Valid Columns = [1] File Extensions = * "String Chars ="
    /Open Brace Strings = ""
    /Close Brace Strings = ""
    This definition creates "> " as the quoting string, and indicates that it's only a quote when it occurs in the first column. It specifies all extensions (*), and disables string characters. The quotation marks around "String Chars =" is required to disable string highlighting (presumably, setting it to blank is the same as resetting it to the default, e.g. ' and "). I also set the open and close brace strings to empty ("") to disable brace highlighting for plain text.

    After that, I went into the syntax highlight dialog and set the color for numbers to the same color as text for this language definition.

    Now I can use the commenting commands to "quote" lines in plain text files.

    Bill

    6,685587
    Grand MasterGrand Master
    6,685587

      Re: Create a "plain text" syntax definition for e-mail quoting

      Jan 29, 2006#2

      This is your definition without errors and dirty tricks:

      /L1"Text" Noquote Line Comment Num = 2>  Line Comment Valid Columns = [1] File Extensions = *
      /Open Brace Strings = ""
      /Close Brace Strings = ""

      The Noquote keyword disables string highlighting and the "" around the Line Comment Num definition are also useless.
      Note: There are 2 spaces after 2>.
      Best regards from an UC/UE/UES for Windows user from Austria

      25
      Basic UserBasic User
      25

        Re: Create a "plain text" syntax definition for e-mail quoting

        Jan 30, 2006#3

        Hello Mofi,

        I missed the Noquote keyword in the documentation. Thanks!

        Bill