Live data from Hacker News

Absolute Beginner's Guide to Emacs (2012)

jesshamrick.com

191–200 of 262 posts

Re: Absolute Beginner's Guide to Emacs (2012)

#191

I have to share it here: http://emacsrocks.com/ This is an absolutely insane series of tutorials that will explode your mind and make you feel godlike. If you want to learn why people love emacs so much, watch this.

The only thing I don't like about emacsrocks is that it's not text. Videos make for horrible reference material.

Re: Absolute Beginner's Guide to Emacs (2012)

#192

I gave emacs another try earlier this year. First vanilla, but then I missed vim keybindings so I installed evil. Then I switched to spacemacs. Eventually I decided I was barely using any emacs-specific features and just went back to vim. Vim feels so much snappier. I do miss some of the more ide features (jump to definition, execute selected code) but it wasn't worth the overhead, imho.

> Vim feels so much snappier.

I am in kind of ranty mood, so forgive me if I take this opportunity to do a brain dump on you. Just to be clear, while I have my preference, I very much respect the fact other people will have different preferences. If vim makes you happy, by all means, use it!

I came full-circle, starting out with emacs, then discovering vim, then returning to emacs after a few years. Both are great editors. I love vi's command language, it is so concise and powerful. At work, I have been using Visual Studio a lot, recently, and installed the VsVim add-on, after looking for something emacs-like without success.

Vi rules because it is simply awesome at editing text; it is very Unix-y that way: Do one thing, but do it really well. I still use vi regularly to quickly edit a config file or something like that.

Emacs rules because it is awesome at integration. With emacs, I can write some Python code[1], start a Python REPL, load some of my code into the REPL and play around with it. Just as a simple example. I can start an SQL session for various RDBMS inside emacs buffers. The list goes on for as long as one can come up with new things to do inside emacs. The big payoff is that that all the muscle memory, all the keyboard shortcuts, all the hooks and customization work consistently across all those things.

This is also, why IMHO it takes a relatively long time for emacs to pay off, but once you reach that point, the payoff is phenomenal!

In Visual Studio, I am glad that I have VsVim: Intellisense is awesome, and VS is a great IDE, but the actual part of editing text, which is still a significant part of programming, kind of sucks. VsVim made that a lot better.

[1] Just an example, I have not actually written any Python code in years. But I think this more or less works for most languages that offer REPLs.

Re: Absolute Beginner's Guide to Emacs (2012)

#193
post #119

You should check out tramp-mode too. Its a killer feature that lets you edit files remotely (AWS, Azure, even docker containers!) as if they are local. All the stuff work, so you can do diffs between a local file and an a AWS file and it all appears to be local. If you are editing a remote file and do a git action (through magit) it knows to work on the remote file. You can open up remote shells also. You just go: CT…

I also recommend helm-tramp for added tramp greatness for example if you regularly access many different hosts/VMs. Question: I often find tramp to be significantly laggy and much slower when compared to simply sshing into the remote host. It is almost as if tramp is opening up a new ssh connection for every command. What do people here do about tramp lagginess? I've researched this problem but I have not found a goo…

you can use ssh controlmaster (adding variation of the following into your .ssh/config):

Host *

ControlMaster auto

ControlPath /tmp/ssh-%r@%h:%p

This helped me quite a lot with tramp

Re: Absolute Beginner's Guide to Emacs (2012)

#194

Earlier quoted context omitted.

I also recommend helm-tramp for added tramp greatness for example if you regularly access many different hosts/VMs. Question: I often find tramp to be significantly laggy and much slower when compared to simply sshing into the remote host. It is almost as if tramp is opening up a new ssh connection for every command. What do people here do about tramp lagginess? I've researched this problem but I have not found a goo…

The enable ssh mastercontrol and persistent connections.

@anonacct37 I've always had

ControlMaster auto

ControlPath ~/.ssh/cm_socket/%r@%h:%p

ServerAliveInterval 60

Is there something beyond that I should be doing? Does tramp need to be configured in some special way to take advantage of the persistent connection?

Re: Absolute Beginner's Guide to Emacs (2012)

#195

Earlier quoted context omitted.

I completely agree, but I have the os do that. Except on my iPad where I am grateful for blink to have that capability. On windows I had a special mode for caps lock via autohotkeys. Press and release meant esc. Press followed by another key and release was ctrl-key. I really liked that, but I couldn’t do it on Mac or iPad so I just settled on ctrl. My old //e has control there naturally.

The behaviour you have for Windows is available for Mac with Karabiner-Elements. It's tremendously helpful.

I haven’t looked at karabiner-elements for a while. Last I looked it wasn’t able to do what I needed. I’ll go have a peek.

Re: Absolute Beginner's Guide to Emacs (2012)

#196
post #119

You should check out tramp-mode too. Its a killer feature that lets you edit files remotely (AWS, Azure, even docker containers!) as if they are local. All the stuff work, so you can do diffs between a local file and an a AWS file and it all appears to be local. If you are editing a remote file and do a git action (through magit) it knows to work on the remote file. You can open up remote shells also. You just go: CT…

I had no idea tramp-mode supported docker, that's amazing.

FYI: You can set it up to use the container names:

M-x customize-variable docker-tramp-use-names

Re: Absolute Beginner's Guide to Emacs (2012)

#197
post #191

I have to share it here: http://emacsrocks.com/ This is an absolutely insane series of tutorials that will explode your mind and make you feel godlike. If you want to learn why people love emacs so much, watch this.

The only thing I don't like about emacsrocks is that it's not text. Videos make for horrible reference material.

I have a vendor that actually tries to submit videos as "documentation" for the projects that they work on. I keep telling them that videos are good for tutorials and presentations, but they are not documentation.

I catch it in the SOWs, but I missed it on the first few. They refused to provide written documentation saying it wasn't in scope, which was their right since it wasn't. I have never watched and critiqued videos for completeness before or since, but they would have been better off just providing the written docs, since they spent so much time adding and editing video content. They still try to sneak it in the SOW as if they learned nothing, and now it's just our little game we play.

Re: Absolute Beginner's Guide to Emacs (2012)

#198

Earlier quoted context omitted.

Not funny. Evil mode was released in 2013.

I tried Evil mode a few months ago and went back to Vim very quickly. It's one of the best Vim plugins out there, but it still misses a few features and it also behaves differently in a couple of situations. It never really feels like Vim, more like a minefield of unknown shortcuts with a layer of Vim bindings on top. But I get why some people like it, if you can't stand modal editing then Emacs is a great choice.

Could you elaborate on some of the specific features that Evil was missing? Aside from a couple of exceptions, any differences from Vim are considered bugs.

Re: Absolute Beginner's Guide to Emacs (2012)

#200
post #65
post #42

I tried Emacs several time. The concept is cool but the execution makes it so that for me, in practice, VS Code is better. I'd want either: * tabs with a good UX or * super powerful, easy to use, integrated command and fuzzy file search, also with a good UX. I'd also want a terminal at least as good as the VS Code one, on Windows, to use with Cygwin. With Emacs I'd have to learn a big bunch of terminology no other ed…

You can consider these points: - Tabs are not present in Emacs, but C-x C-b will list all open buffers + Fuzzy file search : you can take a look at the popular Ido-mode + eshell is pretty powerful, if you think about it, you have all the emacs search functionality etc. available in a shell inside the editor itself. I am not trying to popularise emacs, but "inflexible" is not something that you associate with emacs. I…

> The real gripe for me about emacs is that it is single threaded. So a long grep launched off will freeze the entire editor.

Are you running grep with `shell-command` (M-!)? Using M-x grep, `async-shell-command` (M-&), and invoking grep directly in shell, eshell, term and ansi-term all leave emacs as responsive as normal for me. shell-command is the only one that seems to hang.

I'll also add ivy[1] and helm[2] as alternatives to Ido which are very popular completion systems with integrations that span the package ecosystem.

[1]: https://github.com/abo-abo/swiper

[2]: https://github.com/emacs-helm/helm

Post reply on HN