I frequently use commands similar to this (reduced example):
"(echo 'vim: syntax=XXX'; cat somefile) | vim -R -"
This works with native modelines, does not with secure modelines.
After this fix, it works as expected:
--- securemodelines.vim.orig 2011-01-14 22:42:27.000000000 +0100
+++ securemodelines.vim 2011-01-14 22:42:09.000000000 +0100
@@ -145,6 +145,6 @@
aug SecureModeLines
au!
- au BufRead * :call <SID>DoModelines()
+ au BufRead,StdinReadPost * :call <SID>DoModelines()
aug END
I frequently use commands similar to this (reduced example): "(echo 'vim: syntax=XXX'; cat somefile) | vim -R -"
This works with native modelines, does not with secure modelines.
After this fix, it works as expected: --- securemodelines.vim.orig 2011-01-14 22:42:27.000000000 +0100 +++ securemodelines.vim 2011-01-14 22:42:09.000000000 +0100 @@ -145,6 +145,6 @@