Results 1 to 5 of 5

Thread: How do I get Kwrite to stop playing guessing games?

  1. #1
    Join Date
    Dec 2011
    Location
    St. Thomas, Virgin Islands
    Posts
    48

    Angry How do I get Kwrite to stop playing guessing games?

    Sometimes when I'm editing a plain text file (extension .txt), Kwrite decides that I'm editing something other than a plain text file. Usually, it decides that my plain text file is really an XML document. Sometimes it decides that my plain text file is really C source code. It then proceeds to highlight everything in sight. This is annoying enough, but it also flags all the "errors," and I get a window full of underlined red-on-yellow text. This is very distracting, especially when less-than signs look like less-than-or-equal signs, or when I have a pound sign at the start of a line and Kwrite decides that I've screwed up a C macro.

    If there's something in the Kwrite documentation about overriding the file extension and (mis)interpreting the file contents, I can't find it.

    How do I tell it to stop second-guessing me?

    P.S. This is the sort of nonsense that pisses me off about Microsoft. Is everyone doing the user "favors" without permission nowadays?
    CPU: Dell Inspiron 17R (Intel Core i7, 64 bits)
    OS: dual boot Windows 7 Home Premium (broken) and openSUSE Leap 15.0
    Desktop: KDE

  2. #2
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    24,871

    Default Re: How do I get Kwrite to stop playing guessing games?

    I do not know the asnwer (still using vi out of old habit), but you might search for a solution in the wrong direction. As the "extention" is not a native Unix/Linux thing, it might be that Kwrite does not detect his misbehaviour based on the characters in the filename that come after the last dot in that filename, but by an "iintelligent" guess based on the contents of the file.

    This would mean that a solution to your problem might be found in a configuration parameter that is named very different from what you expect.

    A lot of "might" here, but narrowing your search for elements that include the word "extention" might not be the right approach.
    Henk van Velden

  3. #3
    Join Date
    Aug 2010
    Location
    Chicago suburbs
    Posts
    12,366
    Blog Entries
    3

    Default Re: How do I get Kwrite to stop playing guessing games?

    I haven't come across that. But then I only use kwrite for temporary stuff that I plan to copy/paste elsewhere (on a web forum, etc). I mostly use vi.

    I do find that "vi" does some of the same nasty stuff. So I just remove "/etc/vimrc" and vi starts to behave sanely (until I update to the next opensuse release).
    openSUSE Leap 15.1; KDE Plasma 5;

  4. #4
    Join Date
    Dec 2011
    Location
    St. Thomas, Virgin Islands
    Posts
    48

    Thumbs up Re: How do I get Kwrite to stop playing guessing games?

    Quote Originally Posted by nrickert View Post
    I do find that "vi" does some of the same nasty stuff. So I just remove "/etc/vimrc" and vi starts to behave sanely (until I update to the next opensuse release).
    This might be helpful.
    CPU: Dell Inspiron 17R (Intel Core i7, 64 bits)
    OS: dual boot Windows 7 Home Premium (broken) and openSUSE Leap 15.0
    Desktop: KDE

  5. #5
    Join Date
    Feb 2009
    Location
    Spain
    Posts
    25,547

    Default Re: How do I get Kwrite to stop playing guessing games?

    On 2012-05-11 18:26, CousinRicky wrote:

    > If there's something in the Kwrite documentation about overriding the
    > file extension and (mis)interpreting the file contents, I can't find
    > it.
    >
    > How do I tell it to stop second-guessing me?


    I do not know, I don't see that in kwrite configuration; you have to use
    kate instead who does have that.

    However... I open a text file and I don't know what format it thinks it is,
    but it is displayed as light blue on white, totally unreadable. A new text
    file does the same. I have no idea who designed such a color theme.

    I'm running gnome. I tried to run "kde-config", but it died, so I can't
    change colors.

    Anyway, in kate, tools, you can choose the "syntax" highlight and the mode
    used for the text.

    --
    Cheers / Saludos,

    Carlos E. R.
    (from 11.4 x86_64 "Celadon" at Telcontar)

Tags for this Thread

Posting Permissions

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