
Master Emacs in one year - dgellow
https://github.com/redguardtoo/mastering-emacs-in-one-year-guide/blob/master/guide-en.org
======
Goladus
_Once you have mastered Emacs, you are good at all other editors_

I haven't found that to be true at all. I find that due to archaic
idiosyncrasies and the customization possible with emacs, the more time I
spend with it the more difficult it becomes to use different editors.

~~~
rikkus
I spent 5 years learning and using vi (n perhaps a dozen different Unix-like
OSes, so they were all different, meaning I could only use a core set of
features.

I then spent a few years working on Windows where I had Vim, but other editors
I used were, well, 'standard'.

Then ViEmu came along and I now move between Vi-like editing in VS and Vim,
and 'normal' editing in other apps.

It's not too bad, to be honest. I'm editing in a non-vi-like-manner in this
comment box. I could probably install something to make Chrome do vi-like
editing here, but my brain is happy to switch modes, if you'll forgive the
pun.

~~~
Goladus
True I rarely have a problem editing in web text boxes, I never really
committed to using emacs as a word processor. But I'd be lying if I said I've
never accidentally closed a browser tab when absent-mindedly trying to do a
backward-kill-word ('ctrl-w').

I was thinking more about programming and system administration. After years
of using emacs, I find it harder to adapt to the popular mainstream tools like
Visual Studio, TextMate, etc.

~~~
teddyh
Ctrl-w as “backward-kill-word” is a _Unixism_ from the classic Unix TTY, you
can’t blame Emacs for that one.

~~~
recoil
Indeed. Ctrl-w in Emacs is actually "kill-region".

------
diminish
After seeing TextMate struggle around the jump from version 1 to 2 and
yesterday reading Sublime Text to struggle going from version 2 to 3 (to 4) I
became more afraid of the sustainability of newer editors. Maybe it's time to
hold stronger to your emacs, (or vi).

~~~
ubernostrum
I've been using Emacs as my day-to-day editor for coming up on 15 years now.
There is a lot to be said for picking up a tool with that kind of longevity.

~~~
jpmattia
> I've been using Emacs as my day-to-day editor for coming up on 15 years now.
> There is a lot to be said for picking up a tool with that kind of longevity.

To amplify your comment: I'm going on 33 years, and one of the great things
about emacs is how it has changed with the times.

~~~
Isamu
>I'm going on 33 years

Your comment made me realize I'm about the same (ouch.)

I started on TECO EMACS on a DEC-20, then Gosling Emacs on Unix, then GNU
Emacs on Unix, then various mini-emacs on PCs, finally back to GNU Emacs.

>how it has changed with the times

Heh, even a glacier will surprise you.

------
danso
Reading guides like these makes me think about how I sound like when I implore
novices to try out the command-line.

 _Why should I?_

I'll peg myself as a half-competent developer, the kind who codes everyday and
can lose a weekend to a spontaneous side project. I am completely in agreeance
that tool mastery is vital for enjoying and being productive in programming, I
just have no concept, not from this guide, and not from many others, why Emacs
is better for me than Sublime Text, nevermind why I should consider taking a
year (an eternity in technological time) to master it.

And I realize that's a question that requires an unfair amount of trivial
knowledge (e.g. the way I work and design)...but that's kind of the core
concept for me...I feel pretty productive in ST3, I can sense the shortcuts
and power tools I haven't taken the time to master and where they would help
me, and for the most part, I design my projects in a way that fit the ST3
navigational flow...which I imagine is a side-effect of ST3's overall
excellent design. In general, though, the bottleneck for me in programming
isn't the typing of code or navigating through files, it's the sitting and
thinking...rarely do I ever feel that ST's navigational functions cause me to
lose context or concentration.

So all things considered, what value does Emacs bring me? Is it better in
_general_ programming situations? Or for ones in which a highly customized
environment is needed? In that case, then fashion the argument properly...I
would never argue that Ruby is the best language for all purposes, but I could
certainly argue that it's a great contender for specific domains, and as a
"glue" code.

Maybe the OP lists some compelling use cases further down in this document,
but I pretty much stopped reading at this line, which gives me low confidence
that me and the OP share the same worldview of how things work:

> _No job ad will list Emacs as a required skill. That’s actually a good
> thing. It ensures that only honest technical guys exist in Emacs community._

~~~
tokenrove
> nevermind why I should consider taking a year (an eternity in technological
> time) to master it.

I don't want to proselytise, but maybe that hints at one of the core appeals
of emacs. A year is nothing in terms of the span of time emacs has been
around, and so time invested in making emacs _your_ editor is effort that
won't be discarded in the next technological cycle.

The other aspect is what I mean by "making emacs _your_ editor"; emacs has had
a lasting appeal because it is so general, and so malleable. Emacs becomes a
construction material for your personal editor, and everyone who uses it
seriously ends up with something idiosyncratic and ad hoc, in the best senses
of those words.

~~~
collyw
Visual Studio, or Eclipse have been around for a fair while as well now. Its
not like they will disappear with the next text cycle. And you can get
productive with them in far less than a year.

~~~
tokenrove
Every five years or so I decide to give whatever editors/IDEs are in vogue a
decent shot, to make sure I'm not missing out on anything (better still is to
work along side of someone who is really productive in a radically different
environment, like acme). Usually I come away from it with a few tweaks to my
emacs configuration, but I have yet to be compelled away from emacs.

For example, I gave Visual Studio another shot recently (VS2013); and I mean,
I read books on using it productively, I read the various tip blogs, advice
for customization online, et cetera; I used it extensively. Unfortunately, I
just don't see what people see in it. From my point of view, it's still slow,
cumbersome, expensive (for any version with features that are actually
useful), much less featureful than (customized) emacs, and doesn't run on most
of the platforms I use to develop software. In theory, I could dedicate a few
years writing extensions for one of these IDEs to duplicate all the emacs
modes I use, but I'd probably never be able to fix, for example, buffer
switching, or all the places where the mouse is the preferred form of
interaction, or where modal dialogs steal focus (let alone all the dialogs
that inexplicably aren't resizable). Meanwhile, the nice features like
Intellisense and so on are the kind of customizations I've had in emacs for
most of my prefered languages for years anyway.

------
noelwelsh
At last, a reason to check G+! I also need to learn about smex.

Interesting to see he uses evil-mode. I've just started using it, and so far
the jury is out. I have yet to find an equivalent to move by sexp (move by
sentence [()] doesn't do the same thing for me) for instance. I'm less
interested in an exact replica of Vim than a more efficient editing
experience. Perhaps this will ease with more experience.

------
octopus
_A developer who is curious enough to try Lisp is possibly more intelligent
than average_

This is the kind of exaggeration that makes a lot of people to avoid even
trying Lisp. Any programming language that uses a different programming
paradigm than the one you are familiar with will make you a better programmer.

~~~
GFK_of_xmaspast
I don't really have any desire to try lisp, and every time I see that kind of
lisp advocacy I have even less.

~~~
awj
If you do decide to try a lisp, don't start with Emacs Lisp. It's a mess. Go
with Clojure, out of all lisps it's one of the least self-congratulatory about
how awesome they all are for using lisp.

~~~
thejdude
Well, Clojure also was a mess when I tried it (2 years ago maybe?). Leiningen
(a/the build system) was pretty slow, and I couldn't find a way to use the
language in a more lisp-like way easily, like editing a few files and
(re)loading them into a running REPL (other than iterating through all buffers
in Emacs and loading/evaluating them manually; there may have been other
problems as well, I don't remember). You know, like you can edit a few Java
files in Eclipse, press shift-ctrl-s, and have the new code hot-deployed into
your debugging session.

Maybe the people who wrote the Clojure tutorials considered that question to
be SO natural they didn't even mention it, but I found it very unintuitive.
And running a very slow tool on every code change and waiting for the build
and then starting the program is very unnatural and un-lisp-like.

Common Lisp is a bit old by now, but it's always been very stable and fast.
Maybe Racket is a more modern+mature Lisp family member that's nice to try.

~~~
agentultra
I also tried getting into Clojure around that time. I was coming from CL where
we have nice things like conditions and restarts, dynamic variables, and CLOS
-- being able to hit an error in the debugger, inspect the slot of the
instance of some object that caused the error and recompile the class
definition to fix the error without restarting the program is really nice (all
of the running instances are updated). I was not used to Clojure's unhelpful
tracebacks.

I don't understand what age has to do with anything... CL is still a good
language.

------
wldcordeiro
Currently I use Sublime Text 3 with the Vintageous plugin, I'm proficient with
Vim but I find myself preferring Sublime Text due to the multitude of packages
available to it as well as the UI being in my opinion better and more
customizable. I'm most interested in moving to Atom once it matures a bit more
and the Vim style plugin also matures. That being said, I've tried using Emacs
tons of times now and it just doesn't click with me. More power to you if it's
your preferred editors but I'll take Vi(m) over Emacs if I have to use a
legacy editor or Sublime Text with Vintageous for everything else. Hopefully
soon Atom can replace Sublime Text for me and I can stay on Open Source
software.

------
john2x
I started with purcell's config as well. I did two separate attempts at
getting started from scratch, and it was just too much. Using purcell's config
made me somewhat productive in a week.

Now I'm starting to do my own changes to his config, but there's still a lot
of stuff I'm afraid to touch. I'm thinking of declaring ".emacs bankruptcy"
soon, or maybe start from something more minimal like the Starter Kit linked
in the article (I wish I knew about it before starting with purcell's)

Biggest thing I miss when I moved from Vim was tmux. Window management in
Emacs is a nightmare, and the shells suck as well.

~~~
jordigh
I started with nothing. I believe that just like every Jedi must build their
own light sabre, every Emacs user should build their own dot-emacs.
Conversely, thus spake the great French philosopher: "hell is other people's
.emacs"

Emacs is a stern taskmaster, but she repays the investment in multitudes.

Glory be to the thermonuclear text editor.

[https://duckduckgo.com/?q=thermonuclear%20text%20editor](https://duckduckgo.com/?q=thermonuclear%20text%20editor)

------
mentos
Can anyone share what they feel are their top 3 greatest workflow improvements
in productivity going from a point and click IDE to a shortcut based IDE like
emacs?

~~~
kansface
Emacs is not an IDE- its a text editor. It would be nuts to use Emacs to edit
Java compared to Intellij or even Eclipse. Having said that, it is no more
productive than any other text editor at editing text (as compared to Vim or
Sublime Text 3). Even if that weren't true, would you really invest years into
learning a new editor to make editing text a few percent faster? Programming
is limited by thought, not typing (common pain here is solved by plugins
anyway). The benefits of using emacs are as follows:

1\. terminal based 2\. key chords 3\. (e)lisp 4\. open source 5\. stable 6\.
extensible

~~~
lispm
Last I looked Emacs comes with a million lines of Lisp code extending Emacs
way beyond normal editing.

Emacs easily is a text-based IDE. I for example use the SLIME extension with
GNU Emacs to make it into a Common Lisp IDE.

Now we can ask if the depth of GNU Emacs makes sense and if the UI usable. But
there is little doubt that Emacs is WAY beyond being a simple text editor. See
ORG mode, GNUS, ...

------
joeclark77
Perhaps a naive question here, but I'm interested in emacs now, and I need to
ask: does your left pinky finger get used to all the CTRL and ALT key combos,
or do you change the key bindings, or are there special keyboards meant for
emacs use, or what? Two minutes into the tutorial I was already thinking about
whether there should be some sort of hack to use CAPSLOCK instead of CTRL...

~~~
mechanical_fish
You should absolutely rebind Caps Lock to Ctrl.

I guess it's time once again to mention the Kinesis Advantage keyboard on HN.
You can rebind every key. You can rebind control and meta to keys that are
under your thumbs, and put one copy under each thumb so you don't have to use
the same thumb all the time. And everyone who walks by your desk will have an
excuse to start a conversation about your incredibly strange keyboard.

~~~
joeclark77
Looks interesting, but at $269 I don't think I'll be able to try one out.
Maybe after I make that first million. Glad to hear my instinct about capslock
isn't crazy.

~~~
mechanical_fish
If you think that's bad, don't get me started on chairs and desks:

[https://news.ycombinator.com/item?id=105026](https://news.ycombinator.com/item?id=105026)

(Incidentally, since writing that _N_ years ago a physical therapist talked me
out of the Aeron, which has poor upper back support. I've got a Steelcase Leap
now.)

If you ever find yourself getting a job as a programmer, convince them to buy
you a fancy keyboard _and_ a proper chair _and_ some Ergotron products. These
things all last at least half a decade, so it's not as if you're spending that
money every month.

Or buy them yourself... But if your company can't be convinced to budget $750
per year to keep you healthy and happy as you sit at your desk all day
pounding out code for them at ludicrous speed, I've got bad news about your
company.

------
kazinator
I'm a competent Lisp developer (and fanatic), yet I use Vim. I've also met
Vim-bashing Emacs fanatics who didn't know the second thing about Lisp (the
first thing, of course, being all those parentheses).

------
thatben
A great reference with some pragmatic advice.

I've heard that one of the main benefits to emacs is that it can be used to
tool itself to one's needs; curious to know if that's what others have found?

~~~
camperman
Yes, emacs is wonderfully customizable, but there's a deeper idea underneath.
By investing time and effort into learning it and buying into its conceptual
view of the world as text buffers that can be manipulated, you gain a level of
mastery over your environment that's simply not possible with an IDE or
specialist tool. And we are all deeply motivated by mastery. Some authors like
Dan Pink say that mastering something is the biggest motivation of all, even
above recognition and money.

Many IDEs are pretty veneers on sequences of complex commands that must be
learned by rote. Emacs gives you text buffer interfaces to whatever you want
to do, a mostly consistent model for dealing with them and the programmability
to change whatever you like.

------
scottlocklin
A friend of mine asked me this recently: are there many young programmers
investing in emacs? I only know a few... it's kind of depressing.

~~~
MarcScott
I'll be using emacs as the sole text editor with my students in September, so
there'll be a few more young programmers learning how to use it.

~~~
parfe
I hope you will be teaching Intro to Emacs. Why else would you impose a text
editor on students?

~~~
MarcScott
I'm confused as to why I wouldn't teach students how to use a text editor.
What else would you suggest they write their code using?

~~~
parfe
You aren't teaching them to use a text editor. You are teaching them to use
emacs. A choice based on your personal preference that wastes lots of their
time learning what is a very complicated environment. You need to write lisp
just to make emacs auto indent on return.

Nano or gedit in comparison would be sensible choices if you were interested
in teaching students about the language rather than indoctrination in the
editor wars.

Unless of course it's a lisp class in which case Emacs is a sensible choice,
but i think you would have mentioned that if it were the case.

~~~
klibertp
> You need to write lisp just to make emacs auto indent on return.

I wanted to say that it's not true, but fortunately I went and checked and
found this (in my programming-mode hook):

    
    
        (local-set-key (kbd "<return>") 'newline-and-indent)
    

in my Emacs config. I thought that it's configurable via `customize-*`
interface, which is as nice as any other editor "settings" dialog, but
apparently it's not...

OTOH I'd rather write Lisp than JSON or Python for editor configuration, but
you're right in that it's personal preference.

Anyway, I wouldn't recommend making Emacs the required editor for any
programming course (if not using Lisp). Just disallow using IDEs and let the
students choose their editors. Make a list of mandatory features, like syntax
highlighting, and let them use whatever they feel comfortable with. That way
you can focus on teaching programming instead of teaching how to use an
editor.

------
nmac
-> "I believed Microsoft Windows was only platform worth to develop software."

This sounds like the first line of a Kafka-esque horror story.

------
alex_duf
Out of curiosity, and this is a real question not a troll :

What can emacs and vi do that a regular IDE can't ?

~~~
kansface
Emacs and Vi are not IDEs. They operate on strings, not ASTs. Intellij Idea is
an IDE for Java- it allows you to eg change the name of a method and have all
call sites be updated. A text editor forces you to do this yourself with a
string based find/replace. Having said that, text editors are easier to
extend.

~~~
tokenrove
Sounds like you haven't used emacs in a few years (or longer). There are tools
like CEDET that allow building language modes with AST-level understanding of
the source code. I don't know about the vim world in general, but I use
omnisharp in emacs to provide C# refactoring tools like you describe, and that
was originally built for vim.

------
avalonalex
Any one know how Sublime Text's Command Palette alternative in emacs?

~~~
binarysoul
maybe smex?
[http://www.emacswiki.org/emacs/Smex](http://www.emacswiki.org/emacs/Smex)

~~~
klibertp
I use Smex + ido-vertical-mode which looks like this: [http://klibert.pl/ido-
vertical.png](http://klibert.pl/ido-vertical.png). It's closer to how the
"command palette" looks like than the normal ido. It doesn't display
keybindings next to commands like Sublime does, but if you have `suggest-key-
bindings` set, Emacs will show you command binding when you execute it:
[http://klibert.pl/suggest-key-binding.png](http://klibert.pl/suggest-key-
binding.png)

Helm ([https://github.com/emacs-helm/helm](https://github.com/emacs-
helm/helm)) is another way of doing this, although I don't use it (yet - I'm
going to check it out sooner or later).

The "command palette" (M-x or <esc>: in Emacs/Vim respectively) is a very
useful tool for both exploring and working with the editor. It's kind of sad
that people forgot about it for a few decades and only rediscovered it
recently thanks to Sublime and similar.

------
joeclark77
Are there any decent books out there on emacs?

~~~
ssprang
The official GNU Emacs Manual is good. I've slowly been working my way through
it. It's a free download:

[http://shop.fsf.org/product/Emacs_Manual_24/](http://shop.fsf.org/product/Emacs_Manual_24/)

------
dimillian
I may be raging, but if you need one year to master an IDE/Text editor there
is something wrong.

~~~
Monkeyget
It takes a year because you learn it over time. Learning a tool progressively
is the best way to go.

There is a wonderful presentation called '7 Habits For Effective Text Editing
2.0' [1] explaining this philosophy. The idea is to get the basics down
upfront and then get more proficient gradually over time. When you use the
tool you stay aware of what you are doing. When you find an inefficiency in
the way you use the tool, find a quicker way and make it an habit. This is the
most efficient.

If you only care about the code you have to type right now and never read the
editor's documentation nor learn new commands you'll keep using only basics
commands and never will gain proficiency. Not efficient.

If on the other hand you try to learn every feature immediately you'll waste
time learning things you won't use and forget most of them anyway. Not
efficient.

[1]
[https://www.youtube.com/watch?v=p6K4iIMlouI#t=2085](https://www.youtube.com/watch?v=p6K4iIMlouI#t=2085)

------
t4s0thcmdr
FTFY Get Emacs pinky in one year

~~~
redguardtoo
I did mention evil-mode.

Whatever problem you got, Emacs has a soluton.

