diff options
author | Aryadev Chavali <aryadev@aryadevchavali.com> | 2022-08-12 21:22:31 +0100 |
---|---|---|
committer | Aryadev Chavali <aryadev@aryadevchavali.com> | 2022-09-14 00:45:42 +0100 |
commit | 1a45eebceafd5cef4e45d733ee652dc15527cead (patch) | |
tree | 0ec49650150f40eae21d48c680c1b7fcfcfc0def /Emacs/.config | |
parent | 1ed167c747ed024f426c37c55a13afa039e2c04e (diff) | |
download | dotfiles-1a45eebceafd5cef4e45d733ee652dc15527cead.tar.gz dotfiles-1a45eebceafd5cef4e45d733ee652dc15527cead.tar.bz2 dotfiles-1a45eebceafd5cef4e45d733ee652dc15527cead.zip |
(Emacs)+transpose prefix
Transposing objects? Pretty cool Emacs, but I'd like it in vim.
Diffstat (limited to 'Emacs/.config')
-rw-r--r-- | Emacs/.config/emacs/config.org | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/Emacs/.config/emacs/config.org b/Emacs/.config/emacs/config.org index 53039cb..c5d27c9 100644 --- a/Emacs/.config/emacs/config.org +++ b/Emacs/.config/emacs/config.org @@ -298,13 +298,14 @@ However there are many other packages surrounding evil that port even greater functionality from vi to Emacs. Surround, commenting, multiple cursors and further support to other packages are configured here. -*** Evil Core +*** Evil core Setup the evil package, with some opinionated keybindings: -- Switch =evil-upcase= and =evil-downcase= because I use =evil-upcase= +- Switch ~evil-upcase~ and ~evil-downcase~ because I use ~evil-upcase~ more -- Switch =evil-goto-mark= and =evil-goto-mark-line= as I'd rather have +- Switch ~evil-goto-mark~ and ~evil-goto-mark-line~ as I'd rather have the global one closer to the home row +- Use 'T' character as an action for transposing objects #+begin_src emacs-lisp (use-package evil :demand t @@ -318,17 +319,22 @@ Setup the evil package, with some opinionated keybindings: "`" #'evil-goto-mark-line "C-w" #'evil-window-map "gu" #'evil-upcase - "gU" #'evil-downcase) - (general-def - :states 'visual + "gU" #'evil-downcase + "T" nil) + (nmmap + :infix "T" + "w" #'transpose-words + "c" #'transpose-chars + "s" #'transpose-sentences + "p" #'transpose-paragraphs + "e" #'transpose-sexps + "l" #'transpose-lines) + (vmap :keymaps '(emacs-lisp-mode-map lisp-interaction-mode-map) "gr" #'eval-region) (leader "w" #'evil-window-map "wd" #'delete-frame) - (vmap - :keymaps '(emacs-lisp-mode-map lisp-interaction-mode-map) - "gr" #'eval-region) :init (setq evil-want-keybinding nil evil-split-window-below t |