diff options
author | Aryadev Chavali <aryadev@aryadevchavali.com> | 2021-03-24 08:36:02 +0000 |
---|---|---|
committer | Aryadev Chavali <aryadev@aryadevchavali.com> | 2021-03-24 08:36:02 +0000 |
commit | a4744bab29cca60889551669a192d2a2ea7bd6ea (patch) | |
tree | 3d0a50cab4b40f877ad4342b79996db319a0a3e4 /Emacs/.config/emacs | |
parent | cbcd4ac33005c1c6193c88f943424f94bccf958a (diff) | |
download | dotfiles-a4744bab29cca60889551669a192d2a2ea7bd6ea.tar.gz dotfiles-a4744bab29cca60889551669a192d2a2ea7bd6ea.tar.bz2 dotfiles-a4744bab29cca60889551669a192d2a2ea7bd6ea.zip |
(Emacs)~split XWidget Core: XWidget Core + XWidget Extensions
Diffstat (limited to 'Emacs/.config/emacs')
-rw-r--r-- | Emacs/.config/emacs/config.org | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/Emacs/.config/emacs/config.org b/Emacs/.config/emacs/config.org index 52cd2a3..22e4af6 100644 --- a/Emacs/.config/emacs/config.org +++ b/Emacs/.config/emacs/config.org @@ -1295,17 +1295,11 @@ capability to render full fledged web pages which include JavaScript, as it may come of use when doing web development. I can see the results of work very quickly without switching windows or workspaces. *** Xwidget Core -Define a function =+xwidget/render-file= that reads a file name and -presents it in an xwidget. If the current file is an HTML file, ask if -user wants to open current file. Bind it to =aU= in the leader. - #+begin_src emacs-lisp (use-package xwidget - :commands +xwidget/render-file :straight nil :general - (leader "au" #'xwidget-webkit-browse-url - "aU" #'+xwidget/render-file) + (leader "au" #'xwidget-webkit-browse-url) (general-def :states '(normal motion) :keymaps 'xwidget-webkit-mode-map @@ -1321,7 +1315,19 @@ user wants to open current file. Bind it to =aU= in the leader. "gu" #'xwidget-webkit-browse-url "gr" #'xwidget-webkit-reload "gg" #'xwidget-webkit-scroll-top - "G" #'xwidget-webkit-scroll-bottom) + "G" #'xwidget-webkit-scroll-bottom)) +#+end_src +*** Xwidget Extensions +Define a function =+xwidget/render-file= that reads a file name and +presents it in an xwidget. If the current file is an HTML file, ask +if user wants to open current file. Bind it to =aU= in the leader. +#+begin_src emacs-lisp +(use-package xwidget + :straight nil + :commands +xwidget/render-file + :general + (leader + "aU" #'+xwidget/render-file) :config (defun +xwidget/render-file (&optional FORCE) "Find file (or use current file) and render in xwidget." |