- The single most useful Emacs feature [stackoverflow]
- Xah's Tutorial
- To check out some day
- MELPA is a growing collection of package.el-compatible Emacs Lisp packages built automatically on our server from the upstream source code using simple recipes.
- Plugins to explore
- grep-find, eshell, run-python and slime
M-p M-c M-t / C-t M-u M-i C-<digit>
- -*- mode: modename; var: value; … -*-
- first step - run the built-in Emacs tutorial -
- second step - watch the excellent screencast Meet Emacs
- third step - visit Mastering Emacs
- EmacsWiki: Mini Map
- Hi-lock lets you specify regexes to highlight anywhere in a file; it's like domain-specific font-lock.
- Magit is a near-complete UI for git
- It's a kind of Quicksilver / Launchy / slickedit / Ubiquity tool inside Emacs.
- Smart Tab
- This runs the shell command and inserts the output at point in my buffer.
- Also works on regions.
- Not all buffers record undo information. _ Buffers whose names start with spaces don't_; these buffers are used internally by Emacs and its extensions to hold text that users don't normally look at or edit.
- Artist mode.
- "M-x artist-mode" to turn artist-mode on.
- Draw with the mouse. The middle-mouse button gives a context menu, to select the drawing tool (line, elipse, box, erase, etc).
- "M-x artist-mode-off" to get back to regular editing.
- Untabify your diagram by selecting the diagram and performing "M-x untabify".
(defalias 'qrr 'query-replace-regexp)
- Now you can type
M-x qrrto invoke the function.
- Now you can type
nxml-mode: the ONLY way to fly when you're editing XML.
- Authored by XML guru James Clark; it knocks the socks off any IDE-based XML editor out there today.
picture-mode: the best way to draw ascii art, and useful in a surprising number of situations.
align-regexp: my new favorite command. just learned it recently, and I use it almost every day.
chop.elfor navigating your cursor via fast binary search
graphviz-dot-mode.elfor editing Graphviz Dot-language source files
htmlize.el, a utility that turns an Emacs buffer into * colorized HTML.
select-kill-ring-mode.elfor displaying and navigating the current contents of the Emacs kill-ring (the list of the last 50 or so selections you've cut)
rpm-mode.elfor browsing and editing RPM files directly in archive-mode
Are we in a terminal or a GUI? (in a multiTTY environment)
What we really want is code that executes for each new frame, checks whether the frame is windowed or terminal'd, then sets the colors. Naturally, there's a hook for that: 'after-make-frame-functions The following code defines a function that sets colors for a frame depending on whether or not the frame is windowed, then adds that function to this hook:
(defun my-set-display-for-windowed-frames (frame) "Set display parameters for the current frame the way I like them." (select-frame frame) (if (window-system frame) (progn (set-background-color "#003344") (set-foreground-color "white") (set-cursor-color "red")))) (add-hook 'after-make-frame-functions 'my-set-display-for-windowed-frames)
We need to do one more thing to complete the picture: This code is sufficient to get all frames created after the add-hook to get configured by the function. However, the first frame Emacs opens when it first starts up is opened before .emacs is evaluated, so it doesn't get the colors. Thankfully, the frame settings are wrapped in a function, so we merely need to call it on the already-opened frame: