Skip to content

Instantly share code, notes, and snippets.

@pgilad
Created October 27, 2019 07:22
Show Gist options
  • Save pgilad/584e351b0b37d05c55ea27db95b3cb1f to your computer and use it in GitHub Desktop.
Save pgilad/584e351b0b37d05c55ea27db95b3cb1f to your computer and use it in GitHub Desktop.
Securely support `modelines` in Vim
" https://github.com/numirias/security/blob/master/doc/2019-06-04_ace-vim-neovim.md#patches
if has('patch-8.1.1366')
set modelines=5
set nomodelineexpr
set modeline
else
set nomodeline
endif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment