"Marius Roets" <[EMAIL PROTECTED]> 写于 2007-05-14 16:05:14:
> Hi All,
> I know this has been covered before, but I can't seem to find it by
> searching Vim tips, so please excuse me if this has been ask many times
> before.
>
> I always uses spaces to indent my code, but a current project requires
> me to use tabs. How could I make this setting only be in effect for this
> one project, assuming that the project will always be a in a specific
> directory.
>
> Thanks
> Marius

You can define autocommands to *, and check the full path of file name,
then set or unset the expandtab option. If you want to edit with spaces
while save file with tabs, then just create an event to do retab before
saving the file (check the full path first).

:h autocmd-define
:h autocmd-events

--
Sincerely, Pan, Shi Zhu. ext: 2606

Reply via email to