-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Add multiline editing to the Editor #2112
Comments
From ccordoba12 on 2015-01-13T04:31:20Z Nop, it hasn't been considered so far. It seems cool but I don't know how hard it will be to implement it. Summary: Add multiline editing to the Editor (was: Feature Request) |
I think with what Qt offers by default there is no (easy and clean) way to do this, so I would considered a |
Does QtCreator have this functionality? Because if it does, then we should be able to implement it too ;-) |
I SOO want to switch to Sypder from sublime text / pycharm but multiple select/editing has become ingrained in my workflow and I find myself unable to remain for long in an editor that can't do this. PLEASE consider this. |
Ok, we'll explore it for 3.1 :-) |
I will look into it for 3.1 |
Alt + drag works in qtcreator 3.5.0. Now get to work ! |
So, here is a proof of concept 😃 It is doable but it is a bit hackish:
|
Looks good! |
Oh dear god thank you. SOO excited for this. |
That's amazing!! I think this feature is very very very pratical! |
Nice ! |
@Nodd, yes you are correct, the main cursor is out of sync with the rest, even though I am also manually drawing it.... but it was a 60 minute work.. so don't expect much at this point :-p |
Looking forward to this! Also if ctrl-d, ctrl-u workflow could be included! :) (select next occurrence, skip select next) |
@Twizzledrizzle want to give me a hand?, and also can you explain a bit more on the Ctrl+D, Ctrl+U, is that sublime-like? |
Aye, sublime and atom like. I added the documenation below from sublime text. I would very much like to give you a hand, please let me know what I can do. Multiple Selection with the KeyboardAdding a LineTo add the line above or below to the selection, use Ctl+Alt+Up and Ctrl+Alt+down (OS X: Ctrl+Shift+Up and Ctrl+Shift+Down). If you go too far, use Undo Selection (Ctrl+U, or Command+U on OS X) to step backwards. Splitting the Selection into LinesSelect a block of lines, and then split it into many selections, one per line, using Ctrl+Shift+L, or Command+Shift+L on OS X. Quick Add NextTo add the next occurrence of the current word to the selection, use Quick Add Next, which is bound to Ctrl+D on Windows and Linux, or Command+D on OS X. Again, if you go too far, use Undo Selection (Ctrl+U, or Command+U on OS X) to step backwards. Find AllTo add all occurrences of the current word to the selection, use Find All: Alt+F3 on Windows and Linux, or Ctrl+Command+G on OS X. Single SelectionTo go from multiple selections to a single selection, press Escape. |
This is also one of the primary things keeping me from using spyder as my main IDE. I love spyder for the variable explorer, but without multi cursor support the editing experience is not as fluent as something like sublime. For example, Using Ctrl-D to highlight next occurrence of the highlighted word and editing all selections in one go is a massive time saver |
Just a remark, but is Ctrl+D really better than Replace All ? It looks cooler but the functionality looks the same. (Also Ctrl+D is currently set as delete current line). |
Hi, I was just wondering if the multiple cursor functionality is available in Spyder currently. |
No, it's not available currently. You can see it as an opportunity to become a spyder contributor ! |
I'm not involved in this project but from what I've seen I think is pretty amazing. One thing I'm really interested in is how this feature is evolving over time, why? Because you won't see many qt/pyqt projects out there having proper multiline edit. When I say "proper" I really mean it... for instance, Scintilla/QScintilla... when you delete/cut blocks of text the multiselections these will be lost in the ether. But if do the same on editors such as vscode/atom/sublime... the multiple selections will be preserved properly when undoing/redoing and that's really unvaluable. But I guess achieving that level of quality is difficult to reach though. With that said, this PR is pretty amazing https://github.com/spyder-ide/spyder/pull/4987/files ! |
I can also say I tried to switch to VS Code or Jupyter Lab (which both have this function), but Spyder feels like home when it gets down to software developing. |
@hyamanieu I think think it's a balance between providing useful information on which features are highest priority from the community perspective, vs. letting the Spyder developers prioritize features in a way that makes the most sense for them and for the project. But I encourage you to donate anyway, since more resources could help accelerate all timelines :) (Disclosure: I've donated.) https://opencollective.com/spyder |
I did that and I encourage others to do it as well. |
Do you have any idea about using |
@1900011604, I don't understand what you mean. |
I mean choice like this: https://code.visualstudio.com/docs/editor/codebasics#_multicursor-modifier |
Has Spyder 5.1.5 a multi cursor support now? |
Sorry, no |
Is multi cursor support available in Spyder version 5.2.2? |
Just adding here, that I along with everyone else think that it would be great to have multi-cursor support! CTRL-ALT would be a great key combination, like in RStudio. |
I was quite excited to get going w/ Spyder, but I see there still is no simple hotkey for multiline editing? that seems like too basic functionality to not be included, though. Am I missing something? |
Same here on Spyder 5.3.2 installed via https://archlinux.org/packages/community/any/spyder/ |
@NicholasJudge and @Firestar-Reimu, sorry but this is hard to implement and it won't come soon (at least one year because we're quite busy with other things). |
Just noting that, in another editor, multi-line editing is somewhat slower than in Notepad++, and that bothers me enough to just not use it there and instead paste into N++. With AutoHotKey, I press ^3::
Run "C:\Program Files\Notepad++\notepad++.exe"
return Pressing (So if it's so hard to do in Spyder, maybe it won't be as good as in N++, and users who are expecting it may not like it as much, and are better off accustoming with alternatives.) full script#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn ; Enable warnings to assist with detecting common errors.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
#InstallKeybdHook
^3::
Run "C:\Program Files\Notepad++\notepad++.exe"
return |
Hi, just wanted to get an update on the multiline select feature. Do the devs have this feature on their priority list now? |
Hey @yashpundir, thanks for your kind words. Unfortunately, we haven't had time to work on this because it's very tricky and we've been busy with other things, sorry. |
It seems that 6.0.0 still do not have this feature, if it has, how to toggle it? |
Sorry, this is not available yet. We'll try to implement it for 6.2 (most work for 6.1 is already planned). |
Are there any big changes planned for the editor in 6.1 that would make working on this right now fruitless? I'd really like this feature, and I was considering taking a crack at trying to port #4987 up to modern spyder. |
This comment was marked as off-topic.
This comment was marked as off-topic.
I've got the beginnings of an implementation going at https://github.com/athompson673/spyder. I'd love any comments if anyone wants to give it a try... Add cursors with Ctrl-Alt click. Lots of shortcuts are still untouched, but basic stuff works. Edit history and cursor position history are pretty broken. The original implementation example of using an editor extension could partially work, but there's a lot of things in the main editor which would still need modifying to allow extensions to override. Particularly lots of shortcuts are implemented by directly manipulating the primary cursor. If these were to be modified to signal extensions, much of the code would need be simply copied to the extension and re-written anyway. Given all this I'm just implementing directly in the CodeEditor class. I recognize this is taking an already enormous class and making it bigger, so if anyone has better ideas on the layout, feel free to suggest alternatives. Plans: @ccordoba12 fyi Media1.mp4 |
Thanks a lot for working on this @athompson673! It looks awesome so far!! |
This is so exciting! Agree it's looking great so far. |
From [email protected] on 2015-01-13T04:28:43Z
Is a feature of multi-editing / multi-selection planned?
Basically the idea is to be able to set multiple cursors to edit at different places of the code at the same time.
Link with the ability to select several occurrence of the same word, it can be used as a very quick "find and replace" for instance.
Here an example: http://blog.jetbrains.com/ruby/2014/03/whats-mining-multiple-cursors-and-selection/
Original issue: http://code.google.com/p/spyderlib/issues/detail?id=2112
The text was updated successfully, but these errors were encountered: