Results 1 to 2 of 2

Thread: How to stop kwrite from removing white spaces?

  1. #1
    Join Date
    Jan 2019
    Beans
    9

    How to stop kwrite from removing white spaces?

    Kwrite removes white spaces at the end of a line. This is very annoying for me because they are a marker I use in a script.
    Any line ending with ', ' (a comma and then a white space) needs something added to it.

    They stay until I save the file (.txt or .csv format). Then the comma stays but the white space vanishes.
    I've found a bug report : https://www.mail-archive.com/kde-bug...msg275137.html
    But they say it can be fixed in the settings, so it's been moved to "feature requests".

    In my version - kwrite 21.12.3 - I have no such option in the settings.

    Current workaround :
    - find and replace all white spaces by   before saving
    - find and replace all   by white spaces before editing the file
    - back it up very often in case I forget to make the change before saving

    I can't just find and replace all commas by "comma + white space" then remove double white spaces because on some lines I have only the comma at the end.
    Only the comma has a different meaning for my script (it means adding something has to be done but is not urgent).

    All suggestions welcome

  2. #2
    currentshaft is offline Oops! My Coffee Cup is empty.
    Join Date
    May 2024
    Beans
    Hidden!

    Re: How to stop kwrite from removing white spaces?

    Use a different character for a marker other than a space? That seems like the easiest and most elegant solution. I mean, why a space? That is perhaps the worst possible character to use for delimination in Linux since it's used for IFS.

Tags for this Thread

Bookmarks

Posting Permissions

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