Automatic box expander

Vim, 7 bytes

♥GYPjYp

where ♥ is Control-V.

           The cursor starts on the first non-whitespace character of the first line.
♥G         Enter visual block mode and go to bottom of document.
  YP       Duplicate this column.
    j      Move down to the second line of the file.
     Yp    Duplicate this line.

enter image description here


JavaScript (ES6), 57 53 52 bytes

s=>s.replace(/^.(.)/gm,s="$&$1").replace(/(\n.*)/,s)

Explanation: The first regexp duplicates the second column and the second regexp duplicates the second row, thus enlarging the box as desired. Edit: Saved 4 bytes thanks to MartinEnder♦.


Python, 49 42 bytes

Anonymous lambda:

-7 from xnor

lambda s:[t[:2]+t[1:]for t in s[:2]+s[1:]]

Previous version:

D=lambda s:s[:2]+s[1:]
lambda s:D(list(map(D,s)))

D is a function that duplicates the second item of a sequence.