V Vim, 39 bytes
:im hello hello:se noma
:map : i
i
:im hello "Remap 'hello' in insert mode to
hello "write hello, then hit escape
:se noma "then set the buffer to not-modifiable
:map : i "THEN remap ':' to 'i' so that can't be changed
i "enter insert mode and await an infinite stream of input
V, 39 bytes
:im hello hello:se noma
:map : i
i
:im hello "Remap 'hello' in insert mode to
hello "write hello, then hit escape
:se noma "then set the buffer to not-modifiable
:map : i "THEN remap ':' to 'i' so that can't be changed
i "enter insert mode and await an infinite stream of input
Vim, 39 bytes
:im hello hello:se noma
:map : i
i
:im hello "Remap 'hello' in insert mode to
hello "write hello, then hit escape
:se noma "then set the buffer to not-modifiable
:map : i "THEN remap ':' to 'i' so that can't be changed
i "enter insert mode and await an infinite stream of input
VimV, 3739 bytes
:im hello hello:se noma|mapnoma
:map : i
i
This maps "hello" in insert mode to write hello, escape insert mode, set the buffer to nonmodifiable, and remap ':' to 'i' (now essentially a no-op) so that the buffer cannot be made modifiable again. Then enters insert mode to await an infinite stream of incoming (printable ascii + newline) characters.Try it online!
:im hello "Remap 'hello' in insert mode to
hello "write hello, then hit escape
:se noma "then set the buffer to not-modifiable
:map : i "THEN remap ':' to 'i' so that can't be changed
i "enter insert mode and await an infinite stream of input
Vim, 37 bytes
:im hello hello:se noma|map : i
i
This maps "hello" in insert mode to write hello, escape insert mode, set the buffer to nonmodifiable, and remap ':' to 'i' (now essentially a no-op) so that the buffer cannot be made modifiable again. Then enters insert mode to await an infinite stream of incoming (printable ascii + newline) characters.
V, 39 bytes
:im hello hello:se noma
:map : i
i
:im hello "Remap 'hello' in insert mode to
hello "write hello, then hit escape
:se noma "then set the buffer to not-modifiable
:map : i "THEN remap ':' to 'i' so that can't be changed
i "enter insert mode and await an infinite stream of input
Vim, 37 bytes
:im hello hello:se noma|map : i
i
This maps "hello" in insert mode to write hello, escape insert mode, set the buffer to nonmodifiable, and remap ':' to 'i' (now essentially a no-op) so that the buffer cannot be made modifiable again. Then enters insert mode to await an infinite stream of incoming (printable ascii + newline) characters.