I've written a script that reimplements a restricted form of modelines as .vim code rather than internals:
http://www.vim.org/scripts/script.php?script_id=1876 It has two options that might be of use: let g:secure_modelines_allowed_items = [ \ "textwidth", "tw", \ "softtabstop", "sts", \ "tabstop", "ts", \ "shiftwidth", "sw", \ "expandtab", "et", \ "filetype", "ft", \ "foldmethod", "fdm", \ "readonly", "ro", "noreadonly", "noro" \ ] can be used to restrict which options can be set (the above is the default value). let g:secure_modelines_verbose = 0 If set to 1, warnings will be shown when a modeline attempts to set a different value. Feedback would be much appreciated. -- Ciaran McCreesh
signature.asc
Description: PGP signature