From 7be9eeb3b614256a2c7492d0a8dd9cf5db784083 Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Mon, 25 May 2015 09:25:10 +0200 Subject: Emacs: Add winner shortcuts to ace-window --- tag-emacs/emacs.d/init.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'tag-emacs/emacs.d/init.el') diff --git a/tag-emacs/emacs.d/init.el b/tag-emacs/emacs.d/init.el index 694e984..a548f78 100644 --- a/tag-emacs/emacs.d/init.el +++ b/tag-emacs/emacs.d/init.el @@ -1190,7 +1190,9 @@ symbol, not word, as I need this for programming the most." (?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 -- cgit 1.4.1 From b912fe69c30626d2297f72f9bd3a2f1c407992bc Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Mon, 25 May 2015 16:44:21 +0200 Subject: Whitespace cleanup --- tag-emacs/emacs.d/init.el | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'tag-emacs/emacs.d/init.el') diff --git a/tag-emacs/emacs.d/init.el b/tag-emacs/emacs.d/init.el index a548f78..38493be 100644 --- a/tag-emacs/emacs.d/init.el +++ b/tag-emacs/emacs.d/init.el @@ -586,7 +586,7 @@ 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 @@ -1174,10 +1174,10 @@ symbol, not word, as I need this for programming the most." :bind (("M-g g" . avy-goto-line) ("M-g M-g" . avy-goto-line) ("C-|" . avy-goto-line) - ("C-c SPC" . avy-goto-char)) + ("C-c SPC" . avy-goto-char)) :config (progn - (avy-setup-default) - (setq avy-all-windows nil))) + (avy-setup-default) + (setq avy-all-windows nil))) (req-package ace-window :bind (("s-s" . ace-window)) -- cgit 1.4.1 From 058aa1d204595ba75b8d12e97b64fbcb273addfb Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Mon, 25 May 2015 16:44:37 +0200 Subject: Emacs: Create helm-dash hook for js2-mode --- tag-emacs/emacs.d/init.el | 1 + 1 file changed, 1 insertion(+) (limited to 'tag-emacs/emacs.d/init.el') diff --git a/tag-emacs/emacs.d/init.el b/tag-emacs/emacs.d/init.el index 38493be..2d7569a 100644 --- a/tag-emacs/emacs.d/init.el +++ b/tag-emacs/emacs.d/init.el @@ -351,6 +351,7 @@ (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")) -- cgit 1.4.1 From cbe7177bed489fed71de7a97332bfae9c10663ed Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Mon, 25 May 2015 16:58:44 +0200 Subject: Emacs: Make C-v/M-v scrolling reversible --- tag-emacs/emacs.d/init.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tag-emacs/emacs.d/init.el') diff --git a/tag-emacs/emacs.d/init.el b/tag-emacs/emacs.d/init.el index 2d7569a..811a112 100644 --- a/tag-emacs/emacs.d/init.el +++ b/tag-emacs/emacs.d/init.el @@ -1523,7 +1523,7 @@ symbol, not word, as I need this for programming the most." (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) -- cgit 1.4.1 From 1e8ce4132e6f4b7dd1e3cc9363f675af1ce65d5c Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Wed, 3 Jun 2015 10:10:13 +0200 Subject: Emacs: Ensure avy keybinds are respected --- tag-emacs/emacs.d/init.el | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'tag-emacs/emacs.d/init.el') diff --git a/tag-emacs/emacs.d/init.el b/tag-emacs/emacs.d/init.el index 811a112..8e3cb32 100644 --- a/tag-emacs/emacs.d/init.el +++ b/tag-emacs/emacs.d/init.el @@ -1172,10 +1172,10 @@ symbol, not word, as I need this for programming the most." (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))) -- cgit 1.4.1 From 7412c7db219c2c85091afb04452dd223c03a223b Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Wed, 3 Jun 2015 12:33:33 +0200 Subject: Emacs: Install json-mode --- tag-emacs/emacs.d/Cask | 1 + tag-emacs/emacs.d/init.el | 3 +++ 2 files changed, 4 insertions(+) (limited to 'tag-emacs/emacs.d/init.el') diff --git a/tag-emacs/emacs.d/Cask b/tag-emacs/emacs.d/Cask index 9f03ef1..4a1c18b 100644 --- a/tag-emacs/emacs.d/Cask +++ b/tag-emacs/emacs.d/Cask @@ -67,6 +67,7 @@ (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") diff --git a/tag-emacs/emacs.d/init.el b/tag-emacs/emacs.d/init.el index 8e3cb32..51a9d1f 100644 --- a/tag-emacs/emacs.d/init.el +++ b/tag-emacs/emacs.d/init.el @@ -1421,6 +1421,9 @@ symbol, not word, as I need this for programming the most." (setq js2-basic-offset 4 js2-include-node-externs t))) +(req-package json-mode + :mode ("\\.json\\'" . json-mode)) + (req-package tern :config (progn (setq tern-command (list (executable-find "tern"))) -- cgit 1.4.1 From 260c8db3b89626b0afa24ad1d206e1c0541010e9 Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Wed, 3 Jun 2015 12:54:03 +0200 Subject: Emacs: Install restclient-mode --- tag-emacs/emacs.d/Cask | 1 + tag-emacs/emacs.d/init.el | 2 ++ 2 files changed, 3 insertions(+) (limited to 'tag-emacs/emacs.d/init.el') diff --git a/tag-emacs/emacs.d/Cask b/tag-emacs/emacs.d/Cask index 4a1c18b..65438a8 100644 --- a/tag-emacs/emacs.d/Cask +++ b/tag-emacs/emacs.d/Cask @@ -106,6 +106,7 @@ (depends-on "rainbow-mode") (depends-on "redshank") (depends-on "req-package") +(depends-on "restclient") (depends-on "s") (depends-on "scss-mode") (depends-on "shut-up") diff --git a/tag-emacs/emacs.d/init.el b/tag-emacs/emacs.d/init.el index 51a9d1f..a3f57b9 100644 --- a/tag-emacs/emacs.d/init.el +++ b/tag-emacs/emacs.d/init.el @@ -1424,6 +1424,8 @@ symbol, not word, as I need this for programming the most." (req-package json-mode :mode ("\\.json\\'" . json-mode)) +(req-package restclient) + (req-package tern :config (progn (setq tern-command (list (executable-find "tern"))) -- cgit 1.4.1 From 662c91f506ad3afb199eaadd213fe5eb27567c38 Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Wed, 3 Jun 2015 14:40:07 +0200 Subject: Emacs: Remove debug message call --- tag-emacs/emacs.d/init.el | 1 - 1 file changed, 1 deletion(-) (limited to 'tag-emacs/emacs.d/init.el') diff --git a/tag-emacs/emacs.d/init.el b/tag-emacs/emacs.d/init.el index a3f57b9..6a6b156 100644 --- a/tag-emacs/emacs.d/init.el +++ b/tag-emacs/emacs.d/init.el @@ -418,7 +418,6 @@ (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 -- cgit 1.4.1 From e010d8654a3efc800cf8e8061778149ddbe9fcfa Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Wed, 3 Jun 2015 14:44:56 +0200 Subject: Emacs: Switch window when killing REST buffer --- tag-emacs/emacs.d/init.el | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'tag-emacs/emacs.d/init.el') diff --git a/tag-emacs/emacs.d/init.el b/tag-emacs/emacs.d/init.el index 6a6b156..36c0850 100644 --- a/tag-emacs/emacs.d/init.el +++ b/tag-emacs/emacs.d/init.el @@ -422,7 +422,10 @@ (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 -- cgit 1.4.1 From 0676e96d53ae296c4215f3f064d467aff6953d8d Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Mon, 8 Jun 2015 09:20:28 +0200 Subject: Emacs: Configure restclient-mode --- tag-emacs/emacs.d/init.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'tag-emacs/emacs.d/init.el') diff --git a/tag-emacs/emacs.d/init.el b/tag-emacs/emacs.d/init.el index 36c0850..5b16f4b 100644 --- a/tag-emacs/emacs.d/init.el +++ b/tag-emacs/emacs.d/init.el @@ -1426,7 +1426,8 @@ symbol, not word, as I need this for programming the most." (req-package json-mode :mode ("\\.json\\'" . json-mode)) -(req-package restclient) +(req-package restclient + :mode ("\\.api\\'" . restclient-mode)) (req-package tern :config (progn -- cgit 1.4.1 From 4347a8f3168dbb4a99475126f0fec97f1c22cfcd Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Mon, 8 Jun 2015 09:40:30 +0200 Subject: Emacs: Install projector-mode --- tag-emacs/emacs.d/init.el | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'tag-emacs/emacs.d/init.el') diff --git a/tag-emacs/emacs.d/init.el b/tag-emacs/emacs.d/init.el index 5b16f4b..59fff87 100644 --- a/tag-emacs/emacs.d/init.el +++ b/tag-emacs/emacs.d/init.el @@ -1021,6 +1021,10 @@ mouse-1: Display Line and Column Mode Menu")))))) :require projectile :defer t) +(req-package projector + :require projectile + :bind (("s-z" . projector-open-project-shell))) + (req-package editorconfig) (req-package perspective -- cgit 1.4.1 From 4afb07470aa58c32b1bed0f44c0fd3fc4caa70b1 Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Mon, 8 Jun 2015 09:46:58 +0200 Subject: Emacs: Install and configure ace-jump-buffer --- tag-emacs/emacs.d/Cask | 1 + tag-emacs/emacs.d/init.el | 3 +++ 2 files changed, 4 insertions(+) (limited to 'tag-emacs/emacs.d/init.el') diff --git a/tag-emacs/emacs.d/Cask b/tag-emacs/emacs.d/Cask index 4a242fa..83315c0 100644 --- a/tag-emacs/emacs.d/Cask +++ b/tag-emacs/emacs.d/Cask @@ -5,6 +5,7 @@ (source org) (depends-on "ace-window") +(depends-on "ace-jump-buffer") (depends-on "ag") (depends-on "async") (depends-on "auto-compile") diff --git a/tag-emacs/emacs.d/init.el b/tag-emacs/emacs.d/init.el index 59fff87..dfb9d5a 100644 --- a/tag-emacs/emacs.d/init.el +++ b/tag-emacs/emacs.d/init.el @@ -1186,6 +1186,9 @@ symbol, not word, as I need this for programming the most." (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)) :config (progn -- cgit 1.4.1 From d2b814b8465d9801ad3beac76abe377ae92ee205 Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Mon, 8 Jun 2015 10:07:36 +0200 Subject: Emacs: Open nginx included files in nginx-mode --- tag-emacs/emacs.d/init.el | 2 ++ 1 file changed, 2 insertions(+) (limited to 'tag-emacs/emacs.d/init.el') diff --git a/tag-emacs/emacs.d/init.el b/tag-emacs/emacs.d/init.el index dfb9d5a..933ac21 100644 --- a/tag-emacs/emacs.d/init.el +++ b/tag-emacs/emacs.d/init.el @@ -791,6 +791,8 @@ mouse-1: Display Line and Column Mode Menu")))))) (req-package nginx-mode :defer t + :mode (("/nginx/servers/" . nginx-mode) + ("/nginx/.*\\.d/" . nginx-mode)) :config (progn (setq nginx-indent-tabs-mode t))) -- cgit 1.4.1 From 5db8dd53007f8d008c6ad1884c5349b3ad69f898 Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Thu, 11 Jun 2015 15:38:41 +0200 Subject: Emacs: Use js2 error movement in js2-mode --- tag-emacs/emacs.d/init.el | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'tag-emacs/emacs.d/init.el') diff --git a/tag-emacs/emacs.d/init.el b/tag-emacs/emacs.d/init.el index 933ac21..3c2cb60 100644 --- a/tag-emacs/emacs.d/init.el +++ b/tag-emacs/emacs.d/init.el @@ -1428,6 +1428,11 @@ symbol, not word, as I need this for programming the most." (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))) -- cgit 1.4.1 From 13290f1c8f69cf45f6c0b621f4bec96df8fd7301 Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Thu, 11 Jun 2015 15:38:59 +0200 Subject: Emacs: Add imenu navigation for restclient files --- tag-emacs/emacs.d/init.el | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'tag-emacs/emacs.d/init.el') diff --git a/tag-emacs/emacs.d/init.el b/tag-emacs/emacs.d/init.el index 3c2cb60..49b0f07 100644 --- a/tag-emacs/emacs.d/init.el +++ b/tag-emacs/emacs.d/init.el @@ -1441,7 +1441,13 @@ symbol, not word, as I need this for programming the most." :mode ("\\.json\\'" . json-mode)) (req-package restclient - :mode ("\\.api\\'" . restclient-mode)) + :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 -- cgit 1.4.1 From e3a948891e3a30081a045f83cf7beb151075c1b5 Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Thu, 11 Jun 2015 15:39:18 +0200 Subject: Emacs: Move sp-transpose to classic C-M-t --- tag-emacs/emacs.d/init.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tag-emacs/emacs.d/init.el') diff --git a/tag-emacs/emacs.d/init.el b/tag-emacs/emacs.d/init.el index 49b0f07..f097b27 100644 --- a/tag-emacs/emacs.d/init.el +++ b/tag-emacs/emacs.d/init.el @@ -1261,7 +1261,7 @@ symbol, not word, as I need this for programming the most." (bind-key "C-)" #'sp-forward-slurp-sexp sp-keymap) (bind-key "M-" #'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) -- cgit 1.4.1 From 36c541555849f5c8d60824c929847e5ba6841a78 Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Thu, 11 Jun 2015 17:37:41 +0200 Subject: Emacs: Update frame-title-format --- tag-emacs/emacs.d/init.el | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'tag-emacs/emacs.d/init.el') diff --git a/tag-emacs/emacs.d/init.el b/tag-emacs/emacs.d/init.el index f097b27..7d16a8c 100644 --- a/tag-emacs/emacs.d/init.el +++ b/tag-emacs/emacs.d/init.el @@ -1541,13 +1541,13 @@ symbol, not word, as I need this for programming the most." ;;;; 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 -- cgit 1.4.1