Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: COLUMN/BOX EDIT MODE FOR US CODERS (and you too) #2232

Closed
RFImages opened this issue Feb 27, 2023 · 11 comments
Closed

Feature Request: COLUMN/BOX EDIT MODE FOR US CODERS (and you too) #2232

RFImages opened this issue Feb 27, 2023 · 11 comments

Comments

@RFImages
Copy link

RFImages commented Feb 27, 2023

As an FPGA developer I use Notepad++ for coding and cherrytree for logging/notes.

Notepad++ and most advanced text editors offer a life changing Column or block select edit mode that allows you to make any rectangular text selection by holding down the alt key while drawing a box:
image

I use this almost exclusively when copy/pasting blocks of text, and it is difficult to go back and forth to Cherry tree not being able to have the same feature.

Please implement! A necessity for coders.

Of course it would only be useful with monospaced fonts, but that's ok! There should be a special text edit mode for code anyway. There are "codeboxes" but they don't look too versatile or feature laden, (underdeveloped)

@RFImages RFImages changed the title Feature Request: COLUMN EDIT MODE FOR US CODERS (and you too) Feature Request: COLUMN/BOX EDIT MODE FOR US CODERS (and you too) Feb 27, 2023
@giuspen
Copy link
Owner

giuspen commented Feb 27, 2023

Actually there is a column edit mode in cherrytree, even though not as powerful.
If you hold down Ctrl and Alt, then you can select in column edit mode with the mouse (inspired by https://www.geany.org/ / https://www.scintilla.org/).
This supports only removing and adding characters at the moment. I thought about adding clipboard support but nobody ever asked for it, you are actuallt the first.

@RFImages
Copy link
Author

oh I did not know that - yes I see that it adds a multirow cursor but I do not see that I can select a block of text for editing (say I want to delete/copy/cut multiple columns of text from multiple rows, I don't see that I can do it in one keystroke.. Copy pasting (between apps or dociuments) is really what makes it powerful, It would be great if you can build on this.

@RFImages
Copy link
Author

RFImages commented Feb 27, 2023

Oh wait I do see that there is a start and finish cursor, so I guess copy pasting is the missing feature.
As it is without clipboard function - I don't see how useful it is, unless you just want to delete or insert a column

It would be helpful if the background reversed to show what is selected, like the normal "selected" indication.

@giuspen
Copy link
Owner

giuspen commented Feb 27, 2023

that's right, the clipboard is the next step (and some cosmetic improvements)

@giuspen
Copy link
Owner

giuspen commented Jun 14, 2023

The clipboard support will be in upcoming 0.99.56 (for now no right click menu items for copy/cut, only via keyboard shortcuts)

@pdelrot-samea
Copy link

Hello, I will not add a duplicate : this block mode/column edit would really help me.
Best regards, Pascal

@giuspen
Copy link
Owner

giuspen commented Jul 18, 2023

@pdelrot-samea this is already available in the current version 1.0.0

Just hold Ctrl+Alt down while you do the selection with the mouse, then you can either type characters (which will be added in column mode) or use the clipboard via Ctrl+C / Ctrl+X / Ctrl+V

@giuspen giuspen closed this as completed Jul 18, 2023
@pdelrot-samea
Copy link

Bonjour,
Great ! got it.

May I suggest few improvements for the future when you will have some time.

  • during selection, the complete line still with a blue background (as for classic line selection). During first try, because of this, I first thought that the bloc selection was not working
  • the thin vertical lines for selection border visibility may be improved.

I have in mind Notepad++ or Kate.
In Kate, a nice feature during bloc mode selection is : clic top right corner, clic bottom left corner (or reverse...) and you get the selected bloc (no mouse drag).

Finally, thanks for creating cherrytree.
Best regards, Pascal

@giuspen
Copy link
Owner

giuspen commented Jul 19, 2023

Cheers @pdelrot-samea 😉

@RFImages
Copy link
Author

RFImages commented Jul 20, 2023

Bonjour, Great ! got it.

May I suggest few improvements for the future when you will have some time.

  • during selection, the complete line still with a blue background (as for classic line selection). During first try, because of this, I first thought that the bloc selection was not working
  • the thin vertical lines for selection border visibility may be improved.

I have in mind Notepad++ or Kate. In Kate, a nice feature during bloc mode selection is : clic top right corner, clic bottom left corner (or reverse...) and you get the selected bloc (no mouse drag).

Finally, thanks for creating cherrytree. Best regards, Pascal

I agree with this.
Notepad++ handles it VERY nicely.
It is what I used to illustrate the concept in the original post.

@RFImages
Copy link
Author

RFImages commented Jul 21, 2023

I finally upgraded to 1.0.0 and I am already finding the copy pasting useful, it works very nicely, except when it doesn't.

Here is an example:
I did ctrl-alt and made this selection, I saw the begin and end markerss which disappeared when I attempted a screen cap but as you can see it copy pasted the entire blue selection instead of the demarked column.

.

THE SELECTION:


image


.
.
.

THE PASTED TEXT:


image


.
.
.

Other times it has functioned as expected:


image


It seems to be an issue when the line wraps around.

I do agree that it would be helpful (less initially confusing and more gratifying feedback) if the blue selection background of the selected area only highlighted the actual selection area of the column mode, but once you understand it, it works.

Thank you @giuspen for implementing this and your excellent responsiveness to issues and feature requests.
Cheers!
Or should I say Cherries!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants