Q:

Using vim-surround for markdown

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
```

A:

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.

