Often from the first part of a program lines are copied to the down, newer part of the program. On the new location they are to be altered by editing.
Unintentionally it happens that the lines on the original location are changed.
How can I lock and make readonly the upper part of the file?
autocmd
on InsertEnter or the like and check line-number and issue a warning. Line number could for example be marked by a special comment text. Or one could perhaps give it some other syntax highlighting for normal text.