Live data from Hacker News

The single most useful Emacs feature

stackoverflow.com

71–80 of 112 posts

Re: The single most useful Emacs feature

#71

`C-u SPC` which pops the mark. This allows you to go back to different places in your buffer quickly. For example, if you are editing a program and need to add an import statement, you could do it like this: `C-SPC M- If you are using transient-mark-mode, you can use `C-SPC C-SPC` to active and deactive the highlighted region. That'll still leave a mark.

The nice thing is that many commands set the mark automatically. So in your example, there's no need for the initial C-SPC.

Re: The single most useful Emacs feature

#72
post #71

`C-u SPC` which pops the mark. This allows you to go back to different places in your buffer quickly. For example, if you are editing a program and need to add an import statement, you could do it like this: `C-SPC M- If you are using transient-mark-mode, you can use `C-SPC C-SPC` to active and deactive the highlighted region. That'll still leave a mark.

The nice thing is that many commands set the mark automatically. So in your example, there's no need for the initial C-SPC.

True. I've just gotten into the habit of doing it manually in case I use a command that doesn't do it.

Re: The single most useful Emacs feature

#73
post #37

It's interesting that it's hard to explain, because the fingers will play the chord by themselves and I need to stop and think to know what I am actually typing. C-x r k to cut a rectangle, and C-x r t to add one filled with, for example, the comment symbol: (C-space)this to comment C-x r t # #this #to comment

I find cua-mode's rectangle support superior. http://trey-jackson.blogspot.com/2008/10/emacs-tip-26-cua-mo...

Holy crap, thank you very much! Looks like cua-mode rectangle select might actually be the equal of Visual Studio's very straightforward rectangle selections...

Re: The single most useful Emacs feature

#74
post #46
post #37

It's interesting that it's hard to explain, because the fingers will play the chord by themselves and I need to stop and think to know what I am actually typing. C-x r k to cut a rectangle, and C-x r t to add one filled with, for example, the comment symbol: (C-space)this to comment C-x r t # #this #to comment

You can also use the M-x comment-region and M-x uncomment region to comment stuff. If you use it a lot, just bind them to a convenient key stroke.

Don't forget M-; is comment-dwim which usually does... what you mean (uncomments the region if it looks commented, comments it otherwise)

Re: The single most useful Emacs feature

#75
post #56

The kill ring. I would marry the kill ring and have its babies. Why have other editors not adopted this? Have they?

I wish the Windows Clipboard would implement a version of the kill ring. I really, really hate not having previous cuts and copies available. As a rather clumsy work-around I keep an emacs scratch file open on my task bar and copy stuff I might need more than once to it.

The ditto clipboard manager for Windows http://ditto-cp.sourceforge.net/ has completely solved this problem for me.

Re: The single most useful Emacs feature

#76
I love how every post on Stack Overflow that gets popular on Hacker News always gets closed by SO admins as "not constructive". It's like they really are annoyed when their stuff gets noticed by the world outside their walled garden. What are they - hipsters? "I was a fan of internet startups before they got popular, dude." It's bad enough on Wikipedia, which appears to operate on the principle that a megabyte of hard disk still costs $100, but on Stack Overflow it's just plain foolish.

Re: The single most useful Emacs feature

#77
post #76

I love how every post on Stack Overflow that gets popular on Hacker News always gets closed by SO admins as "not constructive". It's like they really are annoyed when their stuff gets noticed by the world outside their walled garden. What are they - hipsters? "I was a fan of internet startups before they got popular, dude." It's bad enough on Wikipedia, which appears to operate on the principle that a megabyte of har…

Less cynically, Stack Overflow is about specific answers to specific questions. Any question broad enough to be interesting to a site like Hacker News is too broad for Stack Overflow, apparently.

Re: The single most useful Emacs feature

#79
post #76

I love how every post on Stack Overflow that gets popular on Hacker News always gets closed by SO admins as "not constructive". It's like they really are annoyed when their stuff gets noticed by the world outside their walled garden. What are they - hipsters? "I was a fan of internet startups before they got popular, dude." It's bad enough on Wikipedia, which appears to operate on the principle that a megabyte of har…

Less cynically, Stack Overflow is about specific answers to specific questions. Any question broad enough to be interesting to a site like Hacker News is too broad for Stack Overflow, apparently.

Makes sense, but it's insane. More general answers are more generally useful than specific ones, by definition.

Re: The single most useful Emacs feature

#80
post #43

TRAMP. Being able to seamlessly remotely edit files and run remote modes. At work I regularly edit files on 10-15 remote machines. But I never ssh to them and run an editor. Instead I'll just visit them through TRAMP, run Magit to commit stuff that I've done etc.

Does magit actually work in git repos on remote servers?

Edit: Holy crap, it does. That's going to be useful.

Post reply on HN