Results 1 to 3 of 3

Thread: KATE - File Highlight setting not kept.

  1. #1
    Join Date
    Jun 2008
    Location
    South-West France
    Posts
    1,032

    Default KATE - File Highlight setting not kept.

    Hello.

    When editing new files, I set highlight type to script bash for systemd script named /etc/systemd/system/mysqld@.service, and set type to ini for mysql config file named /etc/my.cnf.

    When I reopened these files, the highlight property is lost.

    Any help is welcome.
    Thanks for helping. JCD
    __________
    server leap 15.0 -- ASUS g75vw KDE leap 15.0 -- ASUS g750JZ Optimus KDE leap 15.1 -- acer aspire s13 win 10 home -- HP Omen win 10 home - scan EPSON V500 - Brother HL2250DN - Samsung CLP-325W

  2. #2
    Join Date
    Sep 2013
    Location
    Norfolk, UK
    Posts
    1,257

    Default Re: KATE - File Highlight setting not kept.

    Kate doesn't store syntax highlighting on a per file basis, when an existing file is opened the highlighting to apply is based upon the file extension and/or mime type.

    These are set (for syntax kate knows of) from: Settings -> Configure Kate -> Open/Save -> Modes & Filetypes.


    I've not tried this with the example you gave, but I guess it would work

    Find the syntax highlighting you want applied, for example Scripts/Bash, then add the file extension of the file you wish to be recognised as such.
    Regards, Paul

    2x Tumbleweed (Snapshot: 20191011) KDE Plasma 5
    2x Leap 15.1 KDE Plasma 5

  3. #3
    Join Date
    Jun 2008
    Location
    South-West France
    Posts
    1,032

    Default Re: KATE - File Highlight setting not kept.

    Quote Originally Posted by tannington View Post
    Kate doesn't store syntax highlighting on a per file basis, when an existing file is opened the highlighting to apply is based upon the file extension and/or mime type.

    These are set (for syntax kate knows of) from: Settings -> Configure Kate -> Open/Save -> Modes & Filetypes.


    I've not tried this with the example you gave, but I guess it would work

    Find the syntax highlighting you want applied, for example Scripts/Bash, then add the file extension of the file you wish to be recognised as such.
    As systemd file have no extension I have to create a mime type for that kind of file. ?

    So I have just to add *.cnf (mysql) in the definition Settings -> Configure Kate -> Open/Save -> Modes & Filetypes/configuration/INI files.?
    Thanks for helping. JCD
    __________
    server leap 15.0 -- ASUS g75vw KDE leap 15.0 -- ASUS g750JZ Optimus KDE leap 15.1 -- acer aspire s13 win 10 home -- HP Omen win 10 home - scan EPSON V500 - Brother HL2250DN - Samsung CLP-325W

Posting Permissions

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