| Bytes | Lang | Time | Link |
|---|---|---|---|
| nan | 241129T000045Z | Codemonk | |
| 005 | 5 bytes | 180419T202235Z | b_jonas |
| nan | 150402T132322Z | Nejc | |
| nan | 111130T214024Z | saeedn | |
| 000 | 0 | 111130T000158Z | ratchet |
:!rm -rf⏎
I've not explicitly prevented you hitting u afterwards, but I wish you luck with that 😁
5 bytes:
:bd!
followed by a press of enter.
Throws away the current state of the file you're editing from memory, so all unsaved changes in that file are lost. If you have other files open, they are not affected. This does not quit vim even if you have only one file open.
:set ul=-1
:%s///g
:r!head -c1G</dev/urandom
:w
- Disables undo
- Deletes characters
- Reads 1G of data from /dev/urandom
- Saves
Bending the rules, because I am adding characters (a character that isn't there and now is, means a character was changed). I can add as much characters as I want so this score is theoretically infinite.
:set ul=-1
ggdG
:w
This clears contents of file and saves it. No undo is possible because undolevel is set to a negative number, which disables undo operation.
Edit: It's better to write :g/^/d instead of ggdG, because in the latter case you can use p (put) to roll-back the changes.
: 0,0 w
:r
ruins everything no undo