This file contains 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
(add-hook | |
'find-file-hook | |
(lambda () | |
(when (string-match-p "projects/my-project" (buffer-file-name)) | |
(setq js2-additional-externs '("my" "additional" "externs"))))) |
This file contains 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
;; Elisp go-to-definition with M-. and back again with M-, | |
(autoload 'elisp-slime-nav-mode "elisp-slime-nav") | |
(add-hook 'emacs-lisp-mode-hook (lambda () (elisp-slime-nav-mode t))) |
This file contains 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 create-scratch-buffer nil | |
"create a new scratch buffer to work in. (could be *scratch* - *scratchX*)" | |
(interactive) | |
(let ((n 0) | |
bufname) | |
(while (progn | |
(setq bufname (concat "*scratch" | |
(if (= n 0) "" (int-to-string n)) | |
"*")) | |
(setq n (1+ n)) |
This file contains 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
;; Add spaces and proper formatting to linum-mode. It uses more room than | |
;; necessary, but that's not a problem since it's only in use when going to | |
;; lines. | |
(setq linum-format (lambda (line) | |
(propertize | |
(format (concat " %" | |
(number-to-string | |
(length (number-to-string | |
(line-number-at-pos (point-max))))) | |
"d ") |
This file contains 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
;; turn line numbers off by default | |
(global-linum-mode -1) | |
(defun goto-line-with-feedback (&optional line) | |
"Show line numbers temporarily, while prompting for the line number input" | |
(interactive "P") | |
(if line | |
(goto-line line) | |
(unwind-protect | |
(progn |
This file contains 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 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 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 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 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)))) |