Yasuhiro Matsumoto wrote: > > It's just a matter of time before someone complains about the reloading > > or finds a good reason to avoid it. E.g. where autocommands are > > involved. > > > > Although modelines can also appear near the end of the file, they are > > mostly at the start. Requiring 'fenc' to be set in one of the first > > lines doesn't sound unreasonable to me. > > > > It is still sort of an exception to handle 'fenc' in a modeline this way. > > But it's probably worth it. As Tony mentioned. Doing this in Vim 7.1 > > would be a good idea. > > See from a different (may be user's) viewpoint this, it looks like you > said that modeline should be separated in two sub modes: ex. > lead_modeline and trail_modeline. And operations allowed in those two > modelines are little different. > > Is this my understanding right?
It's a compromise. Handling of 'fileencoding' in a modeline will be different anyway. Other options don't change the way a file is loaded. Another solution would be to also check the modelines at the end of the file, then the whole file needs to be reloaded. While finding a 'fenc' setting near the start of the file reloads only a small part of the file. This could be handled like finding an illegal byte in a file. Then it can be reloaded with a different encoding too. -- You can tune a file system, but you can't tuna fish -- man tunefs /// Bram Moolenaar -- [EMAIL PROTECTED] -- http://www.Moolenaar.net \\\ /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ download, build and distribute -- http://www.A-A-P.org /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///