Feature Request: Option to Disable End-of-Line Selection on Triple Click
david at davipro.fr
david at davipro.fr
Thu Sep 19 09:53:25 BST 2024
Hello,
I will try this soon and make a feedback if that resolve my problem.
Thank you very much.
On 14/09/2024 20:17, Waqar Ahmed wrote:
> Hi,
>
> I would suggest that you write a "Command Line Script" that has the
> behaviour you want and then bind that script to a shortcut.
> See: https://docs.kde.org/stable5/en/kate/katepart/dev-scripting.html
>
> Maybe the following will work (haven't tested it):
>
> ```
> var katescript = {
> "author": "abcd",
> "license": "LGPLv2+",
> "revision": 1,
> "kate-version": "5.1",
> "functions": ["myCopyLine"],
> "actions": [
> { "function": "myCopyLine",
> "name": "Copy current line",
> "category": "Editing",
> "shortcut": "Ctrl+Shift+A",
> "interactive": "false"
> }
> ]
> };
>
> function myCopyLine() {
> var cursor = view.cursorPosition();
> var lineLength = document.line(cursor.line).length;
> view.setSelection(Range(cursor.line, 0, cursor.line, lineLength));
> view.copy();
> }
> ```
>
> - put this in a file under ~/.local/share/katepart5/script/commands/
> - start kate
> - Hit Ctrl + Shift + A ...... OR .... F7 and then type "myCopyLine"
>
> Regards,
> Waqar
>
> On Sat, Sep 14, 2024 at 9:05 PM david at davipro.fr <david at davipro.fr> wrote:
>> Dear KWrite/Kate Development Team,
>>
>> I hope this message finds you well. I would like to request a small
>> feature that I believe could improve the user experience for many users.
>>
>> Currently, in Kate Version 24.05.2 (and possibly other versions), when
>> triple-clicking a line to select it, the end-of-line (newline) character
>> is also included in the selection. While I understand that this may be
>> the desired behavior for some, it can be quite inconvenient for others,
>> especially when one frequently copies lines of code without wanting the
>> newline character.
>>
>> I would like to suggest adding an option (perhaps a checkbox in the
>> settings) that allows users to disable the inclusion of the newline
>> character when triple-clicking a line. This would provide more
>> flexibility and control over text selection behavior.
>>
>> Thank you for considering this feature request, and I appreciate all the
>> hard work that goes into maintaining such a fantastic tool!
>>
>> Best regards,
>>
>> David
>>
More information about the KWrite-Devel
mailing list