-
-
Notifications
You must be signed in to change notification settings - Fork 444
Added an option 'o' for setting custom surround #97
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
base: master
Are you sure you want to change the base?
Conversation
It is sometimes nice to be able to just type in the expression rather then prepare it ahead of the time.
I love this commit, that I find extremely useful to bold the text in Markdown, by selecting text then type:
|
I like the idea, typing |
I like this idea. Typing
|
Apply tpope#97 to the auloadized version.
Apply tpope#97 to the auloadized version.
Apply tpope#97 to the autoloadized version.
Apply tpope#97 to the autoloadized version.
Seems like this is supported with 9029520 which supports custom prompts for replacement text: let g:surround_{char2nr('o')} = "\1Start with: \1\r\2End with: \2"
let g:surround_{char2nr('O')} = "\1Start with: \1\n\r\n\2End with: \2" Take your sample text and instead of
But it requires an additional trailing CR and is not dot-repeatable (you're prompted for a input again instead). It gives the flexibility to use a single replacement for surrounding text with let g:surround_{char2nr('c')} = "\1Surround with: \1\r\1\1"
let g:surround_{char2nr('C')} = "\1Surround with: \1\n\r\n\1\1" |
It is sometimes nice to be able to just type in the expression rather
then prepare it ahead of the time.
Say if you want to refactor the code for which you do not have support.
Or say you are editing github markdown and you want to encapsulate
the code in ``` tags. With this you can simply do the following:
Select the text then: