Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Minor mode for Emacs that deals with parens pairs and tries to be smart about it.
Emacs Lisp Cucumber Makefile
Latest commit 8fe439d @Fuco1 Merge pull request #539 from Wilfred/ignore_trailing_colons
When slurping forward, don't include punctuation at end of line.


MELPA MELPA Stable Build Status Gratipay Paypal logo

Smartparens is minor mode for Emacs that deals with parens pairs and tries to be smart about it. It started as a unification effort to combine functionality of several existing packages in a single, compatible and extensible way to deal with parentheses, delimiters, tags and the like. Some of these packages include autopair, textmate, wrap-region, electric-pair-mode, paredit and others. With the basic features found in other packages it also brings many improvements as well as completely new features. Here's a highlight of some features, for a complete list and detailed documentation look in the manual.

Rommel Martinez wrote a shortish introduction with worked examples, for the complete documentation visit the documentation wiki.

Default configuration

Smartparens provides many options to customize most aspects of its working. After loading smartparens.el, you can customize many of these options using the customization interface: M-x customize-group RET smartparens RET. Smartparens also ships with additional recommended (default) configuration, which is separated in file smartparens-config.el to make the maintenance easier. If you wish to load the default configuration, add:

(require 'smartparens-config)

in your configuration files (e.g. init.el) to load it. There are also files with additional configuration for specific modes, such as smartparens-latex.el or smartparens-ruby.el. You can load them the same way as the default config file. Note however that the smartparens-config.el file will auto-load all the mode-specific customizations. It is a good idea to require this file if you are a new user, and later add or remove the options you don't like.

Note: smartparens-config automatically loads the core smartparens files, so you don't have to require those separately.


Smarparens uses ert-runner for testing. To run all the tests, run:

$ make test

Alternatively, you can open the individual files in Emacs, then M-x eval-buffer M-x ert.

There are also some ecukes tests, but these are deprecated.

Support the project

If you want to support this project, you can do it in the following ways:

  • Contribute code. If you have an idea that is not yet implemented and will benefit smartparens, feel free to implement it and submit a pull request. If you have any concerns whether your contribution will be accepted, ask beforehand. You can email the author or start an issue on the tracker.
  • Contribute ideas. Even if you can't code Emacs LISP, you can still contribute valuable ideas for other programmers to implement. Simply start new issue on the tracker and submit your suggestion.
  • You can make a financial donation through PayPal. If you like smartparens or want a specific feature to be implemented and can spare a modest amount on a donation, feel free to do so. Regardless of the donations, smartparens will always be free both as in beer and as in speech.
Something went wrong with that request. Please try again.