This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; full screen magit-status | |
(defadvice magit-status (around magit-fullscreen activate) | |
(window-configuration-to-register :magit-fullscreen) | |
ad-do-it | |
(delete-other-windows)) | |
(defun magit-quit-session () | |
"Restores the previous window configuration and kills the magit buffer" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun insert-self-and-close-completion (N) | |
(interactive "p") | |
(self-insert-command N) | |
(ignore-errors | |
(bury-buffer "*ESS Completions*"))) | |
(define-key ess-mode-map (kbd "SPC") 'insert-self-and-close-completion) | |
(define-key ess-mode-map (kbd "(") 'insert-self-and-close-completion) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5487177 04/30/13 09:37 public | |
5057886 02/28/13 17:15 public | |
4771940 02/12/13 19:12 public | |
4328055 12/18/12 14:42 public | |
+ 4e8ae71... 12/12/12 11:51 public | |
4141489 11/24/12 22:35 public Emacs bot til Kodemakers irc-kanal | |
+ 4116916 11/20/12 10:20 public Project specific settings in Emacs | |
eea74d7... 11/16/12 20:53 public | |
+ a305a6c... 11/15/12 09:28 public introduce-parameter | |
4060654 11/12/12 18:23 public Hippie Expand: use closest matches first |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun kill-region-or-backward-word () | |
(interactive) | |
(if (region-active-p) | |
(kill-region (region-beginning) (region-end)) | |
(backward-kill-word 1))) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(global-set-key (kbd "C-S-k") (lambda () (interactive) | |
(kill-region (save-excursion (beginning-of-line) (point)) | |
(point)))) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun cleanup-buffer-safe () | |
"Perform a bunch of safe operations on the whitespace content of a buffer. | |
Does not indent buffer, because it is used for a before-save-hook, and that | |
might be bad." | |
(interactive) | |
(untabify-buffer) | |
(delete-trailing-whitespace) | |
(set-buffer-file-coding-system 'utf-8)) | |
(defun cleanup-buffer () |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defn accumulate-forces [o os] | |
(assoc o :force | |
(reduce vector/add (map (partial force-between o) | |
(filter #(not (identical? o %)) os))))) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@RequestMapping("/session/keepAlive.json") | |
public void sessionKeepalive(Model json) { | |
json.addAttribute("result", "ok"); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun ido-imenu () | |
"Update the imenu index and then use ido to select a symbol to navigate to. | |
Symbols matching the text at point are put first in the completion list." | |
(interactive) | |
(imenu--make-index-alist) | |
(let ((name-and-pos '()) | |
(symbol-names '())) | |
(flet ((addsymbols (symbol-list) | |
(when (listp symbol-list) | |
(dolist (symbol symbol-list) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; Push mark when using ido-imenu | |
(defvar push-mark-before-goto-char nil) | |
(defadvice goto-char (before push-mark-first activate) | |
(when push-mark-before-goto-char | |
(push-mark))) | |
(defun ido-imenu-push-mark () | |
(interactive) |