Skip to content
Emacs version of vim.surround
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
test
.travis.yml
Makefile
README.md
emacs-surround.el

README.md

emacs-surround

Build Status

emacs-surround is like vim.surround. This plugins provides easily change, delete and insert such surrounding in pairs.

Example

change

Press C-q "'

"Hello| world!"

Change it to

'Hello world!'

insert

Press C-q i" or C-q " <return>

Hel|lo

Change it to

"Hello"

delete

Press C-q d"

"He|llo \"world\""

Change it to

Hello \"world\"

Installation and Settings

Use cask or el-get or clone form https://github.com/ganmacs/emacs-surround.git

And add this script your .init.el

(require 'emacs-surround)
(global-set-key (kbd "C-q") 'emacs-surround)

Customize

You can use custimze pair.

For Example Add this line to your .init.el

(add-to-list 'emacs-surround-alist '("}" . ("{ " . " }")))

Now press C-q {}

[1, 2, 3].each {p |1+i}

Change it to

[1, 2, 3].each { p 1+i }
You can’t perform that action at this time.