diff --git a/core/core-os-osx.el b/core/core-os-osx.el index 55f77adb9..9843f36da 100644 --- a/core/core-os-osx.el +++ b/core/core-os-osx.el @@ -54,5 +54,14 @@ (message "Running: %s" command) (shell-command command))) +(defun narf-switch-to-iterm () + (interactive) + (shell-command "osascript -e 'tell application \"iTerm2\" to activate'" nil)) + +(defun narf-switch-to-iterm-and-cd () + (interactive) + (narf:tmux-chdir nil t) + (shell-command "osascript -e 'tell application \"iTerm2\" to activate'" nil)) + (provide 'core-os-osx) ;;; core-os-osx.el ends here diff --git a/core/lib/defuns-evil.el b/core/lib/defuns-evil.el index 08c245026..ad153648e 100644 --- a/core/lib/defuns-evil.el +++ b/core/lib/defuns-evil.el @@ -17,15 +17,15 @@ (hs-minor-mode 1)) (if count (hs-hide-level count) (evil-close-folds))) -;;;; Ace Jump ;;;;;;;;;;;;;;;;;;;;;;;;;; -;; https://github.com/winterTTr/ace-jump-mode/issues/23 -;;;###autoload (autoload 'narf:evil-ace-jump-two-chars "defuns-evil" nil t) -(evil-define-motion narf/evil-ace-jump-two-chars (count) - :type exclusive - :repeat abort - (evil-without-repeat - (evil-enclose-ace-jump-for-motion - (call-interactively 'ace-jump-two-chars-mode)))) +;;;###autoload (autoload 'narf-multi-next-line "defuns-evil" nil t) +(evil-define-motion narf-multi-next-line (count) + "Move down 6 lines" + :type line (evil-line-move 6)) + +;;;###autoload (autoload 'narf-multi-previous-line "defuns-evil" nil t) +(evil-define-motion narf-multi-previous-line (count) + "Move up 6 lines" + :type line (evil-line-move -6)) ;;;###autoload (defun narf/evil-visual-line-state-p () diff --git a/private/my-bindings.el b/private/my-bindings.el index 18e370857..bc6e4c28b 100644 --- a/private/my-bindings.el +++ b/private/my-bindings.el @@ -23,9 +23,17 @@ "M-/" 'evil-commentary-line "M-b" 'narf:build "M-t" 'helm-projectile-find-file + "C-\\" 'narf-switch-to-iterm + + ;; Simpler window navigation + "C-j" 'evil-window-down + "C-k" 'evil-window-up + "C-h" 'evil-window-left + "C-l" 'evil-window-right + + :m "M-j" 'narf-multi-next-line + :m "M-k" 'narf-multi-previous-line - :m "M-j" "6j" - :m "M-k" "6k" :n "M-r" 'narf:eval-buffer :v "M-r" 'narf:eval-region :n "M-d" 'dash-at-point @@ -88,11 +96,13 @@ :n "oT" 'narf:tmux-chdir) (:prefix "\\" ; - :n "\\" 'narf/neotree-toggle + :n "=" 'narf/neotree-toggle :n "." 'narf/neotree-find :n ";" 'narf/nlinum-toggle - :n "=" 'toggle-transparency + :n "-" 'toggle-transparency :n "E" 'evil-emacs-state + :n "\\" 'narf-switch-to-iterm + :n "|" 'narf-switch-to-iterm-and-cd :n "]" 'next-buffer :n "[" 'previous-buffer