What is "vi:set ts=8 sts=4 sw=4:" at the top of a file for?

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

What is "vi:set ts=8 sts=4 sw=4:" at the top of a file for?

Peng Yu
Hi,

In vim's source src/spell.c, I see "vi:set ts=8 sts=4 sw=4:". I'm
wondering what it is used for. Shall vim recognize it to reconfigure
vim while opening this file? Or it is merely for bookkeeping purpose?

Regards,
Peng

--
You received this message from the "vim_use" 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
Reply | Threaded
Open this post in threaded view
|

Re: What is "vi:set ts=8 sts=4 sw=4:" at the top of a file for?

Charles Campbell
Peng Yu wrote:
> Hi,
>
> In vim's source src/spell.c, I see "vi:set ts=8 sts=4 sw=4:". I'm
> wondering what it is used for. Shall vim recognize it to reconfigure
> vim while opening this file? Or it is merely for bookkeeping purpose?
>
:he modelines

Regards,
C Campbell

--
You received this message from the "vim_use" 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
Reply | Threaded
Open this post in threaded view
|

Re: What is "vi:set ts=8 sts=4 sw=4:" at the top of a file for?

Kevin O'Gorman
In reply to this post by Peng Yu
Those are modelines.
Charles is suggesting you look up the help with the
  :help modelines
command

Short form: you're right, vim recognizes them as commands if they're
near enough to the top or bottom of the file.

On Mon, Dec 10, 2012 at 7:27 AM, Peng Yu <[hidden email]> wrote:

> Hi,
>
> In vim's source src/spell.c, I see "vi:set ts=8 sts=4 sw=4:". I'm
> wondering what it is used for. Shall vim recognize it to reconfigure
> vim while opening this file? Or it is merely for bookkeeping purpose?
>
> Regards,
> Peng
>
> --
> You received this message from the "vim_use" 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



--
Kevin O'Gorman

programmer, n. an organism that transmutes caffeine into software.

--
You received this message from the "vim_use" 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