Live data from Hacker News

My Emacs Productivity Tricks/Hacks

mycpu.org

121–130 of 210 posts

Re: My Emacs Productivity Tricks/Hacks

#121
post #53
post #41

Earlier quoted context omitted.

I switched to emacs in 2019 after using primarily vim for 12 years, and I think it's more than worth it. It's not an editor, it's not an IDE, it is kind of like an operating system where you can have a text editor, debugger, notes, mail, whatever you want. If you dig that, you'll love emacs. It's extensible in a way you've probably not experienced anywhere else, so if you like honing your tools so they fit the way yo…

> not an editor It's "editing macros," so yes, it's an editor first and foremost. > not an IDE It's integrated; mostly used by developers; it's an environment.

I mean, I play NetHack in it. I don’t think any IDE has that kind of flexibility.

Re: My Emacs Productivity Tricks/Hacks

#122

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 fil…

csv-mode does exactly what you want.

Re: My Emacs Productivity Tricks/Hacks

#123
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…

Because when you start to feel like the editor is an extension of yourself the feeling is so sublime. I’ve had collegues who literall pick up there mouse and click to go to the beginning of a line. It’s sad.

Re: My Emacs Productivity Tricks/Hacks

#124
post #119

Earlier quoted context omitted.

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

With lsp-mode, there’s really nothing I can think of that emacs can’t do compared to IDEs. In fact, emacs blows them out of the water. Before LSP was invented, I would have agreed with you. But pretty much all IDE features have been commoditized by LSP now.

I only know about the example of Rust, where IntelliJ is still significantly better and faster than lsp.

Re: My Emacs Productivity Tricks/Hacks

#125
post #44

Earlier quoted context omitted.

Can you compare and contrast the two? I really like tramp for seamlessly editing files on a number of remote VMs. You can even edit files inside Docker containers on remote systems via multi-hops. Tramp is a huge timesaver.

Well one major thing is that tramp is inside emacs so you can configure it with elisp, which is a major plus in my mind. The main problem with tramp is that Emacs is single threaded (and elisp threads run one at a time), so networking operations can be iffy. On most normal connections it works fine in my experience. Another reason to use sshfs is if you're switching between Emacs and a separate terminal, you don't ne…

By vterm do you mean this?

https://github.com/akermu/emacs-libvterm/blob/master/README....

It seems extremely experimental, and I've been trying recently to make my emacs more stable so I can choose when I want to spend time editing my config.

Re: My Emacs Productivity Tricks/Hacks

#126
post #5

org f-ing mode edit: actual package is called "org-mode"

org-mode for notetaking/journaling/organizing and writing documentation with org-babel for interactive (literate) programming and making diagrams (gnuplot, matplotlib, graphviz, mscgen, plantuml).

Can’t say this for many tools but using org-mode has been life changing for me.

Re: My Emacs Productivity Tricks/Hacks

#127
post #121
post #53

Earlier quoted context omitted.

> not an editor It's "editing macros," so yes, it's an editor first and foremost. > not an IDE It's integrated; mostly used by developers; it's an environment.

I mean, I play NetHack in it. I don’t think any IDE has that kind of flexibility.

http://eclipse-games.sourceforge.net/

Re: My Emacs Productivity Tricks/Hacks

#128
post #30

Earlier quoted context omitted.

I completely agree. I used vanilla Emacs for about a decade before finding list-packages. (I know, I know. I was really behind.) But stuff like org-mode never clicked for me. I had to sit down with the manual and read it to finally get a handle on what it is. I'm currently drafting an essay on what makes org-mode compelling, rather than how to use it. I think I'll do the same for other tools I use.

Awesome! I love reading essays like what you're planning on writing. Let me know how I can help, for example: I'd be happy to review drafts, be a sounding board, etc - my contact info is in my HN bio. Let me know!

:) Thanks! I’ll ping you when it’s ready for some feedback.

Re: My Emacs Productivity Tricks/Hacks

#129

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…

In vim: :' !awk '{printf("\"\%s\", ",$0)}' or to do the whole file: :%!awk '{printf("\"\%s\", ",$0)}' What I find nice about this approach is that I can use my knowledge of awk in other non-vim contexts. Similarly I can use my knowledge of other text processing commands to do things in vim, like reformat text into columns (:%!column -t) for example. Of course you could use vim commands to do the same thing: 0 GI" $ G…

> I can use my knowledge

That’s a great point. On the other hand, truly, “What happens in emacs, stays in emacs.”

Re: My Emacs Productivity Tricks/Hacks

#130

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…

In vim: :' !awk '{printf("\"\%s\", ",$0)}' or to do the whole file: :%!awk '{printf("\"\%s\", ",$0)}' What I find nice about this approach is that I can use my knowledge of awk in other non-vim contexts. Similarly I can use my knowledge of other text processing commands to do things in vim, like reformat text into columns (:%!column -t) for example. Of course you could use vim commands to do the same thing: 0 GI" $ G…

Of course you can do the same shell thing easily enough with emacs, too.
Post reply on HN