summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--tag-emacs/emacs.d/Cask6
-rw-r--r--tag-emacs/emacs.d/init.el67
-rw-r--r--tag-git/config/git/ignore4
-rwxr-xr-xtag-zsh/config/zsh/zshenv18
4 files changed, 66 insertions, 29 deletions
diff --git a/tag-emacs/emacs.d/Cask b/tag-emacs/emacs.d/Cask
index 9f03ef1..beea0cf 100644
--- a/tag-emacs/emacs.d/Cask
+++ b/tag-emacs/emacs.d/Cask
@@ -4,13 +4,14 @@
 (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 "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 "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")
diff --git a/tag-emacs/emacs.d/init.el b/tag-emacs/emacs.d/init.el
index 694e984..7d16a8c 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"))
@@ -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 @@
                   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 @@ 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)))
 
@@ -1018,6 +1023,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
@@ -1171,13 +1180,16 @@ 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)))
+            (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 @@ 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
@@ -1247,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-<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,10 +1428,27 @@ 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)))
 
+(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
             (setq tern-command (list (executable-find "tern")))
@@ -1510,17 +1541,17 @@ 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
-      scroll-preserve-screen-position nil
+      scroll-preserve-screen-position t
       mouse-wheel-scroll-amount '(1 ((shift) . 1) ((control)))
       split-height-threshold 100)
 
diff --git a/tag-git/config/git/ignore b/tag-git/config/git/ignore
index 78d8d16..d7189dc 100644
--- a/tag-git/config/git/ignore
+++ b/tag-git/config/git/ignore
@@ -24,4 +24,6 @@ tramp
 
 GPATH
 GRTAGS
-GTAGS
\ No newline at end of file
+GTAGS
+
+.tern-port
\ No newline at end of file
diff --git a/tag-zsh/config/zsh/zshenv b/tag-zsh/config/zsh/zshenv
index 8e1fd02..c23be40 100755
--- a/tag-zsh/config/zsh/zshenv
+++ b/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