Hacker News new | past | comments | ask | show | jobs | submit login

Rectangular mark mode is really awesome. It makes working with rectangles a lot easier. It is now so well integrated into my workflow that I'm really annoyed when I have to use an older Emacs version.



It's funny, I started using Emacs around 1991 or '92 or so (at University), then I changed to Windows development in about '93 and switched my editor to BRIEF which had very nice columnar editing capabilities.

I used BRIEF for a few years until I moved away from strictly Windows development so I moved back to Emacs. Columnar editing was something I missed so much! But now that I've been away from it, it's hard for me to recall what I used to use it for.

Occasionally I do find that I wish I had it, but I remember feeling so crippled without it for a long time! So, can't wait to get back into it again now that it's available. I think it's one of those things that you start using it and find more and more things to do with it as time goes on. Just my $0.02 anyway.


I don't understand what is there that I can't do with rectangles in Emacs 24.3 (or even way before).

I can already kill (C-x r k), yank (C-x r y), replace (C-x r t) text in rectangles, insert text after the rectangle (C-x r z) or at the beginning of all the rectangle lines (C-x r a) or their ends (C-x r e).

What else is there?


The rectangle highlighting issue has been fixed[0].

http://emacsredux.com/blog/2014/01/01/a-peek-at-emacs-24-dot...


Thanks. So that's what other already said, there is nothing more. This was a really minor issue, I don't see why it would make anyone that much happy, but it's sure nice to have it fixed.


It also gives you a live preview when you use C-x r t to insert text, like iedit-rectangle-mode always did (iedit is still more robust, but for most simple cases I use C-x spc now instead of it).


Ah, that's cool! Thanks.


Did you use the 'C-x r *' keys previously? I'm so used to those that I haven't been able to prove to myself that the new rectangular selection is better... In particular, I use 'C-x r t' quite a lot. What is the 'C-x space' equivalent to that?

I'm curious to know which things are easier for you with 'C-x space'.


All C-x space does is visualize the rectangular region. You still use all the old binding (C-x r t for instance) to do anything with the region.

The annoying thing about C-x space, is that it used to do something completely different (set gud breakpoint), but I digress.


> All C-x space does is visualize the rectangular region. You still use all the old binding (C-x r t for instance) to do anything with the region.

Really? Upon reading the release notes, I was excited that I'd probably be able to just use commands like C-w or C-x u to act on rectangles. Sad to see it won't be the case.


Both of those commands seem to work correctly with rectangular selection.


Ah, right you are. In any case, the old bindings do still work.


It must have been a hard decision to make that change -- the current maintainers really hate breaking defaults. I suppose it's just that useful to have.


Interesting - could you please provide some examples of how are you using rectangular mark mode? I have never used it before, so I'm clearly missing something cool here...


Any time you're working with tabular data, or data that is aligned horizontally, it's helpful. For example, I might need to delete a prefix from a list of declarations. I often use macros for the same kinds of tasks, with each macro editing a line and putting the cursor on the next line afterwards.


apply-macro-to-region-lines does not need macros to put the cursor on the next line.

From the manual: The command C-x C-k r (apply-macro-to-region-lines) repeats the last defined keyboard macro on each line that begins in the region. It does this line by line, by moving point to the beginning of the line and then executing the macro.


Take a look at multiple cursor mode for this.


I'm very excited to try it out. I knew about the web browser, but I didn't know about this until I read the release notes.


I honestly have become so used to the rectagular mode as it is, that I'm mostly just annoyed by some of the keyboard shortcuts.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: