bind! -> map!; new minimalistic keybinding macro
This commit is contained in:
parent
2e4a083bbb
commit
81df2830a9
19 changed files with 431 additions and 441 deletions
|
@ -110,54 +110,52 @@ Examples:
|
||||||
`((add-hook 'find-file-hook ',hook-name))))))))))
|
`((add-hook 'find-file-hook ',hook-name))))))))))
|
||||||
|
|
||||||
(after! evil
|
(after! evil
|
||||||
;; Register keywords for proper indentation (see `bind!')
|
;; Register keywords for proper indentation (see `map!')
|
||||||
(put ':prefix 'lisp-indent-function 'defun)
|
(put ':prefix 'lisp-indent-function 'defun)
|
||||||
(put ':map 'lisp-indent-function 'defun)
|
(put ':map 'lisp-indent-function 'defun)
|
||||||
(put ':after 'lisp-indent-function 'defun)
|
(put ':after 'lisp-indent-function 'defun)
|
||||||
(put ':when 'lisp-indent-function 'defun)
|
(put ':when 'lisp-indent-function 'defun)
|
||||||
(put ':unless 'lisp-indent-function 'defun)
|
(put ':unless 'lisp-indent-function 'defun)
|
||||||
|
(put ':leader 'lisp-indent-function 'defun)
|
||||||
|
(put ':localleader 'lisp-indent-function 'defun)
|
||||||
|
|
||||||
(defmacro bind! (&rest rest)
|
(defmacro map! (&rest rest)
|
||||||
(let ((i 0)
|
(let ((i 0)
|
||||||
key def
|
|
||||||
first-set
|
|
||||||
prefix
|
|
||||||
internal
|
|
||||||
(default-keymaps '((current-global-map)))
|
|
||||||
(keymaps (if (boundp 'keymaps) keymaps))
|
|
||||||
(states (if (boundp 'states) states '()))
|
|
||||||
(forms '())
|
(forms '())
|
||||||
|
(keymaps (if (boundp 'keymaps) keymaps))
|
||||||
|
(default-keymaps '((current-global-map)))
|
||||||
(state-map '(("n" . normal)
|
(state-map '(("n" . normal)
|
||||||
("v" . visual)
|
("v" . visual)
|
||||||
("i" . insert)
|
("i" . insert)
|
||||||
("e" . emacs)
|
("e" . emacs)
|
||||||
("o" . operator)
|
("o" . operator)
|
||||||
("m" . motion)
|
("m" . motion)
|
||||||
("r" . replace))))
|
("r" . replace)))
|
||||||
|
key def prefix states)
|
||||||
(unless keymaps
|
(unless keymaps
|
||||||
(setq keymaps default-keymaps))
|
(setq keymaps default-keymaps))
|
||||||
(while rest
|
(while rest
|
||||||
(setq key (pop rest))
|
(setq key (pop rest))
|
||||||
(add-to-list
|
(add-to-list
|
||||||
'forms
|
'forms
|
||||||
(cond ((eq key '-) nil) ; skip this
|
(cond ((listp key) ; it's a sub exp
|
||||||
|
`(,(macroexpand `(map! ,@key))))
|
||||||
((listp key) ; it's a sub exp
|
|
||||||
`((bind! ,@key)))
|
|
||||||
|
|
||||||
((keywordp key)
|
((keywordp key)
|
||||||
|
(when (memq key '(:leader :localleader))
|
||||||
|
(push (pcase key
|
||||||
|
(:leader narf-leader-prefix)
|
||||||
|
(:localleader narf-localleader-prefix))
|
||||||
|
rest)
|
||||||
|
(setq key :prefix))
|
||||||
(pcase key
|
(pcase key
|
||||||
;; TODO: Data checks
|
;; TODO: Data checks
|
||||||
(:prefix (setq prefix (kbd (pop rest)))
|
(:prefix (setq prefix (kbd (pop rest))) nil)
|
||||||
(if (= i 0) (setq first-set `(:prefix . ,prefix)))
|
(:map (setq keymaps (-list (pop rest))) nil)
|
||||||
nil)
|
(:unset `(,(macroexpand `(map! ,(kbd (pop rest)) nil))))
|
||||||
(:map (setq keymaps (-list (pop rest)))
|
(:after (prog1 `((after! ,(pop rest) ,(macroexpand `(map! ,@rest)))) (setq rest '())))
|
||||||
(if (= i 0) (setq first-set `(:map . ,keymaps)))
|
(:when (prog1 `((if ,(pop rest) ,(macroexpand `(map! ,@rest)))) (setq rest '())))
|
||||||
nil)
|
(:unless (prog1 `((if (not ,(pop rest)) ,(macroexpand `(map! ,@rest)))) (setq rest '())))
|
||||||
(:unset `((bind! ,(kbd (pop rest)) nil)))
|
|
||||||
(:after (prog1 `((after! ,(pop rest) (bind! ,@rest))) (setq rest '())))
|
|
||||||
(:when (prog1 `((if ,(pop rest) (bind! ,@rest))) (setq rest '())))
|
|
||||||
(:unless (prog1 `((if (not ,(pop rest)) (bind! ,@rest))) (setq rest '())))
|
|
||||||
(otherwise ; might be a state prefix
|
(otherwise ; might be a state prefix
|
||||||
(mapc (lambda (letter)
|
(mapc (lambda (letter)
|
||||||
(if (assoc letter state-map)
|
(if (assoc letter state-map)
|
||||||
|
@ -179,16 +177,12 @@ Examples:
|
||||||
(unless (> (length rest) 0)
|
(unless (> (length rest) 0)
|
||||||
(user-error "Map has no definition for %s" key))
|
(user-error "Map has no definition for %s" key))
|
||||||
(setq def (pop rest))
|
(setq def (pop rest))
|
||||||
(let ((first-key (car first-set))
|
(let (out-forms)
|
||||||
(first-value (cdr first-set))
|
|
||||||
out-forms)
|
|
||||||
(dolist (keymap keymaps)
|
(dolist (keymap keymaps)
|
||||||
(if (not states)
|
(if (not states)
|
||||||
(add-to-list 'out-forms `(evil-define-key nil ,keymap ,key ,def) t)
|
(add-to-list 'out-forms `(evil-define-key nil ,keymap ,key ,def) t)
|
||||||
(dolist (state states)
|
(dolist (state states)
|
||||||
(add-to-list 'out-forms `(evil-define-key ',state ,keymap ,key ,def) t))))
|
(add-to-list 'out-forms `(evil-define-key ',state ,keymap ,key ,def) t))))
|
||||||
(setq prefix (if (eq first-key :prefix) first-value))
|
|
||||||
(setq keymaps (if (eq first-key :map) first-value default-keymaps))
|
|
||||||
(setq states '())
|
(setq states '())
|
||||||
out-forms))
|
out-forms))
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
flycheck-disabled-checkers '(emacs-lisp-checkdoc make))
|
flycheck-disabled-checkers '(emacs-lisp-checkdoc make))
|
||||||
:config
|
:config
|
||||||
(evil-initial-state 'flycheck-error-list-mode 'emacs)
|
(evil-initial-state 'flycheck-error-list-mode 'emacs)
|
||||||
(bind! (:map flycheck-error-list-mode-map
|
(map! (:map flycheck-error-list-mode-map
|
||||||
:n [escape] 'kill-this-buffer
|
:n [escape] 'kill-this-buffer
|
||||||
:n "q" 'kill-this-buffer
|
:n "q" 'kill-this-buffer
|
||||||
:n "C-n" 'flycheck-error-list-next-error
|
:n "C-n" 'flycheck-error-list-next-error
|
||||||
|
|
|
@ -32,7 +32,7 @@
|
||||||
(mapc (lambda (r) (add-to-list 'helm-boring-file-regexp-list r))
|
(mapc (lambda (r) (add-to-list 'helm-boring-file-regexp-list r))
|
||||||
(list "\\.projects$" "\\.DS_Store$"))
|
(list "\\.projects$" "\\.DS_Store$"))
|
||||||
|
|
||||||
(bind! (:map (helm-map helm-generic-files-map helm-find-files-map helm-swoop-map helm-projectile-find-file-map)
|
(map! (:map (helm-map helm-generic-files-map helm-find-files-map helm-swoop-map helm-projectile-find-file-map)
|
||||||
"C-w" 'backward-kill-word
|
"C-w" 'backward-kill-word
|
||||||
"C-r" 'evil-ex-paste-from-register ; Evil registers in helm! Glorious!
|
"C-r" 'evil-ex-paste-from-register ; Evil registers in helm! Glorious!
|
||||||
"<escape>" 'helm-keyboard-quit
|
"<escape>" 'helm-keyboard-quit
|
||||||
|
|
|
@ -33,7 +33,7 @@
|
||||||
(ido-vertical-mode 1)
|
(ido-vertical-mode 1)
|
||||||
(require 'flx-ido)
|
(require 'flx-ido)
|
||||||
(flx-ido-mode 1)
|
(flx-ido-mode 1)
|
||||||
(bind! :map (ido-common-completion-map
|
(map! :map (ido-common-completion-map
|
||||||
ido-completion-map
|
ido-completion-map
|
||||||
ido-file-completion-map)
|
ido-file-completion-map)
|
||||||
"C-n" 'ido-next-match
|
"C-n" 'ido-next-match
|
||||||
|
@ -68,7 +68,7 @@
|
||||||
neo-modern-sidebar t)
|
neo-modern-sidebar t)
|
||||||
:config
|
:config
|
||||||
(defun narf|neotree-init-keymap ()
|
(defun narf|neotree-init-keymap ()
|
||||||
(bind! :map evil-motion-state-local-map
|
(map! :map evil-motion-state-local-map
|
||||||
"ESC" 'neotree-hide
|
"ESC" 'neotree-hide
|
||||||
"\\\\" 'neotree-hide
|
"\\\\" 'neotree-hide
|
||||||
"RET" 'neotree-enter
|
"RET" 'neotree-enter
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
yas-snippet-dirs `(,@narf-snippet-dirs)
|
yas-snippet-dirs `(,@narf-snippet-dirs)
|
||||||
yas-prompt-functions '(yas-ido-prompt yas-no-prompt))
|
yas-prompt-functions '(yas-ido-prompt yas-no-prompt))
|
||||||
|
|
||||||
(bind! :i [(tab)] 'yas-expand
|
(map! :i [(tab)] 'yas-expand
|
||||||
:v "<backtab>" 'narf/yas-insert-snippet)
|
:v "<backtab>" 'narf/yas-insert-snippet)
|
||||||
|
|
||||||
(defvar yas-minor-mode-map
|
(defvar yas-minor-mode-map
|
||||||
|
@ -40,11 +40,11 @@
|
||||||
;; Simpler `yas-selected-text' alias for templates
|
;; Simpler `yas-selected-text' alias for templates
|
||||||
(defvaralias '% 'yas-selected-text)
|
(defvaralias '% 'yas-selected-text)
|
||||||
;; Undo global maps
|
;; Undo global maps
|
||||||
(bind! :i [(tab)] nil
|
(map! :i [(tab)] nil
|
||||||
:v "<backtab>" nil)
|
:v "<backtab>" nil)
|
||||||
|
|
||||||
;; keybinds
|
;; keybinds
|
||||||
(bind! :map yas-keymap
|
(map! :map yas-keymap
|
||||||
"C-e" 'narf/yas-goto-end-of-field
|
"C-e" 'narf/yas-goto-end-of-field
|
||||||
"C-a" 'narf/yas-goto-start-of-field
|
"C-a" 'narf/yas-goto-start-of-field
|
||||||
"<M-right>" 'narf/yas-goto-end-of-field
|
"<M-right>" 'narf/yas-goto-end-of-field
|
||||||
|
|
|
@ -18,11 +18,12 @@
|
||||||
:init
|
:init
|
||||||
(add-hook! csharp-mode '(emr-initialize omnisharp-mode))
|
(add-hook! csharp-mode '(emr-initialize omnisharp-mode))
|
||||||
:config
|
:config
|
||||||
(evil-define-key 'normal omnisharp-mode-map
|
(map! :map omnisharp-mode-map
|
||||||
(kbd "gd") 'omnisharp-go-to-definition
|
"gd" 'omnisharp-go-to-definition
|
||||||
(kbd ",tr") (λ (omnisharp-unit-test "fixture"))
|
(:prefix "\\"
|
||||||
(kbd ",ts") (λ (omnisharp-unit-test "single"))
|
"tr" (λ (omnisharp-unit-test "fixture"))
|
||||||
(kbd ",ta") (λ (omnisharp-unit-test "all")))
|
"ts" (λ (omnisharp-unit-test "single"))
|
||||||
|
"ta" (λ (omnisharp-unit-test "all"))))
|
||||||
|
|
||||||
(after! company
|
(after! company
|
||||||
(define-company-backend! csharp-mode (omnisharp))
|
(define-company-backend! csharp-mode (omnisharp))
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
;; em-prompt
|
;; em-prompt
|
||||||
(setq eshell-prompt-function 'narf/eshell-prompt)
|
(setq eshell-prompt-function 'narf/eshell-prompt)
|
||||||
|
|
||||||
(bind! :map eshell-mode-map
|
(map! :map eshell-mode-map
|
||||||
:n "i" 'narf/eshell-evil-prepend-maybe
|
:n "i" 'narf/eshell-evil-prepend-maybe
|
||||||
:n "I" 'narf/eshell-evil-prepend
|
:n "I" 'narf/eshell-evil-prepend
|
||||||
:n "a" 'narf/eshell-evil-append-maybe
|
:n "a" 'narf/eshell-evil-append-maybe
|
||||||
|
|
|
@ -36,14 +36,14 @@
|
||||||
:config
|
:config
|
||||||
(define-company-backend! go-mode (go yasnippet)))
|
(define-company-backend! go-mode (go yasnippet)))
|
||||||
|
|
||||||
(bind!
|
(map! :map go-mode-map
|
||||||
(:map go-mode-map
|
|
||||||
:n "gd" 'godef-jump
|
:n "gd" 'godef-jump
|
||||||
:n "gD" 'godef-describe
|
:n "gD" 'godef-describe
|
||||||
:n ",i" 'helm-go-package
|
(:localleader
|
||||||
:n ",tr" 'narf:go-test-run-all
|
:n "p" 'helm-go-package
|
||||||
:n ",ta" 'narf:go-test-run-all
|
:n "tr" 'narf:go-test-run-all
|
||||||
:n ",ts" 'narf:go-test-run-package)))
|
:n "ta" 'narf:go-test-run-all
|
||||||
|
:n "ts" 'narf:go-test-run-package)))
|
||||||
|
|
||||||
(provide 'module-go)
|
(provide 'module-go)
|
||||||
;;; module-go.el ends here
|
;;; module-go.el ends here
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
:functions company-emacs-eclim-setup
|
:functions company-emacs-eclim-setup
|
||||||
:config (company-emacs-eclim-setup)))
|
:config (company-emacs-eclim-setup)))
|
||||||
|
|
||||||
(bind! :map java-mode-map :m "gd" 'eclim-java-find-declaration))
|
(map! :map java-mode-map :m "gd" 'eclim-java-find-declaration))
|
||||||
|
|
||||||
(use-package android-mode
|
(use-package android-mode
|
||||||
:commands android-mode
|
:commands android-mode
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
|
|
||||||
(after! web-beautify
|
(after! web-beautify
|
||||||
(add-hook! js2-mode (setenv "jsbeautify_indent_size" "4"))
|
(add-hook! js2-mode (setenv "jsbeautify_indent_size" "4"))
|
||||||
(bind! :map js2-mode-map :m "gQ" 'web-beautify-js))
|
(map! :map js2-mode-map :m "gQ" 'web-beautify-js))
|
||||||
|
|
||||||
(use-package js2-refactor
|
(use-package js2-refactor
|
||||||
:init (add-hook! js2-mode 'emr-initialize)
|
:init (add-hook! js2-mode 'emr-initialize)
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
|
|
||||||
;; Highlight extra NARF keywords
|
;; Highlight extra NARF keywords
|
||||||
(let ((keywords '("add-hook!"
|
(let ((keywords '("add-hook!"
|
||||||
"bind!"
|
"map!"
|
||||||
"after!"
|
"after!"
|
||||||
"λ"
|
"λ"
|
||||||
"in!"
|
"in!"
|
||||||
|
@ -38,7 +38,7 @@
|
||||||
'emacs-lisp-mode `(("\\(lambda\\)" (0 (narf/show-as ?λ)))))
|
'emacs-lisp-mode `(("\\(lambda\\)" (0 (narf/show-as ?λ)))))
|
||||||
|
|
||||||
;; Real go-to-definition for elisp
|
;; Real go-to-definition for elisp
|
||||||
(bind! :map emacs-lisp-mode-map
|
(map! :map emacs-lisp-mode-map
|
||||||
:m "gd" 'narf/elisp-find-function-at-pt
|
:m "gd" 'narf/elisp-find-function-at-pt
|
||||||
:m "gD" 'narf/elisp-find-function-at-pt-other-window)
|
:m "gD" 'narf/elisp-find-function-at-pt-other-window)
|
||||||
|
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
(add-hook! markdown-mode
|
(add-hook! markdown-mode
|
||||||
(exmap! "preview" 'narf/markdown-preview)
|
(exmap! "preview" 'narf/markdown-preview)
|
||||||
(exmap! "export" 'narf:org-export))
|
(exmap! "export" 'narf:org-export))
|
||||||
(bind! (:map markdown-mode-map
|
(map! (:map markdown-mode-map
|
||||||
"<backspace>" nil
|
"<backspace>" nil
|
||||||
"<M-left>" nil
|
"<M-left>" nil
|
||||||
"<M-right>" nil
|
"<M-right>" nil
|
||||||
|
@ -27,10 +27,11 @@
|
||||||
"M-i" 'markdown-insert-italic
|
"M-i" 'markdown-insert-italic
|
||||||
"M-`" 'narf/markdown-insert-del
|
"M-`" 'narf/markdown-insert-del
|
||||||
|
|
||||||
:nv ",i" 'markdown-insert-image
|
(:localleader
|
||||||
:nv ",l" 'markdown-insert-link
|
:nv "i" 'markdown-insert-image
|
||||||
:nv ",L" 'markdown-insert-reference-link-dwim
|
:nv "l" 'markdown-insert-link
|
||||||
:nv ",b" 'markdown-preview
|
:nv "L" 'markdown-insert-reference-link-dwim
|
||||||
|
:nv "b" 'markdown-preview)
|
||||||
|
|
||||||
;; TODO: Make context sensitive
|
;; TODO: Make context sensitive
|
||||||
:n "[p" 'markdown-promote
|
:n "[p" 'markdown-promote
|
||||||
|
|
|
@ -399,7 +399,7 @@ will function properly."
|
||||||
(define-key org-mode-map (kbd "C-j") nil)
|
(define-key org-mode-map (kbd "C-j") nil)
|
||||||
(define-key org-mode-map (kbd "C-k") nil)
|
(define-key org-mode-map (kbd "C-k") nil)
|
||||||
;; Keybinds
|
;; Keybinds
|
||||||
(bind! (:map org-mode-map
|
(map! (:map org-mode-map
|
||||||
:i [remap narf/inflate-space-maybe] 'org-self-insert-command
|
:i [remap narf/inflate-space-maybe] 'org-self-insert-command
|
||||||
:i "RET" 'org-return-indent)
|
:i "RET" 'org-return-indent)
|
||||||
|
|
||||||
|
@ -443,25 +443,36 @@ will function properly."
|
||||||
:v "M-i" "S/"
|
:v "M-i" "S/"
|
||||||
:v "M-`" "S+"
|
:v "M-`" "S+"
|
||||||
|
|
||||||
:n ",;" 'helm-org-in-buffer-headings
|
(:leader
|
||||||
:nv ",l" 'org-insert-link
|
:n ";" 'helm-org-in-buffer-headings
|
||||||
:n ",L" 'org-store-link
|
:n "oa" 'narf/org-attachment-reveal
|
||||||
;; TODO narf/org-replace-link-by-link-description
|
)
|
||||||
:n ",=" 'org-align-all-tags
|
|
||||||
:n ",f" 'org-sparse-tree
|
(:localleader
|
||||||
:n ",?" 'org-tags-view
|
:n "/" 'org-sparse-tree
|
||||||
:n ",e" 'org-edit-special
|
:n "?" 'org-tags-view
|
||||||
:n ",a" 'org-agenda
|
|
||||||
:n ",D" 'org-time-stamp-inactive
|
:n "n" (λ (if (buffer-narrowed-p) (widen) (org-narrow-to-subtree)))
|
||||||
:n ",i" 'narf/org-toggle-inline-images-at-point
|
:n "e" 'org-edit-special
|
||||||
:n ",t" 'org-todo
|
:n "=" 'org-align-all-tags
|
||||||
:n ",T" 'org-show-todo-tree
|
:nv "l" 'org-insert-link
|
||||||
:n ",d" 'org-time-stamp
|
:n "L" 'org-store-link
|
||||||
:n ",r" 'org-refile
|
:n "x" 'narf/org-remove-link
|
||||||
:n ",s" 'org-schedule
|
:n "w" 'writing-mode
|
||||||
:n ",oa" 'narf/org-attachment-reveal
|
:n "SPC" 'narf/org-toggle-checkbox
|
||||||
:n ", SPC" 'narf/org-toggle-checkbox
|
:n "RET" 'org-archive-subtree
|
||||||
:n ", RET" 'org-archive-subtree
|
|
||||||
|
:n "a" 'org-agenda
|
||||||
|
:n "A" 'narf:org-attachment-list
|
||||||
|
|
||||||
|
:n "d" 'org-time-stamp
|
||||||
|
:n "D" 'org-time-stamp-inactive
|
||||||
|
:n "i" 'narf/org-toggle-inline-images-at-point
|
||||||
|
:n "t" (λ (org-todo (if (org-entry-is-todo-p) 'none 'todo)))
|
||||||
|
:n "T" 'org-todo
|
||||||
|
:n "r" 'org-refile
|
||||||
|
:n "s" 'org-schedule
|
||||||
|
)
|
||||||
|
|
||||||
:n "za" 'org-cycle
|
:n "za" 'org-cycle
|
||||||
:n "zA" 'org-shifttab
|
:n "zA" 'org-shifttab
|
||||||
|
|
|
@ -22,14 +22,15 @@
|
||||||
:init
|
:init
|
||||||
(associate! nose-mode :pattern "/test_.+\\.py\\'")
|
(associate! nose-mode :pattern "/test_.+\\.py\\'")
|
||||||
:config
|
:config
|
||||||
(bind! :map nose-mode-map
|
(map! :map nose-mode-map
|
||||||
:n ",tr" 'nosetests-again
|
(:localleader
|
||||||
:n ",ta" 'nosetests-all
|
:n "tr" 'nosetests-again
|
||||||
:n ",ts" 'nosetests-one
|
:n "ta" 'nosetests-all
|
||||||
:n ",tv" 'nosetests-module
|
:n "ts" 'nosetests-one
|
||||||
:n ",tA" 'nosetests-pdb-all
|
:n "tv" 'nosetests-module
|
||||||
:n ",tO" 'nosetests-pdb-one
|
:n "tA" 'nosetests-pdb-all
|
||||||
:n ",tV" 'nosetests-pdb-module))
|
:n "tO" 'nosetests-pdb-one
|
||||||
|
:n "tV" 'nosetests-pdb-module)))
|
||||||
|
|
||||||
(use-package anaconda-mode
|
(use-package anaconda-mode
|
||||||
:diminish anaconda-mode
|
:diminish anaconda-mode
|
||||||
|
@ -39,8 +40,8 @@
|
||||||
(add-hook! python-mode '(anaconda-mode eldoc-mode))
|
(add-hook! python-mode '(anaconda-mode eldoc-mode))
|
||||||
(setq anaconda-mode-installation-directory (concat narf-temp-dir "anaconda/"))
|
(setq anaconda-mode-installation-directory (concat narf-temp-dir "anaconda/"))
|
||||||
:config
|
:config
|
||||||
(bind! :map anaconda-mode-map :m "gd" 'anaconda-mode-goto-definitions)
|
(map! :map anaconda-mode-map :m "gd" 'anaconda-mode-goto-definitions)
|
||||||
(bind! :map anaconda-nav-mode-map :n [escape] 'anaconda-nav-quit)
|
(map! :map anaconda-nav-mode-map :n [escape] 'anaconda-nav-quit)
|
||||||
|
|
||||||
(advice-add 'anaconda-mode-doc-buffer :after 'narf*anaconda-mode-doc-buffer)
|
(advice-add 'anaconda-mode-doc-buffer :after 'narf*anaconda-mode-doc-buffer)
|
||||||
|
|
||||||
|
|
|
@ -5,11 +5,11 @@
|
||||||
:config
|
:config
|
||||||
(require 'pcre2el)
|
(require 'pcre2el)
|
||||||
(setq reb-re-syntax 'pcre)
|
(setq reb-re-syntax 'pcre)
|
||||||
(bind! :map rxt-help-mode-map :n [escape] 'kill-buffer-and-window)
|
(map! :map rxt-help-mode-map :n [escape] 'kill-buffer-and-window)
|
||||||
|
|
||||||
(add-hook! reb-mode 'narf|reb-cleanup)
|
(add-hook! reb-mode 'narf|reb-cleanup)
|
||||||
(evil-set-initial-state 'reb-mode 'insert)
|
(evil-set-initial-state 'reb-mode 'insert)
|
||||||
(bind! :map reb-mode-map
|
(map! :map reb-mode-map
|
||||||
:n "C-g" 'reb-quit
|
:n "C-g" 'reb-quit
|
||||||
:n [escape] 'reb-quit
|
:n [escape] 'reb-quit
|
||||||
:n [backtab] 'reb-change-syntax))
|
:n [backtab] 'reb-change-syntax))
|
||||||
|
|
|
@ -49,11 +49,12 @@
|
||||||
;; Rake
|
;; Rake
|
||||||
(("task" "namespace") () "end")))
|
(("task" "namespace") () "end")))
|
||||||
:config
|
:config
|
||||||
(bind! (:map rspec-mode-map
|
(map! :map rspec-mode-map
|
||||||
:n ",tr" 'rspec-rerun
|
(:localleader
|
||||||
:n ",ta" 'rspec-verify-all
|
:n "tr" 'rspec-rerun
|
||||||
:n ",ts" 'rspec-verify-single
|
:n "ta" 'rspec-verify-all
|
||||||
:n ",tv" 'rspec-verify)))
|
:n "ts" 'rspec-verify-single
|
||||||
|
:n "tv" 'rspec-verify)))
|
||||||
|
|
||||||
(use-package inf-ruby
|
(use-package inf-ruby
|
||||||
:commands (inf-ruby inf-ruby-console-auto)
|
:commands (inf-ruby inf-ruby-console-auto)
|
||||||
|
|
|
@ -14,7 +14,9 @@
|
||||||
:config
|
:config
|
||||||
(setq racer-cmd "/usr/local/bin/racer"
|
(setq racer-cmd "/usr/local/bin/racer"
|
||||||
racer-rust-src-path "~/Dropbox/lib/rust/src/")
|
racer-rust-src-path "~/Dropbox/lib/rust/src/")
|
||||||
(bind! :map rust-mode-map :m "gd" 'racer-find-definition)
|
(map! :map rust-mode-map :m "gd" 'racer-find-definition)
|
||||||
|
|
||||||
|
;; TODO Unit test keybinds
|
||||||
|
|
||||||
(add-hook! rust-mode '(racer-mode eldoc-mode flycheck-rust-setup))
|
(add-hook! rust-mode '(racer-mode eldoc-mode flycheck-rust-setup))
|
||||||
(define-company-backend! rust-mode (racer))))
|
(define-company-backend! rust-mode (racer))))
|
||||||
|
|
|
@ -14,14 +14,15 @@
|
||||||
(setq-default css-indent-offset 2)
|
(setq-default css-indent-offset 2)
|
||||||
(setq scss-compile-at-save nil)
|
(setq scss-compile-at-save nil)
|
||||||
:config
|
:config
|
||||||
(bind! :map scss-mode-map
|
(map! :map scss-mode-map
|
||||||
:n "M-r" 'narf/web-refresh-browser
|
:n "M-r" 'narf/web-refresh-browser
|
||||||
:n ",;" 'helm-css-scss
|
(:leader
|
||||||
:n ",:" 'helm-css-scss-multi)
|
:n ";" 'helm-css-scss
|
||||||
|
:n ":" 'helm-css-scss-multi))
|
||||||
|
|
||||||
(after! web-beautify
|
(after! web-beautify
|
||||||
(add-hook! scss-mode (setenv "jsbeautify_indent_size" "2"))
|
(add-hook! scss-mode (setenv "jsbeautify_indent_size" "2"))
|
||||||
(bind! :map scss-mode-map :m "gQ" 'web-beautify-css))
|
(map! :map scss-mode-map :m "gQ" 'web-beautify-css))
|
||||||
|
|
||||||
(after! emr
|
(after! emr
|
||||||
(emr-declare-command 'narf/scss-toggle-inline-or-block
|
(emr-declare-command 'narf/scss-toggle-inline-or-block
|
||||||
|
@ -36,7 +37,7 @@
|
||||||
:init
|
:init
|
||||||
(after! css-mode
|
(after! css-mode
|
||||||
(add-hook! css-mode (setenv "jsbeautify_indent_size" "2"))
|
(add-hook! css-mode (setenv "jsbeautify_indent_size" "2"))
|
||||||
(bind! :map css-mode-map :m "gQ" 'web-beautify-css)))
|
(map! :map css-mode-map :m "gQ" 'web-beautify-css)))
|
||||||
|
|
||||||
(use-package jade-mode
|
(use-package jade-mode
|
||||||
:mode "\\.jade$"
|
:mode "\\.jade$"
|
||||||
|
@ -56,17 +57,17 @@
|
||||||
:config
|
:config
|
||||||
(after! web-beautify
|
(after! web-beautify
|
||||||
(add-hook! web-mode (setenv "jsbeautify_indent_size" "4"))
|
(add-hook! web-mode (setenv "jsbeautify_indent_size" "4"))
|
||||||
(bind! :map web-mode-map :m "gQ" 'web-beautify-html))
|
(map! :map web-mode-map :m "gQ" 'web-beautify-html))
|
||||||
|
|
||||||
(after! nlinum
|
(after! nlinum
|
||||||
;; Fix blank line numbers after unfolding
|
;; Fix blank line numbers after unfolding
|
||||||
(advice-add 'web-mode-fold-or-unfold :after 'nlinum--flush))
|
(advice-add 'web-mode-fold-or-unfold :after 'nlinum--flush))
|
||||||
|
|
||||||
(bind! :map web-mode-map
|
(map! :map web-mode-map
|
||||||
"M-/" 'web-mode-comment-or-uncomment
|
"M-/" 'web-mode-comment-or-uncomment
|
||||||
|
|
||||||
:n "za" 'web-mode-fold-or-unfold
|
:n "za" 'web-mode-fold-or-unfold
|
||||||
:n ",t" 'web-mode-element-rename
|
(:localleader :n "t" 'web-mode-element-rename)
|
||||||
|
|
||||||
:n "M-r" 'narf/web-refresh-browser
|
:n "M-r" 'narf/web-refresh-browser
|
||||||
|
|
||||||
|
@ -85,7 +86,7 @@
|
||||||
(defvar emmet-mode-keymap (make-sparse-keymap))
|
(defvar emmet-mode-keymap (make-sparse-keymap))
|
||||||
:config
|
:config
|
||||||
(setq emmet-move-cursor-between-quotes t)
|
(setq emmet-move-cursor-between-quotes t)
|
||||||
(bind! :map emmet-mode-keymap
|
(map! :map emmet-mode-keymap
|
||||||
:v "M-e" 'emmet-wrap-with-markup
|
:v "M-e" 'emmet-wrap-with-markup
|
||||||
:i "M-e" 'emmet-expand-yas
|
:i "M-e" 'emmet-expand-yas
|
||||||
:i "M-E" 'emmet-expand-line))
|
:i "M-E" 'emmet-expand-line))
|
||||||
|
|
|
@ -6,8 +6,9 @@
|
||||||
|
|
||||||
(eval-when-compile (require 'core-defuns))
|
(eval-when-compile (require 'core-defuns))
|
||||||
|
|
||||||
(bind!
|
;; See `narf-leader-prefix' & `narf-localleader-prefix' in ../core/core-vars.el
|
||||||
-
|
|
||||||
|
(map!
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
;; Global keymaps ;;
|
;; Global keymaps ;;
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
|
@ -15,37 +16,25 @@
|
||||||
"M-x" 'helm-M-x
|
"M-x" 'helm-M-x
|
||||||
"M-;" 'eval-expression
|
"M-;" 'eval-expression
|
||||||
"M-/" 'evil-commentary-line
|
"M-/" 'evil-commentary-line
|
||||||
|
|
||||||
"A-x" 'helm-M-x
|
"A-x" 'helm-M-x
|
||||||
"A-;" 'eval-expression
|
"A-;" 'eval-expression
|
||||||
"A-/" 'evil-commentary-line
|
"A-/" 'evil-commentary-line
|
||||||
|
|
||||||
(:when window-system
|
|
||||||
"M-0" (λ (text-scale-set 0))
|
"M-0" (λ (text-scale-set 0))
|
||||||
"M-=" 'text-scale-increase
|
"M-=" 'text-scale-increase
|
||||||
"M--" 'text-scale-decrease)
|
"M--" 'text-scale-decrease
|
||||||
|
|
||||||
"M-b" 'narf:build
|
"M-b" 'narf:build
|
||||||
"M-t" 'helm-projectile-find-file
|
"M-t" 'helm-projectile-find-file
|
||||||
|
"<f9>" 'what-face
|
||||||
"A-`" 'narf-switch-to-iterm
|
"A-`" 'narf-switch-to-iterm
|
||||||
"C-`" 'narf/popup-toggle
|
"C-`" 'narf/popup-toggle
|
||||||
"C-~" 'rtog/toggle-repl
|
"C-~" 'rtog/toggle-repl
|
||||||
"<f9>" 'what-face
|
|
||||||
|
|
||||||
"M-w" 'evil-window-delete
|
"M-w" 'evil-window-delete
|
||||||
"M-W" 'delete-frame
|
"M-W" 'delete-frame
|
||||||
"M-n" (λ (switch-to-buffer (generate-new-buffer "*new*")))
|
"M-n" 'narf/new-buffer
|
||||||
"M-N" (λ (let ((nlinum-p (and (featurep 'nlinum)
|
"M-N" 'narf/new-frame
|
||||||
(memq 'nlinum--setup-window window-configuration-change-hook))))
|
|
||||||
;; Disable nlinum to fix elusive "invalid face linum" bug
|
|
||||||
(remove-hook 'window-configuration-change-hook 'nlinum--setup-window t)
|
|
||||||
(let ((frame (new-frame))
|
|
||||||
(frame-name (format "*new-%s*" (length narf-wg-frames))))
|
|
||||||
(with-selected-frame frame
|
|
||||||
(wg-create-workgroup frame-name t)
|
|
||||||
(add-to-list 'narf-wg-frames (cons frame frame-name))))
|
|
||||||
(when nlinum-p
|
|
||||||
(add-hook 'window-configuration-change-hook 'nlinum--setup-window nil t))))
|
|
||||||
|
|
||||||
;; Simpler window navigation
|
;; Simpler window navigation
|
||||||
"C-j" 'evil-window-down
|
"C-j" 'evil-window-down
|
||||||
|
@ -72,21 +61,6 @@
|
||||||
:m "M-9" (λ (narf:switch-to-workgroup-at-index 8))
|
:m "M-9" (λ (narf:switch-to-workgroup-at-index 8))
|
||||||
|
|
||||||
(:when IS-MAC
|
(:when IS-MAC
|
||||||
:ni "M-d" 'dash-at-point
|
|
||||||
|
|
||||||
;; Add animated transitions to OSX emacs
|
|
||||||
"M-w" 'evil-window-delete
|
|
||||||
"M-W" (λ (let ((data (assq (selected-frame) narf-wg-frames)))
|
|
||||||
(if data
|
|
||||||
(progn (wg-delete-workgroup (wg-get-workgroup (cdr data)))
|
|
||||||
(delete-frame (car data)))
|
|
||||||
(delete-frame))))
|
|
||||||
"M-n" (λ (switch-to-buffer (generate-new-buffer "*new*")))
|
|
||||||
|
|
||||||
;; Textmate-esque indent shift left/right
|
|
||||||
:i "M-[" (kbd "C-o m l C-o I DEL C-o ` l")
|
|
||||||
:i "M-]" (λ (evil-shift-right (point-at-bol) (point-at-eol)))
|
|
||||||
|
|
||||||
"<A-left>" 'backward-word
|
"<A-left>" 'backward-word
|
||||||
"<A-right>" 'forward-word
|
"<A-right>" 'forward-word
|
||||||
"<M-backspace>" 'narf/backward-kill-to-bol-and-indent
|
"<M-backspace>" 'narf/backward-kill-to-bol-and-indent
|
||||||
|
@ -98,7 +72,17 @@
|
||||||
"M-q" 'evil-quit-all
|
"M-q" 'evil-quit-all
|
||||||
"M-z" 'undo
|
"M-z" 'undo
|
||||||
"M-Z" 'redo
|
"M-Z" 'redo
|
||||||
"C-M-f" 'narf:toggle-fullscreen)
|
"C-M-f" 'narf:toggle-fullscreen
|
||||||
|
|
||||||
|
:ni "M-d" 'dash-at-point
|
||||||
|
|
||||||
|
;; Textmate-esque indent shift left/right
|
||||||
|
:i "M-[" (kbd "C-o m l C-o I DEL C-o ` l")
|
||||||
|
:i "M-]" (λ (evil-shift-right (point-at-bol) (point-at-eol)))
|
||||||
|
|
||||||
|
;; Restore osx text objects
|
||||||
|
:i "<A-backspace>" 'evil-delete-backward-word
|
||||||
|
:i "<A-delete>" (λ (evil-forward-word) (evil-delete-backward-word)))
|
||||||
|
|
||||||
|
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
|
@ -106,9 +90,7 @@
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
|
|
||||||
:m ";" 'evil-ex
|
:m ";" 'evil-ex
|
||||||
|
(:leader
|
||||||
;; <leader>
|
|
||||||
(:prefix ","
|
|
||||||
:nv "," (λ (if (narf/project-p) (helm-projectile-switch-to-buffer) (helm-buffers-list)))
|
:nv "," (λ (if (narf/project-p) (helm-projectile-switch-to-buffer) (helm-buffers-list)))
|
||||||
:nv "<" 'helm-buffers-list
|
:nv "<" 'helm-buffers-list
|
||||||
:nv "." 'helm-find-files
|
:nv "." 'helm-find-files
|
||||||
|
@ -116,19 +98,35 @@
|
||||||
:nv "/" 'helm-projectile-find-file
|
:nv "/" 'helm-projectile-find-file
|
||||||
:nv ";" 'helm-semantic-or-imenu
|
:nv ";" 'helm-semantic-or-imenu
|
||||||
:nv ":" 'helm-imenu-in-all-buffers
|
:nv ":" 'helm-imenu-in-all-buffers
|
||||||
|
|
||||||
:nv "]" 'helm-etags-select
|
:nv "]" 'helm-etags-select
|
||||||
:nv "a" 'helm-projectile-find-other-file
|
:nv "a" 'helm-projectile-find-other-file
|
||||||
:nv "E" (λ (in! narf-emacs-dir (helm-projectile-find-file)))
|
:nv "E" (λ (in! narf-emacs-dir (helm-projectile-find-file)))
|
||||||
:nv "m" 'helm-recentf
|
:nv "m" 'helm-recentf
|
||||||
:nv "M" 'helm-projectile-recentf ; recent PROJECT files
|
:nv "M" 'helm-projectile-recentf ; recent PROJECT files
|
||||||
:nv "p" 'helm-projectile-switch-project
|
:nv "P" 'helm-projectile-switch-project
|
||||||
:v "=" 'align-regexp
|
:v "=" 'align-regexp
|
||||||
:nv "r" 'emr-show-refactor-menu
|
:nv "r" 'emr-show-refactor-menu
|
||||||
|
:n "R" 'narf/reset-theme
|
||||||
|
|
||||||
|
:n "s" (λ (narf:yas-snippets t)) ; ido snippets dir
|
||||||
|
:n "h" 'diff-hl-diff-goto-hunk
|
||||||
|
:n "e" 'narf/flycheck-errors
|
||||||
|
:nv "p" 'helm-show-kill-ring
|
||||||
|
|
||||||
|
:n "b" 'helm-bookmarks
|
||||||
|
:n "w" 'narf:workgroup-display
|
||||||
|
:n "W" 'narf:helm-wg
|
||||||
|
|
||||||
|
:nv "n" 'narf/neotree-toggle
|
||||||
|
:nv "N" 'narf/neotree-find
|
||||||
|
:nv "t" 'narf-switch-to-iterm
|
||||||
|
:nv "l" 'narf/nlinum-toggle
|
||||||
|
:nv "\\" 'evil-emacs-state
|
||||||
|
|
||||||
:nv "qq" 'evil-save-and-quit
|
:nv "qq" 'evil-save-and-quit
|
||||||
:nv "QQ" 'narf/kill-all-buffers-do-not-remember
|
:nv "QQ" 'narf/kill-all-buffers-do-not-remember
|
||||||
|
|
||||||
|
;; Open with O/S
|
||||||
:n "oo" 'narf-open-with
|
:n "oo" 'narf-open-with
|
||||||
:n "ob" (λ (narf-open-with "Google Chrome"))
|
:n "ob" (λ (narf-open-with "Google Chrome"))
|
||||||
:n "of" (λ (narf-open-with "Finder.app" default-directory))
|
:n "of" (λ (narf-open-with "Finder.app" default-directory))
|
||||||
|
@ -140,33 +138,17 @@
|
||||||
:n "ot" (λ (narf:tmux-chdir nil t))
|
:n "ot" (λ (narf:tmux-chdir nil t))
|
||||||
:n "oT" 'narf:tmux-chdir
|
:n "oT" 'narf:tmux-chdir
|
||||||
|
|
||||||
;; Org
|
;; Org notes
|
||||||
:nv "n." (λ (in! org-directory (let ((helm-ff-skip-boring-files t)) (helm-find-files-1 org-directory))))
|
:nv "x." (λ (in! org-directory (let ((helm-ff-skip-boring-files t)) (helm-find-files-1 org-directory))))
|
||||||
:nv "n/" 'narf/helm-org
|
:nv "x/" 'narf/helm-org
|
||||||
:nv "np" 'narf/helm-org-projects
|
:nv "xp" 'narf/helm-org-projects
|
||||||
:nv "nc" 'narf/helm-org-contacts
|
:nv "xc" 'narf/helm-org-contacts
|
||||||
:nv "ni" 'narf/helm-org-invoices
|
:nv "xi" 'narf/helm-org-invoices
|
||||||
:nv "nw" 'narf/helm-org-writing)
|
:nv "xw" 'narf/helm-org-writing)
|
||||||
|
|
||||||
;; <localleader>
|
(:localleader
|
||||||
(:prefix "\\"
|
:n "\\" 'narf/neotree-toggle
|
||||||
:nv "\\" 'narf/neotree-toggle
|
:n "." 'narf/neotree-find)
|
||||||
:nv "|" 'narf-switch-to-iterm
|
|
||||||
:nv "." 'narf/neotree-find
|
|
||||||
:nv ";" 'narf/nlinum-toggle
|
|
||||||
:nv "E" 'evil-emacs-state
|
|
||||||
|
|
||||||
:n "]" 'next-buffer
|
|
||||||
:n "[" 'previous-buffer
|
|
||||||
|
|
||||||
:n "c" 'narf/reset-theme
|
|
||||||
:n "s" (λ (narf:yas-snippets t)) ; ido snippets dir
|
|
||||||
:n "g" 'diff-hl-diff-goto-hunk
|
|
||||||
:n "e" (λ (call-interactively 'flycheck-buffer) (flycheck-list-errors))
|
|
||||||
:n "p" 'helm-show-kill-ring
|
|
||||||
:n "b" 'helm-bookmarks
|
|
||||||
:n "w" 'narf:helm-wg
|
|
||||||
:n "W" 'narf:workgroup-display)
|
|
||||||
|
|
||||||
:nv "K" 'smart-up
|
:nv "K" 'smart-up
|
||||||
|
|
||||||
|
@ -195,10 +177,10 @@
|
||||||
:n "g=" 'evil-numbers/inc-at-pt
|
:n "g=" 'evil-numbers/inc-at-pt
|
||||||
:n "g-" 'evil-numbers/dec-at-pt
|
:n "g-" 'evil-numbers/dec-at-pt
|
||||||
|
|
||||||
:n "gR" 'narf:eval-buffer
|
|
||||||
:n "gc" 'evil-commentary
|
:n "gc" 'evil-commentary
|
||||||
:n "gx" 'evil-exchange
|
:n "gx" 'evil-exchange
|
||||||
:n "gr" 'narf:eval-region
|
:n "gr" 'narf:eval-region
|
||||||
|
:n "gR" 'narf:eval-buffer
|
||||||
:v "gR" 'narf:eval-region-and-replace
|
:v "gR" 'narf:eval-region-and-replace
|
||||||
:m "gl" 'avy-goto-line
|
:m "gl" 'avy-goto-line
|
||||||
:m "g]" 'smart-right
|
:m "g]" 'smart-right
|
||||||
|
@ -242,15 +224,10 @@
|
||||||
(hs-toggle-hiding)
|
(hs-toggle-hiding)
|
||||||
(call-interactively 'evilmi-jump-items)))))
|
(call-interactively 'evilmi-jump-items)))))
|
||||||
|
|
||||||
;; Restore osx text objects
|
;; Textmate-esque newlines
|
||||||
:i "<A-backspace>" 'evil-delete-backward-word
|
|
||||||
:i "<A-delete>" (λ (evil-forward-word) (evil-delete-backward-word))
|
|
||||||
|
|
||||||
;; Newline magic
|
|
||||||
:i "<backspace>" 'backward-delete-char-untabify
|
:i "<backspace>" 'backward-delete-char-untabify
|
||||||
:i "<M-backspace>" 'narf/backward-kill-to-bol-and-indent
|
:i "<M-backspace>" 'narf/backward-kill-to-bol-and-indent
|
||||||
:i "<C-return>" 'evil-ret-and-indent
|
:i "<C-return>" 'evil-ret-and-indent
|
||||||
:i "<C-SPC>" (λ (insert ", "))
|
|
||||||
|
|
||||||
;; escape from insert mode (more responsive than using key-chord-define)
|
;; escape from insert mode (more responsive than using key-chord-define)
|
||||||
:ir "j" 'narf:exit-mode-maybe
|
:ir "j" 'narf:exit-mode-maybe
|
||||||
|
@ -262,7 +239,7 @@
|
||||||
|
|
||||||
:n "!" 'rotate-word-at-point
|
:n "!" 'rotate-word-at-point
|
||||||
:v "!" 'rotate-region
|
:v "!" 'rotate-region
|
||||||
:e [escape] 'evil-normal-state
|
:e "<escape>" 'evil-normal-state
|
||||||
|
|
||||||
(:map evil-window-map ; prefix "C-w"
|
(:map evil-window-map ; prefix "C-w"
|
||||||
"u" 'narf/undo-window-change
|
"u" 'narf/undo-window-change
|
||||||
|
@ -290,6 +267,7 @@
|
||||||
|
|
||||||
;; Vim omni-complete emulation
|
;; Vim omni-complete emulation
|
||||||
:i "C-SPC" 'company-complete-common
|
:i "C-SPC" 'company-complete-common
|
||||||
|
:i "C-x C-l" 'narf/company-whole-lines
|
||||||
:i "C-x C-k" 'company-dict
|
:i "C-x C-k" 'company-dict
|
||||||
:i "C-x C-f" 'company-files
|
:i "C-x C-f" 'company-files
|
||||||
:i "C-x C-]" 'company-tags
|
:i "C-x C-]" 'company-tags
|
||||||
|
@ -313,12 +291,12 @@
|
||||||
"C-SPC" 'company-complete-common-or-cycle
|
"C-SPC" 'company-complete-common-or-cycle
|
||||||
[tab] 'narf/company-complete-common-or-complete-full
|
[tab] 'narf/company-complete-common-or-complete-full
|
||||||
"<backtab>" 'company-select-previous
|
"<backtab>" 'company-select-previous
|
||||||
[escape] 'company-abort
|
[escape] (λ (company-abort) (evil-normal-state 1))
|
||||||
"<C-return>" 'helm-company)
|
"<C-return>" 'helm-company)
|
||||||
(:map company-search-map
|
(:map company-search-map
|
||||||
"C-n" 'company-search-repeat-forward
|
"C-n" 'company-search-repeat-forward
|
||||||
"C-p" 'company-search-repeat-backward
|
"C-p" 'company-search-repeat-backward
|
||||||
[escape] 'company-abort))
|
[escape] 'company-search-abort))
|
||||||
|
|
||||||
(:after help-mode
|
(:after help-mode
|
||||||
(:map help-mode-map
|
(:map help-mode-map
|
||||||
|
@ -354,7 +332,7 @@
|
||||||
|
|
||||||
;; Restores "dumb" indentation to the tab key. This rustles a lot of
|
;; Restores "dumb" indentation to the tab key. This rustles a lot of
|
||||||
;; peoples' jimmies, apparently, but it's how I like it.
|
;; peoples' jimmies, apparently, but it's how I like it.
|
||||||
(bind! :i "<tab>" 'narf/dumb-indent
|
(map! :i "<tab>" 'narf/dumb-indent
|
||||||
:i "<C-tab>" 'indent-for-tab-command
|
:i "<C-tab>" 'indent-for-tab-command
|
||||||
|
|
||||||
;; No dumb-tab for lisp
|
;; No dumb-tab for lisp
|
||||||
|
@ -410,7 +388,7 @@
|
||||||
|
|
||||||
:map read-expression-map "C-w" 'backward-kill-word)
|
:map read-expression-map "C-w" 'backward-kill-word)
|
||||||
|
|
||||||
(bind! :i "A-o" (λ (insert "ø"))
|
(map! :i "A-o" (λ (insert "ø"))
|
||||||
:i "A-O" (λ (insert "Ø"))
|
:i "A-O" (λ (insert "Ø"))
|
||||||
|
|
||||||
:i "A--" (λ (insert "–"))
|
:i "A--" (λ (insert "–"))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue