Skip to content

Instantly share code, notes, and snippets.

@tecywiz121
Created October 26, 2017 18:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tecywiz121/e427a0b002455263a90fad615e369b5f to your computer and use it in GitHub Desktop.
Save tecywiz121/e427a0b002455263a90fad615e369b5f to your computer and use it in GitHub Desktop.
Sequence of commands demonstrating loss of nomodifiable
let my_buf=bufnr('banana', 1)
call nvim_buf_set_lines(my_buf, 0, 0, v:true, ['this is a line'])
call nvim_buf_set_option(my_buf, 'modifiable', v:false)
execute ":buffer " . my_buf
execute "normal! oTyped after modifiable=False\<esc>"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment