exwm-edit
exwm-edit copied to clipboard
Edit mode for EXWM
-
Description Edit mode for [[https://github.com/ch11ng/exwm][EXWM]]
Similar to [[https://github.com/alpha22jp/atomic-chrome][atomic-chrome]]
except this package is made to work with EXWM and it works with any editable element of any app
The idea is very simple - when you invoke the edit, it simulates =C-a= + =C-c= (select all & copy), or simply =C-c= if you already have something pre-selected. Then it opens a buffer and yanks (pastes) the content so you can edit it, after you done - it grabs (now edited text) and pastes back to where it's started
[[file:howitworks.gif]]
Now that opens interesting possibilities, for example:
- when typing in ChromeDevTools console, you can initiate exwm-edit, then change major mode to whatever your favorite javascript mode is, have all the JS syntax highlighting, flycheck, etc;
- you can edit GitHub issues and wiki pages using markdown-mode and use your syntax checker and thesaurus;
- quickly modify url in browser address bar using multiple-cursors and regexp-replace things;
- edit and modify code snippets with ease in Slack;
- etc. and etc.
-
Keybindings Default keybindings are just like in Org-mode (for editing source blocks):
~C-c '~ or ~C-c C-'~ - edit
~C-c '~ or ~C-c C-c~ - finish editing
~C-c C-k~ - cancel editing
-
Customization You can use hooks to set desired mode, etc, e.g.:
#+begin_src emacs-lisp (use-package exwm-edit :config (defun ag-exwm/on-exwm-edit-compose () (spacemacs/toggle-visual-line-navigation-on) (funcall 'markdown-mode))
(add-hook 'exwm-edit-compose-hook 'ag-exwm/on-exwm-edit-compose))
#+end_src