Tapatalk

How to set syntax highlight for files without extension

How to set syntax highlight for files without extension

2

    Dec 26, 2005#1

    Hello there,

    does anybody know how to configure syntax highlighing for C++ files without extension (e.g. all STL files like <vector>)?
    I have checked this forum but have not found an answer. Please excuse if this is a repost.

    Merry christmas and a happy new year to all!

    Josef

    11
    Basic UserBasic User
    11

      Dec 26, 2005#2

      1) open your wordfile containing the C/C++ highlighting
      2) append an asterisk (*) to the "File extensions = " section in the /Cx"C/C++" line

      NOTE: This causes ALL files to be highlighted using that definition unless their file extension overrides it.

      2

        Dec 26, 2005#3

        Thanks, I tried that already and it works, but then even text files (extension .txt) are treated as C++ source (for example wordfile.txt itself) which results in some confusing colors for text files.
        I was looking for a solution which explicitly maps only an empty extension to C/C++.

        Regards

        Josef

        6,685587
        Grand MasterGrand Master
        6,685587

          Dec 27, 2005#4

          No, it is not possible to specify a default highlighting for files without any extension without highlighting all other files with an extension not defined in the wordfile.

          Either rename your C files without extension and add .c to the file name or
          always use the "View As" menu or
          you use the File Names = language definition instead of File Extensions = and specify all the C file names without extension which are hopefully not too much.
          Best regards from an UC/UE/UES for Windows user from Austria

          1

            Jan 26, 2006#5

            One suggestion to the ultraedit creator;
            Save the syntax highlight setting in the Project file, just like the bookmarks.
            I have the same issue working with Zope which extension is not in favor.