Enclose is a minor mode for Emacs that encloses cursor within
punctuation pairs. For example, hitting the key (
will insert ()
and place the cursor in between.
I recommend installing via ELPA, but manual installation is simple as well:
(add-to-list 'load-path "/path/to/enclose")
(require 'enclose)
Start enclose-mode
using.
(enclose-mode t)
or
M-x enclose-mode
Now try pressing any of the following keys: "
, '
, (
, {
, [
.
For more information, see comments in enclose.el
.
Contribution is much welcome! Enclose is tested using Ecukes. When adding new features, please write tests for them!
Install cask if you haven't already, then:
$ cd /path/to/enclose
$ cask
Run all tests with:
$ make