Video 1 - Setting up the package manager
Video 2 - Intro to Org Mode
...
and thought "Why there are two things" and then came back to the comments and this thread was at the top and it sort of put the decision by the videos' authors in perspective.At it's heart, Emacs is "The Extensible, Customizable, Self-Documenting, Display Editor." [1] I'd be much more comfortable saying Notepad is a simple, modeless editor. For a contemporary developer, package management is a reasonable reference point (even JavaScript has package management). And to me, org-mode is the killer app...Oh Babel. There is nothing else quite like You.
[1]: http://worrydream.com/refs/Stallman%20-%20EMACS,%20The%20Ext...
Spacemacs is different, but for a new emacs user it's hard to argue with such a batteries-included approach.
For me, using Spacemacs would be limiting because not every mode has bindings and none of the official Emacs documents and most of the unofficial blogs and SO questions etc. don't describe keystrokes in terms of Spacemacs. In the end, using Spacemacs is using Emacs and will sooner or later require I know Emacs. Other people may have a different experience. Personally, I don't want to spend time cross-referencing the official documentation with this: https://github.com/Somelauw/evil-org-mode/blob/master/doc/ke... in the middle of trying to understand an org-mode feature.
I apologize for misinterpreting your comment, though.
As for notepad, I will give up org mode when you pry it from my cold dead hands. Can't imagine not using structured text and navigation for notes, outlines and task management.
At least that was my experience... twice..
The only way to stick with emacs is to see how extensible and useful it is - which is really all about learning org and how to add packages.
Org is really the gateway drug b/c of how useful it is for everyone - even non developers. For developers the other "killer-app" is magit. For a long time I used emacs just for magit. Only a couple of windows git GUI editors come close in usefulness
Currently I only use it to edit org files, but it feels like there is a whole ecosystem waiting to be explored.
There are some fundamentals that make it relatively easy to pick up anything:
* Help system (nearly everything is self-documenting)
* Customization
* ELisp basics (write some helper functions in your .emacs)
* Debugging (Edebug, just do C-u C-M-x to instrument a fn and step through it next time it's called)
I've been a long-time Emacs user, and the "aha" moment happened when I realized that Emacs really boils down to three things: 1) a text editor 2) mechanisms to interact with your system (e.g. subprocesses) and 3) interactive and dynamically programmable runtime. Once you learn the fundamentals of those three things, the sky's the limit...If you get used to smacking tab a zillion times while opening files to autocomplete, upgrading to helm find files after the tab habit is deeply ingrained will be painful (tab in helm find files is the help key, not the autocomplete key, helm is conceptually like "always on autocomplete" times a million sorta)
Also with the ecosystem of modes, meta-e usually does the right thing in all the modes unless you're editing something that doesn't have the right mode installed by default, then you get used to not using the keystroke M-e, possibly all the time in all files, which is really bad because M-e will work if you simply install that file's mode package. Obviously this extends way beyond one keystroke which multiplies the impact.
Its possible to use emacs at least two levels. Theres low level where the editor helps you navigate and format, if you permit it by adding file type packages. Then there's the high level where magit or org mode are nice CLI applications almost stand alone. So if you start out at a high level emacs with "my vim-alike can also run magit, so to me emacs is just a vi that can run magit" you're going to miss out on the substantial performance gains of low level emacs like navigation keystrokes.
Maybe a good programming analogy is its much simpler to start noob programming students on msbasic.exe, but everyone seems to think almost anything else as a first language is better in the long run, even if almost everything else is harder to use for the first fifteen minutes.
That's an exaggeration, it's definitely a lot less than twice the work. I'd say 1.2 times at most.
I use it, though I'm not a heavy emacs user.
(setq ido-enable-flex-matching t) (setq ido-everywhere t) (setq ido-create-new-buffer 'always) (ido-mode 1)
(projectile-global-mode)
Maybe enable flycheck globally if you're used to syntax checking.
(global-flycheck-mode)
Also worth learning TRAMP if you're used to sshing into boxes and running vim. M-x info, C-s tramp.
Get rid of the waste of space toolbar:
(tool-bar-mode -1)
And install a nice theme, whatever floats your boat, I use a solarized theme [1]. The default theme is gross. (setq custom-theme-directory "~/.emacs.d/theme")
(setq custom-safe-themes t)
(when (display-graphic-p)
(load-theme 'my-solarized))
I use eshell, I think the plan9 smart shell features are nice: (require 'em-smart)
Basically includes additional editing features in eshell. It creates keybindings to edit previous commands and page through the output of commands.Make CTRL L clear eshell
(defun eshell/clear ()
"Clear the eshell buffer"
(interactive)
(let ((inhibit-read-only t))
(erase-buffer)
(eshell-send-input)))
(defun my-eshell-mode-hook ()
(local-set-key (kbd "C-c e") 'end-of-buffer)
(local-set-key (kbd "C-l") 'eshell/clear)
(eshell-smart-initialize))
(add-hook 'eshell-mode-hook 'my-eshell-mode-hook)
Line numbers, but only when you're editing code (GUI and text): (when (not (display-graphic-p))
(setq linum-format "%4d | "))
(defcustom linum-disabled-modes-list '(eshell-mode wl-summary-mode compilation-mode org-mode text-mode dired-mode doc-view-mode image-mode rcirc-mode)
"* List of modes disabled when global linum mode is on"
:type '(repeat (sexp :tag "Major mode"))
:tag " Major modes where linum is disabled: "
:group 'linum)
;; override linum-on because there is no good way to disable global-linum-mode
;; on a per-mode basis
(defun linum-on ()
(unless (or (minibufferp)
(member major-mode linum-disabled-modes-list)
(string-match "*" (buffer-name))
(> (buffer-size) 3000000))
(linum-mode 1)))
"Smooth scrolling"https://www.emacswiki.org/emacs/SmoothScrolling
[1] https://raw.githubusercontent.com/wcummings/dotemacs/master/...
- if you're on a mac set the command modifier to meta
- ido mode
- transform yes or no into y or n
- Disable the bell and the visual bell
- cua mode (this begins to be personal so I'll stop there)
Personally I find that a better starting point.
I agree. There is a lot of "magic" going on, and it doesn't help that Spacemacs is a lot slower and less stable than my less-intensive personal customization.
Of course, that's the problem with any significant starter kit. As a new user, now you don't just have to learn emacs, you have to learn emacs + whatever heavy modifications they've done to emacs.
In principle, I liked Spacemacs, but stability is a big problem. Often certain org functionality stops working, etc. I now have a reasonably stable snapshot and I just don't update ELPA/MELPA packages anymore, because the risk is simply too big that things break (yes, I know that you can rollback).
Another problem that I have been running into is that Mitsuharu Yamamoto's emacs-mac, which is IMO by far the nicest Mac version regularly seems to trigger a bug where WindowServer starts using 100% CPU. I haven't really nailed it down (I only notice it later when the fans start getting loud), except that it only occurs sometimes when I run emacs-mac.
I originally wasn't sure if I was going to do the mini org-mode stuff early on but thought that it would be better for organizational reasons rather than pedagogical.
That kind of introduction is already in the Emacs tutorial.
And it's the type that drives newcomers away.
I first used Emacs in the late 90's. Even then, the regular cursor keys worked. Now I do understand that some prefer the original keybindings, but the tutorial is likely not targeting that minority.
You mean c-x c-[fs], right? I'm by no mean an emacs expert although I've been using it for 6 years now, and when I read your comment I thought "Wow, c-x c-a is a functionality? How comes I have never used that?", so I tried that in emacs but it's not mapped to anything.
Apart from that, I fully agree with your comment.
(defun align-all-matches (start end regexp)
"Align all matches of the given regular expression."
(interactive "r\nsAlign regexp: ")
(align-regexp start end (concat "\\(\\s-*\\)" regexp) 1 1 t))
It inserts space in each line of the region so that all matches a given regexp are vertically aligned. I find this to be my most common use for the powerful but complicated align-regexp.(If you call align-regexp interactively without a prefix argument it does something much like this function but only aligning the first ocurrence on each line, and if you call it with the prefix argument it prompts for all parameters of align-regexp.)
Like forgetting the original keybindings and switching to evil.
What Emacs calls "modes" have indeed been around for a long time; I started using Emacs in 1978 as it happens and did use it to read my mail. However ITS didn't have the concept of "shell" (the command entry system was also the debugger!) nor of "inferior" processes so you would exit EMACS to compile or run other programs.
And sorry for getting the history wrong. I think I mixed the ITS and Multics versions up. Maybe the email reader was only in the ITS version and the Multics version had the ability to call the PL/I or Fortran compiler within Emacs and get a buffer with an error list. Does that sound right? And I'm not sure about command shells, that's probably just wrong and they came later.