nanjigen / exwm-edit

Edit mode for EXWM

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

About

Edit mode for EXWM

License:GNU General Public License v3.0


Languages

Language:Emacs Lisp 100.0%