Skip to content

Latest commit

 

History

History
82 lines (77 loc) · 4.09 KB

20210730110313-doom_emacs.org

File metadata and controls

82 lines (77 loc) · 4.09 KB

Doom Emacs

fill-column-indicator

Source: [2021-08-28 Sat], hlissner/doom-emacs#5243 fill-column indicator module is no longer working af…

display-fill-column-indicator is built into Emacs 27.1+. To activate it add (add-hook ‘doom-first-buffer-hook #’global-display-fill-column-indicator-mode) to your config, or (add-hook! (prog-mode conf-mode text-mode) #’display-fill-column-indicator-mode) – whichever you prefer.

(if (< (rand) 0.5) '(add-hook 'doom-first-buffer-hook #'global-display-fill-column-indicator-mode) '(add-hook! (prog-mode conf-mode text-mode) #'display-fill-column-indicator-mode))
keycommandprevious
C-jnext-linenil
C-kprevious-linenil
C-wdoom/delete-backward-word
C-yrepeats-char-on-last-line
M-ypopup-kill-ring-window
M-dKill word

2021-07-10 Sat

enclosing-in-parentheses-with-vim

Smartparens - v highlight text then M-( also applied to ” “” [] {}

How to select between-brackets-or-quotes-or-in-vim

Navigate to get inside the parentheses, then y/v/c/d i ([{‘” or }])

indent-rigidly

(C-x TAB) control indent with h l H L

indent-rigidly

(C-x TAB) control indent with h l H L

[2021-07-06 Tue 10:51] Emacs Doom 06-07 - Evil snipe - Avy

Evil snipe - f/t/s char, ;/, for next/previous navigation

  • f: find char in the row
  • F: backward find
  • t: place cursor before target char in the row
  • T: t backward
  • s: find 2char in the row
  • S: s backward

Avy - g s SPC char [option] asdf(#shortcut)

  • Avy can navigate to word on another line, paragraph or window(have to enable avy-all-window var)
  • Avy can process any command on the target word (just navigate if no command given)
  • x: delete and move cursor command
  • X: delete but stay in place command
  • y: yank(copy) and paste word to the current position
  • Y: yank(copy) and paste string from word to the EOL to the current position
  • t: teleport(move) word to the current position
  • T: teleport(move) string from word to the EOL to the current position

[2021-07-06 Tue 12:58] Emacs Doom 08 - Multiple cursor in Emacs with evil-multiedit

  • M-d: highlight the next occurrence of current word/highlight(v) with new cursor
  • M-D: highlight the previous occurrence of current word/highlight(v) with new cursor
  • R: highlight all occurrences of the highlight(v) string with new cursors.
  • C-n: navigate to the next occurrence
  • C-p: navigate to the previous..
  • Enter: include/exclude the occurrence
  • beware of editing out of the boundaries, for example by delete the last word with ‘d w’ but all the cursors doesn’t cover highlights with spaces at the end of the last word which will not have the same result as the editing one.