Reply to topic

[Kate] Add columns select/copy/paste feature

0

Votes
0
0
jMax
Registered Member
Posts
11
Karma
0
Hello,

Kate is a great software, highly configurable and light enough to be used as a general purpose editor. But sometimes I miss some tools that I'm used to employ with Nedit.

For example columns select/copy/paste. If you highlight some text with CTRL key down, highlighting is made by column instead of by line. Very useful to copy/paste some parts of column aligned code for example.

Thanks.

jMax
XiniX
Registered Member
Posts
217
Karma
1
OS
Uhm, this already exists: edit > block selection mode....


XiniX, proud to be a member of KDE forums since 2008-Oct.
User avatar Primoz
Moderator
Posts
859
Karma
1
OS
XiniX wrote:Uhm, this already exists: edit > block selection mode....

Just tried it, and it's exactly what OP wishes. So Already Implemented.


Primoz, proud to be a member of KDE forums since 2008-Nov.
stefanol
Registered Member
Posts
3
Karma
0
Hi, everybody,
Yes, the very important "block selection mode" (also Ctrl-Shift-B toggled) is implemented, but after a recent massive update of my OS I noticed a change in its behaviour that I wonder might be somewhat buggy. I still saw the old ("correct") behaviour in Kate v2.5.4 (but probably much later as well) and surely v3.10.5 behaves in the new ("wrong") way.

The issue is the following: in the "wrong" case, the vertical block of text that can be selected is limited on the right by the actual length of the last line included in the selection (i.e. the bottommost one). So, if lines above that are longer, part of them are impossible to include in the selection. And, perhaps related, when in block-selection mode one used to be able to move the cursor (with e.g. arrow keys) indefinitely to the right, regardless of the line actually extending to that point. This is also gone.

I'm convinced that the value of the rightmost-selectable column should not depend on how long is the last line in the (block-)selection: I see that as a hindrance to the power of block selection.

I hope this is clear, I'll try to add a sample case below, of a text opened in Kate with block-selection:
* If the textfile is like this:
aaaaaaa
bbbbbbbbbbbbb
bbbbbbbb
aaaaaa
* and I want to block select the right half of lines 2-3, as in (ideally):
aaaaaaa
bbbbbbBBBBBBB
bbbbbbBB
aaaaaa
(capital letter=desired selection)
* now what I can get is at most like this:
aaaaaaa
bbbbbbBBbbbbb
bbbbbbBB|
aaaaaa
(now, "|" is the cursor position).

Anyone knows why this has changed in this way? Was it desired?
Thank you very much,
Stefano
airdrik
Registered Member
Posts
1854
Karma
5
OS
I just tried using KDE 4.12, Kate 3.12, and it works as expected - in block select mode, I can select past the end of the longest line selected. It also allows me to move the cursor past the end of the lines without selecting.

Searching for bugs turns up https://bugs.kde.org/show_bug.cgi?id=315316 which shows that it affects the versions of Kate included with KDE 4.10 and 4.11, but is fixed in 4.12.


airdrik, proud to be a member of KDE forums since 2008-Dec.
stefanol
Registered Member
Posts
3
Karma
0
Hi, Aldrik,
thank you very much for the answer: just moved to 3.12 (had to enable ppa:kubuntu-ppa/backports and everything since I'm now on 13.10/gnome) and, yeah!, it works like it used to.

stefano

 
Reply to topic

Bookmarks



Who is online

Registered users: alra, aptass, Baidu [Spider], bartoloni, Bing [Bot], claydoh, Drecker, flipwise, Frousties, Google [Bot], hhc$, ipwizard, pulltheo, robgriff444, safinx, Sogou [Bot], Theo, tymond, YaCy [Bot], Yahoo [Bot]