3 ms·
It just seems that the author hasn't fully understood the application of multiple cursors. - Create multiple cursors using mouse clicks. Now the locations you
by kaushalmodi 9y ago
It just seems that the author hasn't fully understood the application of multiple cursors.
- Create multiple cursors using mouse clicks. Now the locations you click need not be (1) in a vertical alignment -- if vertically aligned, rectangle edits make sense (2) on identical symbols -- if identical, search/replace makes sense.
- Also you don't need to precisely on start or end of symbols. After clicking, I can do `M-b` or `M-f` (or whatever) to bring all cursors at identical syntactic locations.
- Even when not using mouse clicks, using multiple cursor is a much lesser cognitive load. If I want to refactor the symbol where the cursor is, I simply select the whole symbol (expand-region package), hit a binding to create multiple cursors at all identical symbol locations in the buffer (not in just the visible region). The OP now counted that as a disadvantage which was odd. I count myself proficient in using multiple cursors and I am confident that each time I do the above, the cursors would be created exactly where they should be (even when those are created outside the visible region). Then I simply type in the new symbol name to replace the selections. If I use search/replace, I need to type in the symbol name and possible regexp to denote the symbol begins and ends. With multiple cursors, no matter what symbol I am on, the action is the same (1) select current symbol (2) create cursors everywhere on such symbols .. no need to type in a specific regexp each time!
- Talking about the extra processing the CPU needs to do because of multiple cursors, I have created around 100 cursors in extreme cases and even then it was fine. In regular use, I need to create under a dozen multiple cursors.
- Finally the real-time visual feedback completely beats whatever little CPU gains we get by not using the multiple cursors and the extra time wasted in thinking what regexp to type, what macro to define, how big a rectangle selection to make etc.
- Also so much more is possible[1]: interactively adding/removing cursors, aligning, inserting numbers, etc. which would be much less efficient the conventional way.
[1]: https://github.com/kaushalmodi/.emacs.d/blob/master/setup-files/setup-multiple-cursors.el https://github.com/kaushalmodi/.emacs.d/blob/master/setup-fi...