The minor mode `dot-mode.el' emulates the “<kbd>.</kbd>” (redo) command of Vi (see ViAndEmacs).  It watches the changes you make to a buffer and gives you a keybinding (<kbd>C-.</kbd>) to redo those changes.  Conceptually, it is like having a macro automatically defined for the last set of changes you made.  It is maintained by RobertWyrick.

* http://wyrick.org/source/elisp/dot-mode/
* https://melpa.org/#/dot-mode

See also ViKeys.

== Integration with god-mode ==

`dot-mode' can be integrated with GodMode, emulating `vim' behavior, by enabling `dot-mode' only when `god-mode' is disabled, and repeat things after:

{{{
(defun my-god-repeat ()
  (interactive)
  (god-local-mode-pause)
  (dot-mode-execute)
  (god-local-mode-resume))

(defun my-god-turn-dot ()
  (interactive)
  (dot-mode
   (if god-local-mode -1 1)))

(add-hook 'god-local-mode-hook 'my-god-turn-dot)
(define-key god-local-mode-map (kbd "C-.") #'my-god-repeat)
}}}

----
CategoryModes CategoryModalEditing
