In Notepad++, you can press Alt-LeftMouseClick-Drag to select a rectangular region.
How do I do this in emacs (windows) ?
I tried the methods in http://www.emacswiki.org/emacs/RectangleCommands but my selection happens as a regular region instead of rectangular shape:
http://i.stack.imgur.com/tBMBN.png
I also tried enabling/disabling cua mode.
Or, you can set the mark at the end of the text, move to the beginning, and then type C-x C-u . The most common way to set the mark is with the C- SPC command ( set-mark-command ). This sets the mark where point is. Then you can move point away, leaving the mark behind.
You can delete a rectangle with delete-rectangle ( C-x r d ) or kill-rectangle ( C-x r k ). Either one will kill the rectangle with corners defined by the point and the mark. kill-rectangle will also save it for yanking with yank-rectangle .
In Emacs 24.4 and greater, C-x SPC
is bound to rectangle-mark-mode
which selects a rectangle visually.
http://emacsredux.com/blog/2014/01/01/a-peek-at-emacs-24-dot-4-rectangular-selection/ describes this in greater detail.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With