• Stars
    star
    122
  • Rank 292,031 (Top 6 %)
  • Language
    Emacs Lisp
  • License
    GNU General Publi...
  • Created over 6 years ago
  • Updated 7 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Edit mode for EXWM

Description

Edit mode for EXWM

Similar to 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

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.:

(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))