diff --git a/modules/lib/defuns-web.el b/modules/lib/defuns-web.el index e437ca7ab..f9074c083 100644 --- a/modules/lib/defuns-web.el +++ b/modules/lib/defuns-web.el @@ -14,5 +14,10 @@ "\\1" nil beg end)) +;;;###autoload +(defun narf/web-refresh-browser () + (interactive) + (call-process-shell-command "osascript -e 'tell application \"Google Chrome\" to tell the active tab of its first window to reload' &" nil 0)) + (provide 'defuns-web) ;;; defuns-web.el ends here diff --git a/modules/module-sass.el b/modules/module-sass.el index 3601c777f..b01dce6a5 100644 --- a/modules/module-sass.el +++ b/modules/module-sass.el @@ -14,6 +14,7 @@ (setq scss-compile-at-save nil) :config (bind! :map scss-mode-map + :n "M-r" 'narf/web-refresh-browser :n ",;" 'helm-css-scss :n ",:" 'helm-css-scss-multi) diff --git a/modules/module-web.el b/modules/module-web.el index 824e9e9f0..98361e103 100644 --- a/modules/module-web.el +++ b/modules/module-web.el @@ -50,7 +50,7 @@ :n "za" 'web-mode-fold-or-unfold :n ",t" 'web-mode-element-rename - :n "M-r" (λ (call-process-shell-command "osascript -e 'tell application \"Google Chrome\" to tell the active tab of its first window to reload' &" nil 0)) + :n "M-r" 'narf/web-refresh-browser :nv "]a" 'web-mode-attribute-next :nv "[a" 'web-mode-attribute-previous