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
nmjcman101
- 3.7k
- 11
- 18