Results 1 to 8 of 8

Thread: Can't comment text in KWrite

  1. #1
    Join Date
    Nov 2010
    Location
    Kazakhstan, Aktau
    Posts
    84

    Default Can't comment text in KWrite

    Doesn't work "Ctrl+D" to comment text in the Kwrite application. I can't find any information about this issue. Am I the only one having this problem?

  2. #2

    Default Re: Can't comment text in KWrite

    Quote Originally Posted by firebolt View Post
    Doesn't work "Ctrl+D" to comment text in the Kwrite application. I can't find any information about this issue. Am I the only one having this problem?
    Works fine here. (13.2, KDE 4.14.2)

    What version of KWrite are you using?
    Is the shortcut Ctrl+D assigned correctly?

    Did you actually select the correct syntax highlighting? (Extras->Highlighting)
    This is essential for that feature to work.

    And which highlighting is it?

  3. #3
    Join Date
    Nov 2010
    Location
    Kazakhstan, Aktau
    Posts
    84

    Default Re: Can't comment text in KWrite

    Quote Originally Posted by wolfi323 View Post
    Works fine here. (13.2, KDE 4.14.2)

    Did you actually select the correct syntax highlighting? (Extras->Highlighting)
    This is essential for that feature to work.

    And which highlighting is it?
    I got it! May be I'm wrong but I remember I commented strings without selection of highlighting.

  4. #4
    Join Date
    Jun 2008
    Location
    Groningen, Netherlands
    Posts
    19,802
    Blog Entries
    14

    Default Re: Can't comment text in KWrite

    Works fine here too. Did you try Kate as well? (does a much better job in highlighting various languages)
    ° Appreciate my reply? Click the star and let me know why.

    ° Perfection is not gonna happen. No way.

    https://en.opensuse.org/openSUSE:Board#Members
    http://en.opensuse.org/User:Knurpht
    http://nl.opensuse.org/Gebruiker:Knurpht

  5. #5
    Join Date
    Nov 2010
    Location
    Kazakhstan, Aktau
    Posts
    84

    Default Re: Can't comment text in KWrite

    Quote Originally Posted by Knurpht View Post
    Did you try Kate as well?
    Yes, I did. I really don't like this editor

  6. #6

    Default Re: Can't comment text in KWrite

    Quote Originally Posted by Knurpht View Post
    Did you try Kate as well? (does a much better job in highlighting various languages)
    ???
    Can you please elaborate?

    KWrite and Kate should do exactly the same job in highlighting, as they both use exactly the same text editor component. (libktexteditor)
    Only the GUI is different.

    And the commenting doesn't work in Kate here either without setting the highlighting.

    Maybe it did work that way in some earlier version and got changed.
    But it makes sense I think: how should Kate/KWrite know in which way it should comment out the text ('//'? '#'? Or something else?).
    It has to know which language the file uses.

    If you open an existing file, it should detect the correct highlighting automatically of course, you shouldn't have to select it manually in this case.

  7. #7
    Join Date
    Nov 2010
    Location
    Kazakhstan, Aktau
    Posts
    84

    Default Re: Can't comment text in KWrite

    Is it possible to change default highlightning?

  8. #8

    Default Re: Can't comment text in KWrite

    Quote Originally Posted by firebolt View Post
    Is it possible to change default highlightning?
    I'm not sure.

    You can configure which highlighting to use for certain mimetypes or filename patterns ("File extensions") in Settings->Configure Editor...->Open/Save->Modes and Filetypes.
    If you set the file extension to "*" for one particular highlighting, it will probably be used as default I'd guess.
    But this would probably disable the automatic filetype recognition completely, or at least make it unreliable.

    PS: You could try to set the file extension to an empty string for the wanted highlighting, and set it to something different like "xxxxx" for the default one.
    This should make the other one the default without influencing the normal filetype recognition, I'd say.
    Last edited by wolfi323; 07-Nov-2014 at 04:40.

Posting Permissions

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