Using vim-surround for markdown

markdown, vim, vim-plugin

Solution

Add the following to your `~/.vim/after/ftplugin/markdown.vim` file:

let b:surround_{char2nr('r')} = "

Ruby\r

`

Select your lines of code via `V` then surround via `Sr`.

Problem

Is it possible to use vim plugin `vim-surround` to wrap markdown? For example I have code I would like to wrap ``` # ruby code here ``` with ```` ```Ruby # ruby code here ``` ````

Original source