Merge branch 'master' of github.com:alanpearce/dotfiles
Alan Pearce alan@alanpearce.co.uk
Sun, 14 Jun 2015 13:08:13 +0200
4 files changed, 66 insertions(+), 29 deletions(-)
M tag-emacs/emacs.d/Cask → tag-emacs/emacs.d/Cask
@@ -4,13 +4,14 @@ (source melpa) (source melpa-stable) (source org) +(depends-on "ace-jump-buffer") (depends-on "ace-window") -(depends-on "avy") (depends-on "ag") (depends-on "async") (depends-on "auto-compile") (depends-on "auto-indent-mode") (depends-on "autopair") +(depends-on "avy") (depends-on "bind-key") (depends-on "cask") (depends-on "cider") @@ -67,6 +68,7 @@ (depends-on "ido-vertical-mode") (depends-on "jinja2-mode") (depends-on "jquery-doc") (depends-on "js2-mode") +(depends-on "json-mode") (depends-on "ledger-mode") (depends-on "let-alist") (depends-on "litable") @@ -105,7 +107,9 @@ (depends-on "quickrun") (depends-on "rainbow-mode") (depends-on "redshank") (depends-on "req-package") +(depends-on "restclient") (depends-on "s") +(depends-on "sass-mode") (depends-on "scss-mode") (depends-on "shut-up") (depends-on "simple-httpd")
M tag-emacs/emacs.d/init.el → tag-emacs/emacs.d/init.el
@@ -351,6 +351,7 @@ (ap/create-helm-dash-hook nginx ("Nginx")) (ap/create-helm-dash-hook ansible ("Ansible")) (ap/create-helm-dash-hook php ("PHP" "Symfony")) (ap/create-helm-dash-hook twig ("Twig")) + (ap/create-helm-dash-hook js2 ("JavaScript" "NodeJS" "jQuery" "Express")) (ap/create-helm-dash-hook markdown ("Markdown")) (ap/create-helm-dash-hook saltstack ("SaltStack")) (ap/create-helm-dash-hook clojure ("Clojure")) @@ -417,12 +418,14 @@ (defun kill-or-delete-this-buffer-dwim (&optional arg) "Kills current buffer. With prefix arg, delete it." (interactive "P") - (message "%s" arg) (if (equal arg '(4)) (delete-current-buffer-file) (if server-buffer-clients (server-edit) - (kill-this-buffer)))) + (let ((buf (buffer-name))) + (when (equalp buf "*HTTP Response*") + (other-window 1)) + (kill-buffer buf))))) (req-package ws-butler :if window-system @@ -586,7 +589,7 @@ (setq helm-idle-delay .1 helm-input-idle-delay 0 ido-use-virtual-buffers t) (when (fboundp #'helm-adaptive-mode) - (helm-adaptive-mode 1)))) + (helm-adaptive-mode 1)))) (req-package helm-files :defer t @@ -788,6 +791,8 @@ (add-to-list 'auto-mode-alist '("xmonad.hs\\'" . xmonad-mode)) (req-package nginx-mode :defer t + :mode (("/nginx/servers/" . nginx-mode) + ("/nginx/.*\\.d/" . nginx-mode)) :config (progn (setq nginx-indent-tabs-mode t))) @@ -1018,6 +1023,10 @@ :ensure projectile :require projectile :defer t) +(req-package projector + :require projectile + :bind (("s-z" . projector-open-project-shell))) + (req-package editorconfig) (req-package perspective @@ -1171,13 +1180,16 @@ :config (progn (add-hook 'markdown-mode-hook #'turn-on-auto-fill))) (req-package avy - :bind (("M-g g" . avy-goto-line) - ("M-g M-g" . avy-goto-line) - ("C-|" . avy-goto-line) - ("C-c SPC" . avy-goto-char)) + :bind* (("M-g g" . avy-goto-line) + ("M-g M-g" . avy-goto-line) + ("C-|" . avy-goto-line) + ("C-c SPC" . avy-goto-char)) :config (progn - (avy-setup-default) - (setq avy-all-windows nil))) + (avy-setup-default) + (setq avy-all-windows nil))) + +(use-package ace-jump-buffer + :bind ("s-b" . ace-jump-buffer)) (req-package ace-window :bind (("s-s" . ace-window)) @@ -1190,7 +1202,9 @@ (?f aw-flip-window) (?v aw-split-window-vert " Ace - Split Vert Window") (?b aw-split-window-horz " Ace - Split Horz Window") (?m delete-other-windows " Ace - Maximize Window") - (?l delete-other-windows)) + (?l delete-other-windows) + (?, winner-undo) + (?. winner-redo)) aw-keys '(?a ?r ?s ?t ?n ?e ?i ?o)))) (req-package expand-region @@ -1247,7 +1261,7 @@ (bind-key "C-(" #'wrap-with-paren sp-keymap) (bind-key "C-)" #'sp-forward-slurp-sexp sp-keymap) (bind-key "M-<backspace>" #'backward-kill-word sp-keymap) (bind-key "M-?" #'sp-convolute-sexp sp-keymap) - (bind-key "M-t" #'sp-transpose-sexp sp-keymap) + (bind-key "C-M-t" #'sp-transpose-sexp sp-keymap) (bind-key "M-r" #'sp-raise-sexp sp-keymap) (bind-key "M-s" #'sp-splice-sexp sp-keymap) (bind-key "M-S" #'sp-split-sexp sp-keymap) @@ -1414,9 +1428,26 @@ :config (progn (defun ap/javascript-setup () (autopair-mode -1) (auto-indent-mode -1)) + (defun ap/js2-prev-error () + (interactive) + (js2-next-error -1)) + (bind-key "M-g M-n" #'js2-next-error js2-mode-map) + (bind-key "M-g M-p" #'ap/js2-prev-error js2-mode-map) (add-hook 'js2-mode-hook #'ap/javascript-setup) (setq js2-basic-offset 4 js2-include-node-externs t))) + +(req-package json-mode + :mode ("\\.json\\'" . json-mode)) + +(req-package restclient + :mode ("\\.api\\'" . restclient-mode) + :config (progn + (defun imenu-restclient-sections () + (setq imenu-prev-index-position-function nil) + (add-to-list 'imenu-generic-expression '("Services" "^## ?\\(.+\\)$" 1) t) + (add-to-list 'imenu-generic-expression '("Calls" "^# ?\\(.+\\)$" 1) t)) + (add-hook restclient-mode-hook #'imenu-restclient-sections))) (req-package tern :config (progn @@ -1510,17 +1541,17 @@ ;;;; Windows & Frames (setq frame-title-format - '((:eval (capitalize invocation-name)) ": " - (:eval (if (and (fboundp #'project-project-p) + '((:eval (if (and (fboundp #'projectile-project-p) (projectile-project-p)) - (projectile-project-name) - (if (buffer-file-name) - (abbreviate-file-name (buffer-file-name)) - "%b"))))) + (projectile-project-name))) + ": " + (:eval (if (buffer-file-name) + (buffer-name) + "%b")))) (setq scroll-conservatively 100 ; Keep the cursor position when scrolling scroll-margin 1 - scroll-preserve-screen-position nil + scroll-preserve-screen-position t mouse-wheel-scroll-amount '(1 ((shift) . 1) ((control))) split-height-threshold 100)
M tag-git/config/git/ignore → tag-git/config/git/ignore
@@ -24,4 +24,6 @@ *_archive GPATH GRTAGS -GTAGS+GTAGS + +.tern-port
M tag-zsh/config/zsh/zshenv → tag-zsh/config/zsh/zshenv
@@ -51,23 +51,23 @@ esac export os -if [[ -s $commands[direnv] ]] +if [[ -f $ZDOTDIR/zshenv.local ]] then - eval "$(direnv hook zsh)" + . $ZDOTDIR/zshenv.local fi -if [[ $os == gnu && ! -S $SSH_AUTH_SOCK && -s $commands[envoy] ]] +if [[ -f $ZDOTDIR/zshenv.private ]] then - envoy -t gpg-agent - eval $(envoy -p) + . $ZDOTDIR/zshenv.private fi -if [[ -f $ZDOTDIR/zshenv.local ]] +if [[ -s $commands[direnv] ]] then - . $ZDOTDIR/zshenv.local + eval "$(direnv hook zsh)" fi -if [[ -f $ZDOTDIR/zshenv.private ]] +if [[ $os == gnu && ! -S $SSH_AUTH_SOCK && -s $commands[envoy] ]] then - . $ZDOTDIR/zshenv.private + envoy -t gpg-agent + eval $(envoy -p) fi