you don’t need “minutes” to do this job. with choosing a vim block ctrl-vwith I or cand r (replace)you could do it pretty easily. However, if you need to do this 100 times a day, this little function can help you:
let g:wrap_char = '#'
function! WrapThem() range
let lines = getline(a:firstline,a:lastline)
let maxl = 0
for l in lines
let maxl = len(l)>maxl? len(l):maxl
endfor
let h = repeat(g:wrap_char, maxl+4)
for i in range(len(lines))
let ll = len(lines[i])
let lines[i] = g:wrap_char . ' ' . lines[i] . repeat(' ', maxl-ll) . ' ' . g:wrap_char
endfor
let result = [h]
call extend(result, lines)
call add(result,h)
execute a:firstline.','.a:lastline . ' d'
let s = a:firstline-1<0?0:a:firstline-1
call append(s, result)
endfunction
specify this file, note that
g:wrap_charyou can set any char for your border, here I used #.- you can visually select strings and wrap them with char
- you can specify a range on the command line by calling the function
- you could create your own command as a shell of this function or create mappings
A small demonstration:

source
share