dot-mode.el is a minor mode for GNU Emacs that emulates the ‘.’ command in vi.
This mode is written to address one argument in the emacs vs. vi jihad :-) It emulates the vi `redo’ command, repeating the immediately preceding sequence of commands. This is done by recording input commands which change the buffer, i.e. not motion commands.
Run the command
dot-mode to start
dot-mode, if you want
dot-mode to be
enabled in all buffers you can have the sexp
(global-dot-mode t) in your
There are three variables that allow you to modify how dot-mode behaves:
dot-mode-verbose dot-mode-ignore-undo dot-mode-global-mode
dot-mode-ignore-undo defaults to t.
When nil, it will record keystrokes that generate an undo just like any other
keystroke that changed the buffer. I personally find that annoying, but if you
want dot-mode to always remember your undo’s:
(setq dot-mode-ignore-undo nil)
Besides, you can always use dot-mode-override to record an undo when you need to (or even M-x undo).
dot-mode-global-mode - defaults to t.
When t, dot-mode only has one keyboard command buffer.
That means you can make a change in one buffer, switch buffers, then repeat the
When set to nil, each buffer gets its own command buffer.
That means that after making a change in a buffer, if you switch buffers, that
change cannot repeated.
If you switch back to the first buffer, your change can then be repeated again.
This has a nasty side effect if your change yanks from the
could end up yanking text you killed in a different buffer).
If you want to set this to nil, you should do so before dot-mode is activated on
Otherwise, you may end up with some buffers having a local command buffer and
others using the global one.
`C-.’ is bound to
dot-mode-execute, which executes the buffer of
stored commands as a keyboard macro.
`C-M-.’ is bound to
dot-mode-override, which will cause
to remember the next keystroke regardless of whether it
changes the buffer and regardless of the value of the
`C-c-.’ is bound to
dot-mode-copy-to-last-kbd-macro, which will
copy the current dot mode keyboard macro to the
variable. It can then be executed via
(normally bound to `C-x-e’), named via
and then inserted into your .emacs via
Installation of the development environment can be done with
Tests are written using ecukes, and can be run with
cask exec ecukes.
./testrun.sh starts an emacs instance in the environment that the
tests are run under. This instance begins with
dot-mode loaded, but not turned