dail8859 / bettermultiselection Goto Github PK
View Code? Open in Web Editor NEWNotepad++ plugin to provide better cursor movements when using multiple selections
License: GNU General Public License v2.0
Notepad++ plugin to provide better cursor movements when using multiple selections
License: GNU General Public License v2.0
Hello,
You have home/end/left/right, let's add up and down.
Unfortunately I can't tell you how to program it, but that's my suggestion. xD
Thanks !
delete key on line end
If I press the delete key on the line end, while having multiple cursors, nothing happens.
I can simulate the expected behaviour by pressing [shift]
+[right]
and [delete]
backspace on line start
Same problem on line start, while having multiple cursors, and pressing backspace, though this works for example, if I pressed enter before.
3P - Progress Programmers Pal is a great Notepad++ Plugin which improves the default auto-complete function:
https://github.com/jcaillon/3P
The problem arises when both 3P auto-complete and BetterMultiSelection are active:
When trying to select the previous or next word in the auto-complete suggestion list by pressing the Down or Up keyboard arrows, BetterMultiSelection seems to intervene instead of 3P:
In the example posted above, pressing Down/Up arrows when the auto-complete box is active has the effect of moving all of the active cursors Up/Down (this is the behavior of BetterMultiSelection), instead of correctly selecting the previous/next word suggested in the auto-complete list.
Software/OS:
Notepad++ v7.5.9 32bit
3P - Progress Programmers Pal v1.8.3
BetterMultiSelection v1.3
Windows 10 x64
Thank you
First off - great plugin, I just started using it and it definitely makes a difference.
I just also found SCI_AUTOCSETMULTI SC_MULTIAUTOC_EACH on Scintilla Documentation which allows me when typing in mutltiselection mode and a function or work autocomplete window pops-up, I can select and press "Enter" and the selected autocomplete is filled for ALL the multiselected cursor positions instead of just the main one.
With your plugin enabled, pressing enter in this situation ignores the autocompletion choice and just adds a carriage return at the current cursor locations. Note that if I use the mouse to double-click the desired autocomplete selection and your plugin is enabled, I get the desired effect - the selected autocomplete is inserted at all cursor positions. Also hitting the Tab key does the desired effect (although I have the Tab key Shortcut remapped to a QuickText plugin so I need to disable that for the Tab key to work, but it should on a default setup). All this leads me to believe it's in the way you handle the "Enter" (VK_RETURN) key perhaps.
I wonder if you can check for SCI_AUTOCACTIVE perhaps to see if an autocompletion window is present and then ignore the "Enter" key as a newline insertion? I haven't looked in detail at your code or all the Scintilla messages to see how to detect if an autocompletion window has popped-up.
Cheers.
Hi,
thanks for this plug-in, it's very useful.
I was wondering if it would be possible to support Scintilla's SCI_DELWORDLEFT (Ctrl+Backspace) and SCI_DELWORDRIGHT (Ctrl+DEL) commands.
Suppose I have three lines (|
represents the multi-cursors):
one|
two two|
three three three|
If I invoke SCI_DELWORDLEFT (Ctrl+Backspace) I would expect the last word of each line to be removed, obtaining this result:
|
two|
three three|
Instead, this is the actual result:
one|
two two|
three three |
Likewise, if I put the multicursors at the beginning of the lines:
|one
|two two
|three three three
and I invoke SCI_DELWORDRIGHT (Ctrl+DEL) I would expect the first word of each line to be removed, obtaining this result:
|
|two
|three three
Instead, this is the actual result:
|one
|two two
|three three
Thanks.
In Sublime Text, when multiple words are selected and copied or cut, then those get also pasted in the respective positions marked by the cursors (which clearly need to be equal to the number of the initial selections). A demonstration follows below:
Do you think something like this could be implemented in BetterMultiSelection?
When a column area (Alt + mouse drag) is selected from bottom to top, copied and then pasted: the new copy is reversed by lines; this reversal does not happen with full or partial line selections made in the same bottom to top manner. Nor does it happen in any selection method (column, line, bottom to top, or top to bottom) with version 1.3 of the BetterMultiSelection plugin. The behavior still occurs when only the v1.4 plugin is installed (see attached debug info). Disabling the plugin (with the enable option unchecked) BEFORE making the bottom to top column selection does prevent the reversed line order when pasting, while disabling the plugin after making the bottom to top column selection will result in the reversed line order when pasted.
debug info.txt
Your plugin looks very interesting, but I cannot perform any selections as shown in the demo gif. I cannot find any instructions on plugin use. The plugin is enabled. Thank you.
In src/ScintillaEditor.h I found those two function:
I think that this is what VSCode has bound to the shortcuts ctrl-D and shift-ctrl-L. This makes the multi selection extremely fast and versatile. Can those functions be activated and bound to keyboard shortcuts?
Seems like I've introduced an issue with 0a0ee31 (sorry for that). If several selections are made and the selection is extended to the end of the line and deleted, there is too much deleted. See image:
It will be great if your plugin would be able to remember the multiple focus after undoing (Ctrl + Z). Now, after applying 'undo', the focus switches to normal focus on a single line.
If you want to better understand what I mean, you can try that in Sublime Text.
Does this plugin add a shortcut for Scintilla’s MultipleSelectAddNext()
? This is the well known [ctrl]
+[d]
shortcut from sublime. With the new Scintilla API this should be easyto integrate (https://notepad-plus-plus.org/community/topic/17626/plugin-update-luascript-v0-9-supports-scintilla-v4-1-4).
Hi,
I use multiselection to create commands and, sometimes, commands need a confirmation.
With other programs (SynWrite/CudaText) I used to create "command lines", move to the end of the lines, press Enter (this will add an empty line between "command lines") and add a Y.
Step 1 - Ppaste a list of nodes:
HMD
H7D
HID
HPD
H5D
Step 2 - Use MultiLine to create "command lines":
del fil HMD *
del fil H7D *
del fil HID *
del fil HPD *
del fil H5D *
Step 3 - As del fil command need a confirmation, move to the end of each line, press Enter:
del fil HMD *
del fil H7D *
del fil HID *
del fil HPD *
del fil H5D *
Step 4 - Now there should be a caret on every new line and I can add the confirmation:
del fil HMD *
y
del fil H7D *
y
del fil HID *
y
del fil HPD *
y
del fil H5D *
y
Hope it will be possible to add this feature.
very userful,thinks to you.
Hiya :)
I'd like to ask you something even if the question is not exactly related to your particular amazing project (just saw one gif showing the features and it looks really nice one)... So, how difficult would be implementing a similar behaviour on pyqt's QScintilla widget such as your project is doing right now on notepad++?
Asking you this cos 1 year ago I was aware Scintilla already was providing SCI_SETADDITIONALSELECTIONTYPING
and SCI_ADDSELECTION
tokens, but just using those wouldn't provide a nice multiselection behaviour like in SublimeText or your plugin... so yeah, how difficult do you think it'd be to achieve?
Thanks in advance.
First of all thanks for this great plugin! Do you think there is an easy way to implement multiline selection on an entire file? It would be incredibly useful on large files with thousands of lines, to press for example Shift + Alt + End/Start in order to have a multi-cursor on the entire file.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.