Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support deleting/changing custom surrounds #355

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

tomtomjhj
Copy link

Fixes #199, #210, #318, #346

I tested on these custom surrounds, and it seems to work pretty well.

let g:surround_{char2nr('c')} = "/* \r */"
let g:surround_{char2nr('m')} = "(* \r *)"
let g:surround_{char2nr('M')} = "(** \r *)"
let g:surround_{char2nr('b')} = "**\r**"
let g:surround_{char2nr('l')} = "\\begin{\1environment: \1}\r\\end{\1\r}.*\r\1}"
let g:surround_{char2nr('d')} = "<div\1id: \r..*\r id=\"&\"\1>\r</div>"

@isovector
Copy link

This PR is amazing, thanks. It's an important enough feature that I'm using your fork in place of tpope/vim-surround. Definitely worth a merge, @tpope !

@ggVGc
Copy link

ggVGc commented Jun 2, 2023

I also just ran into this, and found this solution.
Any reason to not bring it in @tpope?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Why are some matches a one way street?
3 participants