modelines and possible bug in vi
David Monksfield
drm at tcom.stc.co.uk
Wed Nov 9 23:21:26 AEST 1988
I use vi on SunOS3.5 and ULTRIX, both of which have a "modeline"
feature which is off by default, and which I turn on in my .exrc.
If I edit a file containing a modeline using a command of the form
"vi +number file" or "vi +/string file", vi clears the screen,
prints the file name and size and then freezes permanently.
If I send an INT (ctrl/C) vi prints "Interrupt", then returns
to normal with the whole of "file" intact in its buffer.
This seems to apply with no matter which ex commands are embedded in
the file but, to give a specific example, if test.c contains the one line
/* vi:set report=6: */
and I type "vi +1 test.c", the effect occurs.
This is mainly a problem when diving into vi from a pager (eg. more
or less) since they tend to use a "vi +n" command to get to the
appropriate place in the file.
Is this a bug or am I doing something silly? We do not have
sources so I haven't been able to investigate very far.
--
Cheers, |||||||| ||||||||| |||||||| "I would prefer
||| ||| ||| something a
Dave Monksfield |||||||| ||| ||| little more
||| ||| ||| reliable than
drm at htc2,val3,lynx or |||||||| ||| |||||||| hope." -- Avon
drm at jura.tcom.stc.co.uk STC Telecommunications (Blake's 7)
More information about the Comp.unix.questions
mailing list