Why not use a regex for this?
:1,$s/border: 1px solid black;/\/*border: 1px solid black;\*\//
1,$s means that your substitution should be done from line 1 to line $ , which is the last line. Keep in mind that you need to avoid characters like * or / .
According to this Stackoverflow question, you can put the following in your .vimrc
vnoremap <Cr> "hy:%s/\(<Cr>h\)/\/\*\1\*\//gc<left><left><left>
Now you can visually mark the line and press ctrl + r , which will give you the correct regular expression. Now you will be asked in turn if you want to comment on this, and you can do this by pressing y .
source share