How to disable backspace and delete keys in Vim?

vim

Solution

You can disable individual keys by mapping them to the special `<Nop>` target:

:inoremap <BS> <Nop>
:inoremap <Del> <Nop>

(Assuming you only want them disabled in insert mode.)

Problem

I'd like to use Vim for distraction-free writing instead of PyRoom/TextRoom. This post, which mentions VimRoom, could already show me how to get most settings. I only miss how to enable TextRoom style flow mode: How can I disable backspace and delete keys (not shortcuts like d$)?

Original source

Related problems