Skip to content

Instantly share code, notes, and snippets.

(setq show-paren-style 'expression)
(show-paren-mode 2)
(menu-bar-mode -1)
(tool-bar-mode -1)
(setq make-backup-files nil) ; Don't want any backup files
(setq auto-save-list-file-name nil) ; Don't want any .saves files
(setq auto-save-default nil) ; Don't want any auto saving
// mutable i
//
int i = 0;
while (something() > 0) {
i++;
}
// immutable i
//
(defun reverse-input-method (input-method)
"Build the reverse mapping of single letters from INPUT-METHOD."
(interactive
(list (read-input-method-name "Use input method (default current): ")))
(if (and input-method (symbolp input-method))
(setq input-method (symbol-name input-method)))
(let ((current current-input-method)
(modifiers '(nil (control) (meta) (control meta))))
(when input-method
(activate-input-method input-method))
* Emacs as IDE
** Sr Speedbar
http://www.emacswiki.org/emacs/SrSpeedbar
** Yasnippet
http://www.emacswiki.org/emacs/Yasnippet
** Projectile
https://github.com/bbatsov/projectile

Python programming exampleh

Org-mode formatting utilities

HTML tags

Visibility cycling

Tab – show current

S-tab – show all children

C-u C-u C-u Tab – show all including drawers

Startup options

public Person mainFlow(String arg1, String arg2, int arg3) throws WrongArgs, WrongPerson, WrongResult {
verifyArgs(arg1, arg2, arg3);
Person p = personRepo.readFromDb( arg3 );
verifyPerson(p);
Result result = doSomething(arg1, arg2, p);
checkResult( result );
return p;
(defmacro macro1 (name)
name)
(defmacro macro2 (name)
'(name))
(defmacro macro3 (name)
`(,name))
;; #123456789012345678901234567890123456789012345678901234567890
(global-ede-mode t)
(ede-enable-generic-projects)
(require 'ede/generic)
(defclass ede-haskell-project (ede-generic-project)
((buildfile :initform ".cabal"))
"Haskell project.")
(defmethod initialize-instance ((this ede-haskell-project) &rest fields)
(call-next-method)
let result <- runMaybeT $ do Engine.boost.quick_fetch [Foam Beer_opener Lighter_gun]
send_to Defender.closest.dear
append $ hugs <> kisses
say "Hurrah!"