Loading ...
Sorry, an error occurred while loading the content.
 

Re: [edit+] File type detection

Expand Messages
  • Mark Kahn
    almost...can t figure out how to get it to work with multiple extensions of the same file type other than the obvious duplicating the file type for every
    Message 1 of 11 , Sep 19, 2008
      almost...can't figure out how to get it to work with multiple extensions of
      the same file type other than the obvious duplicating the file type for
      every extension...MEH

      -Mark

      On Fri, Sep 19, 2008 at 11:11 AM, Mark Kahn <cwolves@...> wrote:

      > nevermind, it apparently needs to match the entire file name, not just a
      > partial match. So...
      >
      > *.js.*.bak works! YAY! opening backup files now highlights!
      >
      > -Mark
      >
      >
      > On Fri, Sep 19, 2008 at 11:09 AM, Mark Kahn <cwolves@...> wrote:
      >
      >> woo-hoo!
      >>
      >> Okay, I'm trying to get this working with backup files. Any ideas? The
      >> box says "An additional file name (allows * and ?)". So I tried
      >>
      >> \.js\..*\.bak
      >> .js.*.bak
      >> .js*.bak
      >> js*bak
      >> js.*bak
      >>
      >> nothing seems to work. The pattern I'm trying to match is
      >>
      >> filename.js.SOMEDATE.bak
      >>
      >> which, of course, I'll also use for every other extension once I figure it
      >> out :)
      >>
      >> -Mark
      >>
      >>
      >> On Fri, Sep 19, 2008 at 10:59 AM, dz@... <dz@...> wrote:
      >>
      >>> Hello:
      >>> I don't know if this is old hat, but I just very
      >>> recently noticed what is, to me, a brand new feature
      >>> in EditPlus: Automatic file detection based on
      >>> additional criteria other than file extension.
      >>>
      >>> If you go to the "Preferences|Files|Settings &
      >>> Syntax" panel, next to the "File extensions" field
      >>> you'll see a button that says "More...". When
      >>> clicked, it opens a dialog box where you can set
      >>> filename wildcards or a specific string marker at the
      >>> beginning of the file to help in detecting this
      >>> particular file type.
      >>>
      >>> Again, I'm sorry if this is old news, but if it
      >>> is, I can't believe I missed it before! It is truly
      >>> a nice feature, since some specific file types with
      >>> which I deal regularly either do not have file
      >>> extensions, or share an extension defined by another
      >>> more common type. Using wildcards or file string
      >>> markers is great help indeed.
      >>>
      >>> -dZ.
      >>>
      >>>
      >>>
      >>
      >>
      >


      [Non-text portions of this message have been removed]
    • dz@caribe.net
      I had no problems with this. I just did a test and it worked as I expected. Here s what I did: - I created a new type called BACKUP 1 and set the pattern
      Message 2 of 11 , Sep 19, 2008
        I had no problems with this. I just did a test and
        it worked as I expected. Here's what I did:

        - I created a new type called "BACKUP 1" and set the
        pattern to "*.one.bak".
        - I created a new type called "BACKUP 2" and set the
        pattern to "*.two.bak".
        - I created a simple syntax file with a couple of
        keywords and assigned it to both types.
        - I set the keyword syntax highlight for different
        colors on each of the new types.

        I then created two test files. Actually, one single
        file which I copied with a different name. The names
        were: "testfile.one.bak" and "testfile.two.bak".

        I opened both in EditPlus and, sure enough, each one
        got a different color highlight.

        I think the key is to judiciously use the various
        criteria available. I guess if you specify an
        extension, that will take precedence. If you created
        different types and set "bak" as the extension to all
        of them, then I guess it doesn't matter what
        additional criteria there is, if the file ends with
        "bak", it will be recognized as the first type with
        that explicit extension.

        -dZ.



        >------- Original Message -------
        >From : Mark Kahn[mailto:cwolves@...]
        >Sent : 9/19/2008 2:15:01 PM
        >To : editplus@yahoogroups.com
        >Cc :
        >Subject : RE: Re: [edit+] File type detection
        >
        >almost...can't figure out how to get it to work
        with multiple extensions of
        the same file type other than the obvious duplicating
        the file type for
        every extension...MEH

        -Mark

        On Fri, Sep 19, 2008 at 11:11 AM, Mark Kahn
        <cwolves@...> wrote:

        > nevermind, it apparently needs to match the entire
        file name, not just a
        > partial match. So...
        >
        > *.js.*.bak works! YAY! opening backup files now
        highlights!
        >
        > -Mark
        >
        >
        > On Fri, Sep 19, 2008 at 11:09 AM, Mark Kahn
        <cwolves@...> wrote:
        >
        >> woo-hoo!
        >>
        >> Okay, I'm trying to get this working with backup
        files. Any ideas? The
        >> box says "An additional file name (allows * and
        ?)". So I tried
        >>
        >> \.js\..*\.bak
        >> .js.*.bak
        >> .js*.bak
        >> js*bak
        >> js.*bak
        >>
        >> nothing seems to work. The pattern I'm trying to
        match is
        >>
        >> filename.js.SOMEDATE.bak
        >>
        >> which, of course, I'll also use for every other
        extension once I figure it
        >> out :)
        >>
        >> -Mark
        >>
        >>
        >> On Fri, Sep 19, 2008 at 10:59 AM, dz@...
        <dz@...> wrote:
        >>
        >>> Hello:
        >>> I don't know if this is old hat, but I just very
        >>> recently noticed what is, to me, a brand new feature
        >>> in EditPlus: Automatic file detection based on
        >>> additional criteria other than file extension.
        >>>
        >>> If you go to the "Preferences|Files|Settings &
        >>> Syntax" panel, next to the "File extensions" field
        >>> you'll see a button that says "More...". When
        >>> clicked, it opens a dialog box where you can set
        >>> filename wildcards or a specific string marker at the
        >>> beginning of the file to help in detecting this
        >>> particular file type.
        >>>
        >>> Again, I'm sorry if this is old news, but if it
        >>> is, I can't believe I missed it before! It is truly
        >>> a nice feature, since some specific file types with
        >>> which I deal regularly either do not have file
        >>> extensions, or share an extension defined by another
        >>> more common type. Using wildcards or file string
        >>> markers is great help indeed.
        >>>
        >>> -dZ.
        >>>
        >>>
        >>>
        >>
        >>
        >


        [Non-text portions of this message have been removed]


        ------------------------------------

        http://www.editplus.comYahoo! Groups Links
      • dz@caribe.net
        I think the criteria works in this way: Select this file type if the file - ends with this extension OR - matches this pattern OR - starts with this string
        Message 3 of 11 , Sep 19, 2008
          I think the criteria works in this way:

          Select this file type if the file
          - ends with this extension OR
          - matches this pattern OR
          - starts with this string
          Stop checking if we found a match.

          -dZ.

          >------- Original Message -------
          >From : dz@...[mailto:dz@...]
          >Sent : 9/19/2008 2:29:04 PM
          >To : editplus@yahoogroups.com
          >Cc :
          >Subject : RE: Re: [edit+] File type detection
          >
          I think the key is to judiciously use the various
          criteria available. I guess if you specify an
          extension, that will take precedence. If you created
          different types and set "bak" as the extension to all
          of them, then I guess it doesn't matter what
          additional criteria there is, if the file ends with
          "bak", it will be recognized as the first type with
          that explicit extension.

          -dZ.



          >------- Original Message -------
          >From : Mark Kahn[ mailto:cwolves@...]
          >Sent : 9/19/2008 2:15:01 PM
          >To : editplus@yahoogroups.com
          >Cc :
          >Subject : RE: Re: [edit+] File type detection
          >
          >almost...can't figure out how to get it to work
          with multiple extensions of
          the same file type other than the obvious duplicating
          the file type for
          every extension...MEH

          -Mark

          On Fri, Sep 19, 2008 at 11:11 AM, Mark Kahn
          <cwolves@...> wrote:

          > nevermind, it apparently needs to match the entire
          file name, not just a
          > partial match. So...
          >
          > *.js.*.bak works! YAY! opening backup files now
          highlights!
          >
          > -Mark
          >
          >
          > On Fri, Sep 19, 2008 at 11:09 AM, Mark Kahn
          <cwolves@...> wrote:
          >
          >> woo-hoo!
          >>
          >> Okay, I'm trying to get this working with backup
          files. Any ideas? The
          >> box says "An additional file name (allows * and
          ?)". So I tried
          >>
          >> \.js\..*\.bak
          >> .js.*.bak
          >> .js*.bak
          >> js*bak
          >> js.*bak
          >>
          >> nothing seems to work. The pattern I'm trying to
          match is
          >>
          >> filename.js.SOMEDATE.bak
          >>
          >> which, of course, I'll also use for every other
          extension once I figure it
          >> out :)
          >>
          >> -Mark
          >>
          >>
          >> On Fri, Sep 19, 2008 at 10:59 AM, dz@...
          <dz@...> wrote:
          >>
          >>> Hello:
          >>> I don't know if this is old hat, but I just very
          >>> recently noticed what is, to me, a brand new feature
          >>> in EditPlus: Automatic file detection based on
          >>> additional criteria other than file extension.
          >>>
          >>> If you go to the "Preferences|Files|Settings &
          >>> Syntax" panel, next to the "File extensions" field
          >>> you'll see a button that says "More...". When
          >>> clicked, it opens a dialog box where you can set
          >>> filename wildcards or a specific string marker at the
          >>> beginning of the file to help in detecting this
          >>> particular file type.
          >>>
          >>> Again, I'm sorry if this is old news, but if it
          >>> is, I can't believe I missed it before! It is truly
          >>> a nice feature, since some specific file types with
          >>> which I deal regularly either do not have file
          >>> extensions, or share an extension defined by another
          >>> more common type. Using wildcards or file string
          >>> markers is great help indeed.
          >>>
          >>> -dZ.
          >>>
          >>>
          >>>
          >>
          >>
          >


          [Non-text portions of this message have been removed]


          ------------------------------------

          http://www.editplus.comYahoo! Groups Links






          ------------------------------------

          http://www.editplus.comYahoo! Groups Links
        • Mark Kahn
          yeah, I got this. I m trying to match HTML highlighting, for example. The current extension matches are: html;htm;asp;asa;aspx;asax;shtml;stm;hta I obviously
          Message 4 of 11 , Sep 19, 2008
            yeah, I got this. I'm trying to match HTML highlighting, for example. The
            current extension matches are:

            html;htm;asp;asa;aspx;asax;shtml;stm;hta

            I obviously don't want to have to create 9 different file types. I'd rather
            just do:

            *.(html|htm|asp|asa|aspx|asax|shtml|stm|hta).*.bak

            -Mark

            On Fri, Sep 19, 2008 at 11:29 AM, dz@... <dz@...> wrote:

            > I had no problems with this. I just did a test and
            > it worked as I expected. Here's what I did:
            >
            > - I created a new type called "BACKUP 1" and set the
            > pattern to "*.one.bak".
            > - I created a new type called "BACKUP 2" and set the
            > pattern to "*.two.bak".
            > - I created a simple syntax file with a couple of
            > keywords and assigned it to both types.
            > - I set the keyword syntax highlight for different
            > colors on each of the new types.
            >
            > I then created two test files. Actually, one single
            > file which I copied with a different name. The names
            > were: "testfile.one.bak" and "testfile.two.bak".
            >
            > I opened both in EditPlus and, sure enough, each one
            > got a different color highlight.
            >
            > I think the key is to judiciously use the various
            > criteria available. I guess if you specify an
            > extension, that will take precedence. If you created
            > different types and set "bak" as the extension to all
            > of them, then I guess it doesn't matter what
            > additional criteria there is, if the file ends with
            > "bak", it will be recognized as the first type with
            > that explicit extension.
            >
            > -dZ.
            >
            >
            > >------- Original Message -------
            > >From : Mark Kahn[mailto:cwolves@... <cwolves%40gmail.com>]
            > >Sent : 9/19/2008 2:15:01 PM
            > >To : editplus@yahoogroups.com <editplus%40yahoogroups.com>
            > >Cc :
            > >Subject : RE: Re: [edit+] File type detection
            > >
            > >almost...can't figure out how to get it to work
            > with multiple extensions of
            > the same file type other than the obvious duplicating
            > the file type for
            > every extension...MEH
            >
            > -Mark
            >
            > On Fri, Sep 19, 2008 at 11:11 AM, Mark Kahn
            > <cwolves@... <cwolves%40gmail.com>> wrote:
            >
            > > nevermind, it apparently needs to match the entire
            > file name, not just a
            > > partial match. So...
            > >
            > > *.js.*.bak works! YAY! opening backup files now
            > highlights!
            > >
            > > -Mark
            > >
            > >
            > > On Fri, Sep 19, 2008 at 11:09 AM, Mark Kahn
            > <cwolves@... <cwolves%40gmail.com>> wrote:
            > >
            > >> woo-hoo!
            > >>
            > >> Okay, I'm trying to get this working with backup
            > files. Any ideas? The
            > >> box says "An additional file name (allows * and
            > ?)". So I tried
            > >>
            > >> \.js\..*\.bak
            > >> .js.*.bak
            > >> .js*.bak
            > >> js*bak
            > >> js.*bak
            > >>
            > >> nothing seems to work. The pattern I'm trying to
            > match is
            > >>
            > >> filename.js.SOMEDATE.bak
            > >>
            > >> which, of course, I'll also use for every other
            > extension once I figure it
            > >> out :)
            > >>
            > >> -Mark
            > >>
            > >>
            > >> On Fri, Sep 19, 2008 at 10:59 AM, dz@... <dz%40caribe.net>
            > <dz@... <dz%40caribe.net>> wrote:
            > >>
            > >>> Hello:
            > >>> I don't know if this is old hat, but I just very
            > >>> recently noticed what is, to me, a brand new feature
            > >>> in EditPlus: Automatic file detection based on
            > >>> additional criteria other than file extension.
            > >>>
            > >>> If you go to the "Preferences|Files|Settings &
            > >>> Syntax" panel, next to the "File extensions" field
            > >>> you'll see a button that says "More...". When
            > >>> clicked, it opens a dialog box where you can set
            > >>> filename wildcards or a specific string marker at the
            > >>> beginning of the file to help in detecting this
            > >>> particular file type.
            > >>>
            > >>> Again, I'm sorry if this is old news, but if it
            > >>> is, I can't believe I missed it before! It is truly
            > >>> a nice feature, since some specific file types with
            > >>> which I deal regularly either do not have file
            > >>> extensions, or share an extension defined by another
            > >>> more common type. Using wildcards or file string
            > >>> markers is great help indeed.
            > >>>
            > >>> -dZ.
            > >>>
            > >>>
            > >>>
            > >>
            > >>
            > >
            >
            > [Non-text portions of this message have been removed]
            >
            > ------------------------------------
            >
            > http://www.editplus.comYahoo! Groups Links
            >
            >
            >


            [Non-text portions of this message have been removed]
          • dz@caribe.net
            Oh! I guess that won t work. It doesn t accept a regular expression, but a simple file match wildcard expression, like what you use in directory listings on
            Message 5 of 11 , Sep 19, 2008
              Oh! I guess that won't work. It doesn't accept a
              regular expression, but a simple "file match"
              wildcard expression, like what you use in directory
              listings on a console.

              I guess the alternative that you have is to set the
              "First line of file" to something resembling a
              doctype, if in fact all your files start with that.

              Sorry, I didn't mean to get your hopes up about a new
              feature and frustrate you with its limitations at the
              same time.

              -dZ.


              >------- Original Message -------
              >From : Mark Kahn[mailto:cwolves@...]
              >Sent : 9/19/2008 2:46:58 PM
              >To : editplus@yahoogroups.com
              >Cc :
              >Subject : RE: Re: [edit+] File type detection
              >
              >yeah, I got this. I'm trying to match HTML
              highlighting, for example. The
              current extension matches are:

              html;htm;asp;asa;aspx;asax;shtml;stm;hta

              I obviously don't want to have to create 9 different
              file types. I'd rather
              just do:

              *.(html|htm|asp|asa|aspx|asax|shtml|stm|hta).*.bak
            • Mark Kahn
              nah, that s okay. I got it matching .js, .css, .java, .php and .htm* which is, for the most part, everything I use anyway. I don t remember the last time I
              Message 6 of 11 , Sep 19, 2008
                nah, that's okay. I got it matching .js, .css, .java, .php and .htm* which
                is, for the most part, everything I use anyway. I don't remember the last
                time I looked at a backup of anything else :)

                Thanks for pointing out the feature!

                -Mark

                On Fri, Sep 19, 2008 at 11:57 AM, dz@... <dz@...> wrote:

                > Oh! I guess that won't work. It doesn't accept a
                > regular expression, but a simple "file match"
                > wildcard expression, like what you use in directory
                > listings on a console.
                >
                > I guess the alternative that you have is to set the
                > "First line of file" to something resembling a
                > doctype, if in fact all your files start with that.
                >
                > Sorry, I didn't mean to get your hopes up about a new
                > feature and frustrate you with its limitations at the
                > same time.
                >
                >
                > -dZ.
                >
                > >------- Original Message -------
                > >From : Mark Kahn[mailto:cwolves@... <cwolves%40gmail.com>]
                > >Sent : 9/19/2008 2:46:58 PM
                > >To : editplus@yahoogroups.com <editplus%40yahoogroups.com>
                > >Cc :
                > >Subject : RE: Re: [edit+] File type detection
                > >
                > >yeah, I got this. I'm trying to match HTML
                > highlighting, for example. The
                > current extension matches are:
                >
                > html;htm;asp;asa;aspx;asax;shtml;stm;hta
                >
                > I obviously don't want to have to create 9 different
                > file types. I'd rather
                > just do:
                >
                > *.(html|htm|asp|asa|aspx|asax|shtml|stm|hta).*.bak
                >
                >
                >


                [Non-text portions of this message have been removed]
              • dz@caribe.net
                No problem. I submitted a feature request to Sangil Kim, asking him for regexp support on the pattern field, or at least to allow for a list of patterns. -dZ.
                Message 7 of 11 , Sep 19, 2008
                  No problem. I submitted a feature request to Sangil
                  Kim, asking him for regexp support on the pattern
                  field, or at least to allow for a list of patterns.

                  -dZ.



                  >------- Original Message -------
                  >From : Mark Kahn[mailto:cwolves@...]
                  >Sent : 9/19/2008 3:05:32 PM
                  >To : editplus@yahoogroups.com
                  >Cc :
                  >Subject : RE: Re: [edit+] File type detection
                  >
                  >nah, that's okay. I got it matching .js, .css,
                  .java, .php and .htm* which
                  is, for the most part, everything I use anyway. I
                  don't remember the last
                  time I looked at a backup of anything else :)

                  Thanks for pointing out the feature!
                • Mark Kahn
                  I did the same :D -Mark ... [Non-text portions of this message have been removed]
                  Message 8 of 11 , Sep 19, 2008
                    I did the same :D

                    -Mark

                    On Fri, Sep 19, 2008 at 12:07 PM, dz@... <dz@...> wrote:

                    > No problem. I submitted a feature request to Sangil
                    > Kim, asking him for regexp support on the pattern
                    > field, or at least to allow for a list of patterns.
                    >
                    >
                    > -dZ.
                    >
                    > >------- Original Message -------
                    > >From : Mark Kahn[mailto:cwolves@... <cwolves%40gmail.com>]
                    > >Sent : 9/19/2008 3:05:32 PM
                    > >To : editplus@yahoogroups.com <editplus%40yahoogroups.com>
                    > >Cc :
                    > >Subject : RE: Re: [edit+] File type detection
                    > >
                    > >nah, that's okay. I got it matching .js, .css,
                    > .java, .php and .htm* which
                    > is, for the most part, everything I use anyway. I
                    > don't remember the last
                    > time I looked at a backup of anything else :)
                    >
                    > Thanks for pointing out the feature!
                    >
                    >
                    >


                    [Non-text portions of this message have been removed]
                  Your message has been successfully submitted and would be delivered to recipients shortly.