sponsor Vim development Vim logo go to HTTPS page Vim Book Ad

vim-custom-surround : Define your own surround patterns

 script karma  Rating 5/2, Downloaded by 102    Comments, bugs, improvements  Vim wiki

created by
Augusto Dantas
script type
It's a simple plugin that lets you surround the word under cursor or the current selection with custom strings.

To use it, just call one of the mode-specific commands:

    :SurroundWord <text before> <text after>
    :SurroundSelection <text before> <text after>

Or, even better, define a normal and visual mapping for the specified surround strings using the function customsurround#map. For example, to map a LaTeX inline math function just do:

     call customsurround#map('<Leader>m', '\(', '\)')

See the doc for more detailed explanations:

     :h vim-custom-surround
install details
Use your prefered plugin manager. For Vundle, add

    Plugin 'augustold/vim-custom-surround'

to your .vimrc.

rate this script Life Changing Helpful Unfulfilling 
script versions (upload new version)

Click on the package to download.

package script version date Vim version user release notes
vim-custom-surround-1.1.tar.gz 1.1 2017-04-11 7.0 Augusto Dantas Make {strafter} parameter optional.
vim-custom-surround-1.0.tar.gz 1.0 2017-04-07 7.0 Augusto Dantas Initial upload
ip used for rating:

If you have questions or remarks about this site, visit the vimonline development pages. Please use this site responsibly.
Questions about Vim should go to the maillist. Help Bram help Uganda.
SourceForge.net Logo