-
Notifications
You must be signed in to change notification settings - Fork 169
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
Line selection #186
Comments
Is SCI_COPYALLOWLINE what you want?
|
Implemented in 95f1459. |
That is only one line. But I meant to make multiple line selection, not just single line. Thought I do not know if it's doable or not, I am not familiar with Scintilla. |
I tried Visual Studio 2017, it not behaviors with multiple line selection. Is there free available editors/IDEs/tools behaviors with multiple line selection? |
As I mentioned, in old days almost any decent editor had line selection, along with stream (character) and column selection modes. But as editors evolved or new ones appeared, line selection mode disappeared. |
It seems line selection is already in Notepad2: What is missing are arrow keys during selecting. |
Not exactly even with one line. If you do Ctrl + Shift + Space to select current line and copy it into clipboard. Then go to other line filled with text, put the cursor in the middle it and paste. What you will get is splitted line at the point of cursor with inserted text at split point. That's just standard selection. |
I think Cut (Ctrl+X), Cut Line (Ctrl+Shift+X) and Copy Line (Ctrl+Shift+C) (under Edit -> Lines) can be changed to add MSDEVLineSelect tag like Copy (Ctrl+C). manually select lines from line number margin will not add MSDEVLineSelect tag (Visual Studio not add this tag). Make selecting line with Ctrl + Shift + Space, then copy like Vim (Shift+V then y) maybe harder to implement, as it need to distinguish from selecting line from line number margin. |
zufuliu, that's interesting idea, I like it. What about using keyboard shortcuts, like it's done In Slickedit. |
I think am on the wrong direction. Scintilla actually has a line selection mode Add a shortcut or menu to toggle line selection mode will make most thing works. |
I think line selection works very better for now:
|
@umnyaga any feedback on current behavior ? |
@zufuliu not yet. I do not build Notepad2 myself, waiting for next release to check it out. |
@umnyaga there are builds on AppVeyor at https://ci.appveyor.com/project/zufuliu/notepad2 x64 https://ci.appveyor.com/project/zufuliu/notepad2/build/job/j59vw3fmqbj9xkpj/artifacts |
@zufuliu I tried the build you mentioned. Yes, it works as I wanted, that is great. First free modern editor which supports line selection! |
Oh, one more thing. Ctrl+Shift+Space starts line selection, then select several lines and press Del. It should remove all selected lines. But what happens, the editor puts one empty line in the place of selection. It should not. |
Fix wrong anchor/caret position after change to line selection.
@umnyaga Thank you for the tests. These bugs are fixed by e342a8c, fa1c29f and d68be45. |
半个空格比现在的一个空格较合理,不会误判为多了个空格,也能知道空行也是选择状态。 |
Ticket for the "extra space" after selected lines is created at https://sourceforge.net/p/scintilla/feature-requests/1356/ |
thx,我根据你之前提供的方法,只保留 1/4 个空白就好看了。
|
临时这样吧,等Scintilla修改后会用size表示额外的空白宽度。 |
Added workaround in 421e910. you can use |
Close this for now. |
Fix wrong anchor/caret position after change to line selection.
…udio's "Expand Selection to Containing Block", issue zufuliu#186.
…ding margin width, issue zufuliu#186.
…ext global style), issue zufuliu#186.
Is it possible to implement line selection in Notepad2?
Some details. Currently, the editor supports two types on selection, one is regular (sometimes it's called stream or block) selection and column selection. In old days, most of text editors supported 3 modes, line selection mode being third mode. Line selection selects whole lines, and when you copy them and paste, they behave like lines, not splitting line at current position and inserting text at split point.
It may sound odd, but it extremely useful and saves a lot of keystrokes and mouse clicks when editing text.
The text was updated successfully, but these errors were encountered: