Open e3krisztian opened 6 years ago
It's already possible, you can have a rectangular selection with (default scintilla shortcuts) holding alt+shift+<arrow keys>
(see list of qscintilla commands, these commands can be configured in ~/.config/eyeditor/keyboard.ini
BTW).
I personally have this in my config:
@defaultEditorConfig
def selectionConfig(ed):
ed.setMultipleSelection(True)
ed.setMultipaste(True)
ed.setAdditionalSelectionTyping(True)
It allows to type and paste in multiple lines at a time.
There are some interesting ideas on the sublime text page you linked that could be borrowed, thanks.
BTW, it's funny you point at this stackoverflow answer because I'm the one who wrote it :)
I was not aware, it was you :)
Having multiple cursors is different from rectangular selection, I mostly use it for rename refactoring and in place of keyboard macros.
It is quite powerful and easy to use.
This is how it goes for rename refactoring:
ctrl-D
inside the word, which selects itctrl-D
selects the next instance of the selection and drops a cursor at the endIt is also possible to skip an instance with a keypress (ctrl-K ctrl-D
) or undo the last cursor drop/skip operation (ctrl-U
).
The search feature in eye is currently under rework, but I thought the search could optionally select all found/highlighted results, what do you think?
It is also possible to skip an instance with a keypress (ctrl-K ctrl-D) or undo the last cursor drop/skip operation (ctrl-U).
Good idea, a bunch of selection functions (like "unselect a selection") could be provided, to be easily bound to keys in config.
I use a text editor for its interactivity, so I would not use the select all matches feature - in fear that some non-visible instance is selected and edited, I would use sed
for mass editing, but it might be just me.
For me the search functions that matter are
*
, sublime text: ctrl-d
)ctrl-d
)If there is multi-cursor support there should rarely be any need for replace.
Regexp search/replace is nice sometimes, but is usually non-trivial to use due to differing regexp dialects - have to remember which dialect the editor uses, how it differs from sed
, Perl
, Python
, Emacs
, ...
as seen here: https://www.sublimetext.com/ and described here: https://www.sublimetext.com/docs/2/multiple_selection_with_the_keyboard.html
scintilla seems to support it: https://stackoverflow.com/questions/38850277/multi-cursor-editing-with-qscintilla #