Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/agzam/exwm-edit
Edit mode for EXWM
https://github.com/agzam/exwm-edit
emacs exwm linux melpa window-manager
Last synced: 3 months ago
JSON representation
Edit mode for EXWM
- Host: GitHub
- URL: https://github.com/agzam/exwm-edit
- Owner: agzam
- License: gpl-3.0
- Created: 2018-05-16T06:17:29.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2024-04-18T21:50:15.000Z (7 months ago)
- Last Synced: 2024-06-17T20:01:57.072Z (5 months ago)
- Topics: emacs, exwm, linux, melpa, window-manager
- Language: Emacs Lisp
- Size: 589 KB
- Stars: 121
- Watchers: 6
- Forks: 11
- Open Issues: 2
-
Metadata Files:
- Readme: readme.org
- Changelog: changelog.org
- License: LICENSE
Awesome Lists containing this project
README
* 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 appThe 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.* Customization
In your ~init.el~ file, put the following ~use-package~ declaration before
the call to ~exwm-enable~, since adjustments to ~exwm-input-global-keys~
only take effect before EXWM is enabled.#+begin_src emacs-lisp
(use-package exwm-edit
:config
;; Edit text in an *exwm-edit* buffer
(add-to-list 'exwm-input-global-keys '([?\C-c ?\'] . exwm-edit--compose))
(add-to-list 'exwm-input-global-keys '([?\C-c ?\'] . exwm-edit--compose));; You can use hooks to, e.g., set desired mode:
(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* Keybindings
In the ~*exwm-edit*~ buffer, you can use ~C-c '~, ~C-c C-'~, ~C-c C-c~, or
whatever key you have bound to ~save-buffer~ to insert the buffer
contents into the X program. To discard the contents of the
~*exwm-edit*~ buffer and go back to the X program, press ~C-c C-k~.* Changelog
** v0.0.4-pre
Nothing new yet...
** v0.0.3
- Autoload ~exwm-edit--compose~ and ~exwm-edit--compose-minibuffer~
- Just loading ~exwm-edit~ no longer binds any keys
- Window display now uses standard ~display-buffer~ actions.
Customize ~exwm-edit-display-buffer-action~ instead of
~exwm-edit-split~.
- Require Emacs 27.1 or later
- Bug fixes