On 31/08/10 14:23, Peter Odding wrote:
Antonio Giovanni Colombo wrote:
I like "columns" in modelines! They serve me well when I have
some text that has "long" lines, but for which I prefer
not to use "wrap" when modifying it.

Okay so it's a feature then... I just couldn't imagine this to be a
useful feature :-). That's fine though, I'll just disable modelines for
files that try to set the 'lines' and/or 'columns' options.

- Peter Odding


Utmost caution should be exercised when setting a global option via a modeline. It will affect all others buffers and windows, which won't know about it and therefore won't take appropriate countermeasures when they next come into focus; and it may have undesirable effects when run in an environment other than your usual. For instance, if someone tries to open a file, whose modeline sets 'lines' and 'columns', in a Vim instance running in a fixed-size terminal (e.g. an 80x25 "hardware-text" console), the most likely result (which I've seen happen) is that Vim won't know that the resizing didn't work, and parts of the Vim screen (including the statusline and command-line if 'lines' were increased) will be cast off the right and bottom edges of the physical screen.

I can imagine that there are uses for setting global options via modelines, but they are few, far between, and fraught with more pitfalls than is good for anyone's health and sanity. If Bram decided to totally disable global options in modelines, I for one wouldn't complain.


Best regards,
Tony.
--
"Don't tell me I'm burning the candle at both ends -- tell me where to
get more wax!!"

--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

Raspunde prin e-mail lui