diff --git a/init/my-bindings.el b/init/my-bindings.el index 90789716a..228ebe569 100644 --- a/init/my-bindings.el +++ b/init/my-bindings.el @@ -31,7 +31,6 @@ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (bind '(normal visual) my-mode-map - "\\" 'evil-execute-in-god-state ; localleader ";" 'evil-ex "X" 'evil-exchange @@ -54,6 +53,7 @@ "[ \\" 'er/contract-region) (bind 'normal my-mode-map + ;; ", ," 'helm-projectile-switch-to-buffer ", ." 'helm-resume ", /" 'helm-projectile-find-file @@ -71,6 +71,25 @@ ", p" 'helm-projectile-switch-project ", y" 'helm-show-kill-ring + ;; + "\\ \\" 'neotree-toggle + "\\ ;" 'linum-mode + "\\ =" 'toggle-transparency + "\\ e" 'evil-emacs-state + + "\\ ]" 'next-buffer + "\\ [" 'previous-buffer + + "\\ o f" 'my-send-dir-to-finder + "\\ o u" 'my-send-to-transmit + "\\ o l" 'my-send-to-launchbar + "\\ o L" 'my-send-dir-to-launchbar + + ;; tmux: cd (default-directory) + "\\ o t" (λ (ex:tmux-chdir nil t)) + ;; tmux: cd [project root] + "\\ o T" 'ex:tmux-chdir + ;; behave like D and C; yank to end of line "Y" (λ (evil-yank (point) (point-at-eol))) @@ -114,26 +133,6 @@ (linum-mode 0) (remove-hook 'pre-command-hook 'my--disable-linum)) -(bind 'god my-mode-map - ;; - "\\" 'neotree-toggle - ";" 'linum-mode - "=" 'toggle-transparency - "e" 'evil-emacs-state - - "]" 'next-buffer - "[" 'previous-buffer - - "o f" 'my-send-dir-to-finder - "o u" 'my-send-to-transmit - "o l" 'my-send-to-launchbar - "o L" 'my-send-dir-to-launchbar - - ;; tmux: cd (default-directory) - "o t" (λ (my:tmux-chdir nil t)) - ;; tmux: cd [project root] - "o T" 'my:tmux-chdir) - (bind 'emacs [escape] 'evil-normal-state) (bind 'insert my-mode-map @@ -161,7 +160,7 @@ (bind 'motion my-mode-map "g x" 'my-scratch-buffer) ; send to scratch buffer ;; Easy escape from insert mode (more responsive than using key-chord-define) -(bind 'insert "j" #'my--maybe-exit-insert-mode) +(bind 'insert "j" 'my--maybe-exit-insert-mode) (bind 'insert "C-g" 'evil-normal-state) diff --git a/init/my-settings.el b/init/my-settings.el index f55ee21cb..8f30b0d3e 100644 --- a/init/my-settings.el +++ b/init/my-settings.el @@ -23,9 +23,7 @@ (set-register ?@ "~/.emacs.d/init.el") (add-hook 'help-mode-hook 'visual-line-mode) -(add-hook! 'before-save-hook - (unless (eq major-mode 'org-mode) - (delete-trailing-whitespace))) +(add-hook 'before-save-hook 'delete-trailing-whitespace) ;; Performance checks (add-hook! 'find-file-hook @@ -86,16 +84,17 @@ "\C-w" 'ido-delete-backward-word-updir)) ;; Make ESC quit all the things -(bind minibuffer-inactive-mode-map [escape] (λ (other-window 1))) +;; (bind minibuffer-inactive-mode-map [escape] (λ (other-window 1))) (bind (list minibuffer-local-map minibuffer-local-ns-map minibuffer-local-completion-map minibuffer-local-must-match-map - minibuffer-local-isearch-map) [escape] 'my--minibuffer-quit) + minibuffer-local-isearch-map) + [escape] 'my--minibuffer-quit) (bind 'emacs [escape] 'my--minibuffer-quit) (bind 'god [escape] 'evil-god-state-bail) (bind 'normal evil-command-window-mode-map [escape] 'kill-buffer-and-window) -(bind evil-ex-map [escape] 'my--minibuffer-quit) +;; (bind evil-ex-map [escape] 'my--minibuffer-quit) (bind (list evil-ex-search-keymap minibuffer-local-map) "\C-w" 'evil-delete-backward-word)