Switch to iterm + multi-J/K keybinds
This commit is contained in:
parent
9ac47ccdce
commit
23075e937e
3 changed files with 32 additions and 13 deletions
|
@ -54,5 +54,14 @@
|
||||||
(message "Running: %s" command)
|
(message "Running: %s" command)
|
||||||
(shell-command 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)
|
(provide 'core-os-osx)
|
||||||
;;; core-os-osx.el ends here
|
;;; core-os-osx.el ends here
|
||||||
|
|
|
@ -17,15 +17,15 @@
|
||||||
(hs-minor-mode 1))
|
(hs-minor-mode 1))
|
||||||
(if count (hs-hide-level count) (evil-close-folds)))
|
(if count (hs-hide-level count) (evil-close-folds)))
|
||||||
|
|
||||||
;;;; Ace Jump ;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;###autoload (autoload 'narf-multi-next-line "defuns-evil" nil t)
|
||||||
;; https://github.com/winterTTr/ace-jump-mode/issues/23
|
(evil-define-motion narf-multi-next-line (count)
|
||||||
;;;###autoload (autoload 'narf:evil-ace-jump-two-chars "defuns-evil" nil t)
|
"Move down 6 lines"
|
||||||
(evil-define-motion narf/evil-ace-jump-two-chars (count)
|
:type line (evil-line-move 6))
|
||||||
:type exclusive
|
|
||||||
:repeat abort
|
;;;###autoload (autoload 'narf-multi-previous-line "defuns-evil" nil t)
|
||||||
(evil-without-repeat
|
(evil-define-motion narf-multi-previous-line (count)
|
||||||
(evil-enclose-ace-jump-for-motion
|
"Move up 6 lines"
|
||||||
(call-interactively 'ace-jump-two-chars-mode))))
|
:type line (evil-line-move -6))
|
||||||
|
|
||||||
;;;###autoload
|
;;;###autoload
|
||||||
(defun narf/evil-visual-line-state-p ()
|
(defun narf/evil-visual-line-state-p ()
|
||||||
|
|
|
@ -23,9 +23,17 @@
|
||||||
"M-/" 'evil-commentary-line
|
"M-/" 'evil-commentary-line
|
||||||
"M-b" 'narf:build
|
"M-b" 'narf:build
|
||||||
"M-t" 'helm-projectile-find-file
|
"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
|
:n "M-r" 'narf:eval-buffer
|
||||||
:v "M-r" 'narf:eval-region
|
:v "M-r" 'narf:eval-region
|
||||||
:n "M-d" 'dash-at-point
|
:n "M-d" 'dash-at-point
|
||||||
|
@ -88,11 +96,13 @@
|
||||||
:n "oT" 'narf:tmux-chdir)
|
:n "oT" 'narf:tmux-chdir)
|
||||||
|
|
||||||
(:prefix "\\" ; <localleader>
|
(:prefix "\\" ; <localleader>
|
||||||
:n "\\" 'narf/neotree-toggle
|
:n "=" 'narf/neotree-toggle
|
||||||
:n "." 'narf/neotree-find
|
:n "." 'narf/neotree-find
|
||||||
:n ";" 'narf/nlinum-toggle
|
:n ";" 'narf/nlinum-toggle
|
||||||
:n "=" 'toggle-transparency
|
:n "-" 'toggle-transparency
|
||||||
:n "E" 'evil-emacs-state
|
:n "E" 'evil-emacs-state
|
||||||
|
:n "\\" 'narf-switch-to-iterm
|
||||||
|
:n "|" 'narf-switch-to-iterm-and-cd
|
||||||
|
|
||||||
:n "]" 'next-buffer
|
:n "]" 'next-buffer
|
||||||
:n "[" 'previous-buffer
|
:n "[" 'previous-buffer
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue