General clean up
This commit is contained in:
parent
d586cb10b8
commit
718f7d106d
4 changed files with 37 additions and 23 deletions
|
@ -10,8 +10,8 @@
|
||||||
;; sane trackpad/mouse scroll settings
|
;; sane trackpad/mouse scroll settings
|
||||||
mac-redisplay-dont-reset-vscroll t
|
mac-redisplay-dont-reset-vscroll t
|
||||||
mac-mouse-wheel-smooth-scroll nil
|
mac-mouse-wheel-smooth-scroll nil
|
||||||
mouse-wheel-scroll-amount '(5 ((shift) . 2)) ;; one line at a time
|
mouse-wheel-scroll-amount '(5 ((shift) . 2)) ; one line at a time
|
||||||
mouse-wheel-progressive-speed nil ;; don't accelerate scrolling
|
mouse-wheel-progressive-speed nil ; don't accelerate scrolling
|
||||||
|
|
||||||
;;; NOTE Meaningless to railwaycat's emacs-mac build
|
;;; NOTE Meaningless to railwaycat's emacs-mac build
|
||||||
;; Curse Lion and its sudden but inevitable fullscreen mode!
|
;; Curse Lion and its sudden but inevitable fullscreen mode!
|
||||||
|
@ -41,7 +41,10 @@
|
||||||
(defun track-mouse (e))
|
(defun track-mouse (e))
|
||||||
(setq mouse-sel-mode t))
|
(setq mouse-sel-mode t))
|
||||||
|
|
||||||
;; OSX Related Plugins ;;;;;;;;;;;;;;;;;
|
|
||||||
|
;;
|
||||||
|
;; OSX-related plugins + hacks
|
||||||
|
;;
|
||||||
|
|
||||||
(use-package dash-at-point
|
(use-package dash-at-point
|
||||||
:commands (dash-at-point dash-at-point-with-docset dash-at-point-run-search dash-at-point-guess-docset)
|
:commands (dash-at-point dash-at-point-with-docset dash-at-point-run-search dash-at-point-guess-docset)
|
||||||
|
@ -49,8 +52,6 @@
|
||||||
(defmacro define-docset! (mode docset)
|
(defmacro define-docset! (mode docset)
|
||||||
`(add-hook! ,mode (setq dash-at-point-docset ,docset))))
|
`(add-hook! ,mode (setq dash-at-point-docset ,docset))))
|
||||||
|
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
||||||
|
|
||||||
(after! evil
|
(after! evil
|
||||||
;; On OSX, stop copying each visual state move to the clipboard:
|
;; On OSX, stop copying each visual state move to the clipboard:
|
||||||
;; https://bitbucket.org/lyro/evil/issue/336/osx-visual-state-copies-the-region-on
|
;; https://bitbucket.org/lyro/evil/issue/336/osx-visual-state-copies-the-region-on
|
||||||
|
@ -59,7 +60,10 @@
|
||||||
(defadvice evil-visual-update-x-selection (around clobber-x-select-text activate)
|
(defadvice evil-visual-update-x-selection (around clobber-x-select-text activate)
|
||||||
(unless (or (featurep 'mac) (featurep 'ns)) ad-do-it)))
|
(unless (or (featurep 'mac) (featurep 'ns)) ad-do-it)))
|
||||||
|
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
||||||
|
;;
|
||||||
|
;; OS-integration
|
||||||
|
;;
|
||||||
|
|
||||||
(defun narf-open-with (&optional app-name path)
|
(defun narf-open-with (&optional app-name path)
|
||||||
"Send PATH to APP-NAME on OSX."
|
"Send PATH to APP-NAME on OSX."
|
||||||
|
@ -99,9 +103,12 @@
|
||||||
(narf-switch-to-iterm))
|
(narf-switch-to-iterm))
|
||||||
|
|
||||||
;; Open with external programs
|
;; Open with external programs
|
||||||
(require 'openwith)
|
(use-package openwith
|
||||||
(openwith-mode t)
|
:config
|
||||||
(setq openwith-associations '(("\\.\\(pdf\\|jpe?g\\|gif\\|docx?\\|pptx?\\|xlsx?\\|zip\\|tar\\(\\.gz\\)?\\|rar\\)$" "open" (file))))
|
(openwith-mode t)
|
||||||
|
(setq openwith-associations
|
||||||
|
'(("\\.\\(pdf\\|jpe?g\\|gif\\|docx?\\|pptx?\\|xlsx?\\|zip\\|tar\\(\\.gz\\)?\\|rar\\)$"
|
||||||
|
"open" (file)))))
|
||||||
|
|
||||||
(provide 'core-os-osx)
|
(provide 'core-os-osx)
|
||||||
;;; core-os-osx.el ends here
|
;;; core-os-osx.el ends here
|
||||||
|
|
|
@ -1,5 +1,11 @@
|
||||||
;;; core-popup.el --- taming stray windows
|
;;; core-popup.el --- taming stray windows
|
||||||
|
|
||||||
|
;; The following is a whole slew of hackery to get Emacs to treat 'pop-up' windows in a
|
||||||
|
;; sane and "modern" way (whatever that means). It goes through great lengths to tame
|
||||||
|
;; helm, flycheck, help buffers--*even* the beast that is org-mode.
|
||||||
|
;;
|
||||||
|
;; Be warned, any of this may break as their respective packages update!
|
||||||
|
|
||||||
(use-package shackle
|
(use-package shackle
|
||||||
:config
|
:config
|
||||||
(shackle-mode 1)
|
(shackle-mode 1)
|
||||||
|
@ -157,7 +163,6 @@
|
||||||
;; I let `narf|quickrun-after-run' handle scrolling, so quickrun shouldn't have to!
|
;; I let `narf|quickrun-after-run' handle scrolling, so quickrun shouldn't have to!
|
||||||
(advice-add 'quickrun/recenter :override 'ignore))
|
(advice-add 'quickrun/recenter :override 'ignore))
|
||||||
|
|
||||||
|
|
||||||
(after! repl-toggle
|
(after! repl-toggle
|
||||||
(map! :map repl-toggle-mode-map
|
(map! :map repl-toggle-mode-map
|
||||||
"ESC ESC" 'narf/popup-close))
|
"ESC ESC" 'narf/popup-close))
|
||||||
|
|
|
@ -64,14 +64,14 @@
|
||||||
|
|
||||||
;; Fix display of certain unicode characters
|
;; Fix display of certain unicode characters
|
||||||
(mapc (lambda (set)
|
(mapc (lambda (set)
|
||||||
(let ((font (car set))
|
(let ((font (car set))
|
||||||
(chars (cadr set))
|
(chars (cadr set))
|
||||||
(size (caddr set)))
|
(size (caddr set)))
|
||||||
(mapc (lambda (x) (set-fontset-font
|
(mapc (lambda (x) (set-fontset-font
|
||||||
"fontset-default" `(,x . ,x)
|
"fontset-default" `(,x . ,x)
|
||||||
(font-spec :name font :size size) nil 'prepend))
|
(font-spec :name font :size size) nil 'prepend))
|
||||||
chars)))
|
chars)))
|
||||||
'(("DejaVu Sans" (?☑ ?☐ ?✍ ?⚠ ?★ ?λ
|
'(("DejaVu Sans" (?☑ ?☐ ?⚠ ?★ ?λ ?♭ ?♯
|
||||||
?➊ ?➋ ?➌ ?➍ ?➎ ?❻ ?➐ ?➑ ?➒ ?➓))
|
?➊ ?➋ ?➌ ?➍ ?➎ ?❻ ?➐ ?➑ ?➒ ?➓))
|
||||||
;; File attachment symbols (for org-mode)
|
;; File attachment symbols (for org-mode)
|
||||||
("FontAwesome" (? ? ? ? ? ? ? ? ?) 13)
|
("FontAwesome" (? ? ? ? ? ? ? ? ?) 13)
|
||||||
|
@ -105,9 +105,12 @@
|
||||||
(add-hook! help-mode 'narf|hide-mode-line)
|
(add-hook! help-mode 'narf|hide-mode-line)
|
||||||
|
|
||||||
;; Highlight TODO/FIXME/NOTE tags
|
;; Highlight TODO/FIXME/NOTE tags
|
||||||
(defface narf-todo-face '((t (:inherit font-lock-warning-face))) "Face for TODOs")
|
(defface narf-todo-face '((t (:inherit font-lock-warning-face)))
|
||||||
(defface narf-fixme-face '((t (:inherit font-lock-warning-face))) "Face for FIXMEs")
|
"Face for TODOs")
|
||||||
(defface narf-note-face '((t (:inherit font-lock-warning-face))) "Face for NOTEs")
|
(defface narf-fixme-face '((t (:inherit font-lock-warning-face)))
|
||||||
|
"Face for FIXMEs")
|
||||||
|
(defface narf-note-face '((t (:inherit font-lock-warning-face)))
|
||||||
|
"Face for NOTEs")
|
||||||
(add-hook! (prog-mode emacs-lisp-mode)
|
(add-hook! (prog-mode emacs-lisp-mode)
|
||||||
(font-lock-add-keywords nil '(("\\<\\(TODO\\((.+)\\)?:?\\)" 1 'narf-todo-face prepend)
|
(font-lock-add-keywords nil '(("\\<\\(TODO\\((.+)\\)?:?\\)" 1 'narf-todo-face prepend)
|
||||||
("\\<\\(FIXME\\((.+)\\)?:?\\)" 1 'narf-fixme-face prepend)
|
("\\<\\(FIXME\\((.+)\\)?:?\\)" 1 'narf-fixme-face prepend)
|
||||||
|
@ -126,8 +129,11 @@
|
||||||
|
|
||||||
(use-package rainbow-delimiters
|
(use-package rainbow-delimiters
|
||||||
:commands rainbow-delimiters-mode
|
:commands rainbow-delimiters-mode
|
||||||
:init (add-hook! (emacs-lisp-mode lisp-mode js2-mode scss-mode) 'rainbow-delimiters-mode)
|
:init
|
||||||
:config (setq rainbow-delimiters-max-face-count 4))
|
(add-hook! (emacs-lisp-mode lisp-mode js2-mode scss-mode)
|
||||||
|
'rainbow-delimiters-mode)
|
||||||
|
:config
|
||||||
|
(setq rainbow-delimiters-max-face-count 4))
|
||||||
|
|
||||||
(use-package rainbow-mode :defer t
|
(use-package rainbow-mode :defer t
|
||||||
:init
|
:init
|
||||||
|
|
|
@ -1,14 +1,10 @@
|
||||||
;;; defuns-workgroup.el
|
;;; defuns-workgroup.el
|
||||||
|
|
||||||
;;;###autoload
|
|
||||||
|
|
||||||
;;;###autoload
|
;;;###autoload
|
||||||
(defun narf/wg-projectile-switch-project ()
|
(defun narf/wg-projectile-switch-project ()
|
||||||
(let ((workgroup-name (file-name-nondirectory (directory-file-name (narf/project-root)))))
|
(let ((workgroup-name (file-name-nondirectory (directory-file-name (narf/project-root)))))
|
||||||
(wg-create-workgroup workgroup-name t)
|
(wg-create-workgroup workgroup-name t)
|
||||||
(helm-projectile-find-file)
|
(helm-projectile-find-file)))
|
||||||
;; TODO narf/workgroup-display?
|
|
||||||
))
|
|
||||||
|
|
||||||
;;;###autoload (autoload 'narf:save-session "defuns-workgroup" nil t)
|
;;;###autoload (autoload 'narf:save-session "defuns-workgroup" nil t)
|
||||||
(evil-define-command narf:save-session (&optional bang session-name)
|
(evil-define-command narf:save-session (&optional bang session-name)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue