I sometimes use vim for brainstorming and writing first drafts and would like to be able to temporarily disable the ability to delete or edit what I write down. Is there anyway to do this natively in vim?

  • 1
    "Disable the ability to delete or edit what your write"? You mean that you want Vim to behave as if you only had Insert mode without Backspace key?
    – Quasímodo
    Aug 1, 2020 at 12:12

1 Answer 1


You are looking for :set nomodifiable which disables any changes which you will try to do in some buffer. Look here, :h modifiable.

  • And :set modifiable! toggles between the two values; useful for key mappings: nnoremap <Leader>n :set modifiable!<CR>:set modifiable?<CR> (that second :set is to show the setting after pressing the key). Aug 1, 2020 at 9:54

Not the answer you're looking for? Browse other questions tagged or ask your own question.