Well, as I know, vim cannot do this. The text in the vim buffer is just a string without any property that can be attached to them. Thus, "readonly" can only be for the entire buffer, but not for specific characters, although emacs is able to add text properties to allow some characters in the buffer to read only.
, - . , .
1. "setlocal buftype = nofile", , , .
2. ( )
3.edit temp buffer.
4. , "" , .
, vim, .