Live data from Hacker News

My Emacs Productivity Tricks/Hacks

mycpu.org

91–100 of 210 posts

Re: My Emacs Productivity Tricks/Hacks

#91
post #89

Whenever I hear about or see the .vimrc and .emacs files people create, maintain and constantly modify to me this just looks like the perfect example of a sunk cost fallacy. IDEs are usually dismissed by many such people since you can (allegedly) do the same in vim/emacs but to me this seemed crazy as I'd see people spend hours configuring plugins, writing Lisp and whatever to save them on some task they'd get for fr…

Would you rather drive a nice car that needs some loving care and maintenance once in a while or an old banger that just gets the job done? It's the same sort of prospect.

Some people like to work in a nice environment where they are able to remove all the little frustrations that less customizable tools often force upon you. When emacs annoys you at least you can fix it if it is annoying enough for you to want to do so.

In any case neither choice is wrong or right. Do whatever floats your boat.

Re: My Emacs Productivity Tricks/Hacks

#92
post #79

The one thing I consistently do in emacs that shocks my coworkers -- is running this (custom) function, that I call "arrayify": (defun arrayify (start end quote) "Turn strings on newlines into a QUOTEd, comma-separated one-liner." (interactive "r\nMQuote: ") (let ((insertion (mapconcat (lambda (x) (format "%s%s%s" quote x quote)) (split-string (buffer-substring start end)) ", "))) (delete-region start end) (insert in…

I am developing a headache now, after trying this out, because I'm remembering all the times I have done this by hand. Or even writing an awk script, etc.

hm, I just select the text and do

     xclip -o | awk '{ print "\"" $0 "\"," }'
find it simpler than 10 lines of lisp but what do I know :p

Re: My Emacs Productivity Tricks/Hacks

#93
I use Emacs every day. But only for org-mode which is fantastic.

Besides that I really really tried hard to love Emacs as my go-to editor. However I found no alternative for

decent CSV file support (like https://github.com/chrisbra/csv.vim simply great!)

Inspecting large XML files with syntax highlighting and folding. VIM is also not the fastest here but at least 10 times faster (emacs SGML mode is a joke for xml files and forcing xhtml mode of web-mode is also not that great)

Maybe all my emacs doing was just wrong.

Re: My Emacs Productivity Tricks/Hacks

#94
post #34

Another beautifully designed piece of Emacs software is magit, where the defaults are extremely sane. The package is self-documented and you can learn it all by typing ? anytime. Being able to git log the file you are in is also a huge plus.

These days, Magit is the only thing I consistently open Emacs for.

Re: My Emacs Productivity Tricks/Hacks

#95

The one thing I consistently do in emacs that shocks my coworkers -- is running this (custom) function, that I call "arrayify": (defun arrayify (start end quote) "Turn strings on newlines into a QUOTEd, comma-separated one-liner." (interactive "r\nMQuote: ") (let ((insertion (mapconcat (lambda (x) (format "%s%s%s" quote x quote)) (split-string (buffer-substring start end)) ", "))) (delete-region start end) (insert in…

I've been using Emacs for a very long time, and I do this on a fairly regular basis. I always used macros, but this function wins, hands down. Great job!

Re: My Emacs Productivity Tricks/Hacks

#96
post #60
post #2

Helm-projectile rant is well deserved. I'm often ashamed looking at my colleagues trying to find some file with a mouse in their big fat IDEs.

All decent IDEs have a file search command.

I like Emacs a lot, but it' definitely lacking most of the advanced IDE features, and the Emacs features that a decent IDE (read: Intellij) implement are usually "good enough" for me.

People who've been using only Emacs for the last 20 years are in no position to comment on IDEs

Re: My Emacs Productivity Tricks/Hacks

#97
post #79

Earlier quoted context omitted.

I am developing a headache now, after trying this out, because I'm remembering all the times I have done this by hand. Or even writing an awk script, etc.

hm, I just select the text and do xclip -o | awk '{ print "\"" $0 "\"," }' find it simpler than 10 lines of lisp but what do I know :p

Once you bind it to a key, though, it's a lot quicker. There is something to be said for emacs as a unified computing environment when compared to the UNIX way of doing things. Instead of wrangling different parts of the filesystem and tying them together with aliases and shell scripts, you can just version-control the productivity software (i.e. your emacs config) you write in the course of using emacs.

Re: My Emacs Productivity Tricks/Hacks

#98
post #89

Whenever I hear about or see the .vimrc and .emacs files people create, maintain and constantly modify to me this just looks like the perfect example of a sunk cost fallacy. IDEs are usually dismissed by many such people since you can (allegedly) do the same in vim/emacs but to me this seemed crazy as I'd see people spend hours configuring plugins, writing Lisp and whatever to save them on some task they'd get for fr…

Would you rather drive a nice car that needs some loving care and maintenance once in a while or an old banger that just gets the job done? It's the same sort of prospect. Some people like to work in a nice environment where they are able to remove all the little frustrations that less customizable tools often force upon you. When emacs annoys you at least you can fix it if it is annoying enough for you to want to do…

[deleted]

Re: My Emacs Productivity Tricks/Hacks

#99
post #89

Whenever I hear about or see the .vimrc and .emacs files people create, maintain and constantly modify to me this just looks like the perfect example of a sunk cost fallacy. IDEs are usually dismissed by many such people since you can (allegedly) do the same in vim/emacs but to me this seemed crazy as I'd see people spend hours configuring plugins, writing Lisp and whatever to save them on some task they'd get for fr…

You might as well make this point about all software. Can't people just use Excel? Why write something bespoke?

Re: My Emacs Productivity Tricks/Hacks

#100

Earlier quoted context omitted.

hm, I just select the text and do xclip -o | awk '{ print "\"" $0 "\"," }' find it simpler than 10 lines of lisp but what do I know :p

Once you bind it to a key, though, it's a lot quicker. There is something to be said for emacs as a unified computing environment when compared to the UNIX way of doing things. Instead of wrangling different parts of the filesystem and tying them together with aliases and shell scripts, you can just version-control the productivity software (i.e. your emacs config) you write in the course of using emacs.

And now since I'm sucked into the cult of the helm-o-verse I find I am binding many fewer keys. Just start typing 'M-x ar' and now it's the second item. Add another 'r' brings it to the fore. Less (for me) to remember.

I note this mainly because it took me quite a long time to grok helm. Keep working with it!

Post reply on HN