Skip to content

ganmacs/emacs-surround

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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 }

About

Emacs version of vim.surround

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published