Reply to message «Re: overriding modelines», sent 01:34:02 09 May 2011, Monday by ludovicovan:
> i tried using an autocmd, but they seem to be executed before > modelines... I just now remembered one event name: BufReadPost. It is not executed after modelines, but its description contains the following lines: > When starting to edit a new buffer, after > reading the file into the buffer, before > executing the modelines. See |BufWinEnter| > for when you need to do something after > processing the modelines. So, try BufWinEnter event. Note that it may not work if modelines are processed by some plugin instead of vim 'modeline' option. Original message: > On 8 Mag, 23:19, ZyX <[email protected]> wrote: > > > is it possible to override (some) of the options set by a modeline in > > > the file i'm editing? > > > > What do you mean? > > yeah, sorry, it wasn't so clear. > > I just want to systematically ignore a given option even if it's been > set in a modeline. > I mean, i work in a project which uses modelines with an annoying > "number" option (to set line numbers) and i'd like to automatically > override it with "nonumber" whenever i open a file. > > i tried using an autocmd, but they seem to be executed before > modelines... > > thanks
signature.asc
Description: This is a digitally signed message part.
