Skip to main content
We’ve updated our Terms of Service. A new AI Addendum clarifies how Stack Overflow utilizes AI interactions.
Code Golf

Return to Answer

deleted 38 characters in body
Source Link
nmjcman101
  • 3.7k
  • 11
  • 18

V Vim, 39 bytes

:im hello hello:se noma
:map : i
i

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

V, 39 bytes

:im hello hello:se noma
:map : i
i

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, 39 bytes

:im hello hello:se noma
:map : i
i

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
deleted 64 characters in body
Source Link
nmjcman101
  • 3.7k
  • 11
  • 18

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

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

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.

AltStyle によって変換されたページ (->オリジナル) /