Results 1 to 4 of 4

Thread: annoying issue with kate not remembering highlighting scheme for some formats

  1. #1

    Default annoying issue with kate not remembering highlighting scheme for some formats

    Hello,

    I have been using Kate to edit some documents like makefiles. My makefiles all have the extension .mak. Sometimes when I open a makfile, the correct highlighting is in place. Other times, I have to manually select the correct highlighting scheme each time I open the file. Sometimes the highlighting is correct, but when I save the file, it goes away???

    Can anyone let me know how to associated a particular highlighting scheme with a file type? I have looked through the menus and don't see anything that looks like that.

    Can someone let me know what to do here?

    LMHmedchem

  2. #2
    Join Date
    Jun 2008
    Location
    West Yorkshire, UK
    Posts
    3,450

    Default Re: annoying issue with kate not remembering highlighting scheme for some formats

    I think the answer is that you can only rely on Kate if you use the file ending it associates and these are built in.

    If you use your own file ending, I think it parses the file and makes a decision based on an algorithm. Different files may be recognised differently by the algorithm.

  3. #3

    Default Re: annoying issue with kate not remembering highlighting scheme for some formats

    Quote Originally Posted by john_hudson View Post
    I think the answer is that you can only rely on Kate if you use the file ending it associates and these are built in.

    If you use your own file ending, I think it parses the file and makes a decision based on an algorithm. Different files may be recognised differently by the algorithm.
    Thank you for the information. Is there a list somewhere that tells what the expected extensions are?

    For a long time, I have used Crimson Editor in Windows. I like it for a number of reasons, but it has a simple window where you enter an extension and then select from a format list to associate the extension with. Since, from the programming point of view, this is just a simple mapping operation, I assumed that other editors would work the same way. It seems a bit extravagant to program a detection algorithm where you could just ask the user and remember the answer. Crimson Editor seems to lose these associations from time to time (along with other settings), so nothing is ever perfect and I guess you just stick with whatever annoys you the least.

    Does a makefile usually have the extension .make? I have always used .mak, but maybe that is not the standard. Most of them used to just be called "Makefile", but I have an extension because I use the same files on windows under cygwin.

    LMHmedchem

  4. #4
    Join Date
    Jun 2008
    Location
    West Yorkshire, UK
    Posts
    3,450

    Default Re: annoying issue with kate not remembering highlighting scheme for some formats

    As I said, I don't think Kate has what you want of itself. However, if you select File Assocations in System settings or Konqueror, you can find the whole list of file endings supported by KDE (also very useful if you want to specify the type="appplication/..." attribute in HTML).

    Compare the description with that in Kate's Mode settings or use it on a file and see if Kate highlights it correctly.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •