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$)?
Does anyone know how to map the backspace and delete keys in Vimscript? Show activity on this post. From Normal mode, you can type : then Press Ctrl+k followed by any key, and vim will tell you how to reference it. For example, from normal mode typing : then pressing Ctrl+k and pressing Backspace results in:
If your delete key terminal code is wrong, but the code for backspace is alright, you can put this in your vimrc: This works no matter what the actual code for backspace is. This is, at best, horrifically misleading.
you do that by typing stty erase and then Ctrl - V and finally press the Delete key. Hope that fixes the problem. The weird behavior is still present. Show activity on this post. All the vim settings have to be done in a file called .vimrc located in $HOME.
This may be unintentional; Vim sees CTRL-H as a backspace (because CTRL-H is the ASCII code for a backspace), so you also cannot map anything to that. You can check if there are any mappings set, and where they came from, like this: If you find a mapping you can try clearing it with: If you want to create your own emergency mapping, you could try:
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.)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With