I've stored a password in Kate that I need for accessing a database. It's a bit of a long and convoluted password so I store it in Kate so I can open it up use Ctrl + A and then select the whole thing. However I can't paste the password because Kate adds a carriage return to the file. I've erased the carriage return and saved the file, but upon opening it has returned. This causes an issue because I can't Ctrl + A and copy the text without the carriage return present which means I can't paste it into the password prompt unless I manually select it. Why does Kate add this? 1. Open up Kate 2. Add a bunch of garbled text "jfasdiojbo435n43onk3" 3. Use Ctrl + A to select all 4. Notice it doesn't have a carriage return 5. Save the file and close it 6. Open the file and use Ctrl + A 7. The extra carriage return exists when it didn't in the previous file
Sorry to double post, but you don't need to save and close Kate. This occurs immediately after saving.
See open/save settings, you can disable that there. 'Append newline at ....'
Thank you. I'll add this just to be specific, Settings -> Configure Kate -> Open/Save (Automatic Cleanups on Save) Append newline at end of file on save: Disable Any reason as why this should be enabled on default? I understand removing trailing spaces, but I don't understand why appending a newline on save would even be an option. Thanks.
Might be a simple typo to fix there 'Automatic Cleanups on Save' probably should read 'Automatic Clean-up on Save'.
> but I don't understand why appending a newline on save would even be an option. Thanks. its a normal linux thing, and programming languages like C/C++ expect it as well.