On 04/10/09 22:09, Robert H wrote:
>
> On 10/3/09 5:56 PM, caruso_g wrote:
> <snip>
>>       set ts=2 sw=2 et
>>
>> One last question. Can I set different values for different file
>> types? E.g. 4 spaces for html, 8 for php and 2 for Ruby?
>>
>
> autocmd FileType perl   :set ts=4 sw=4 et tw=78
> autocmd FileType xml    :set ts=2 sw=2
> autocmd FileType html   :set ts=2 sw=2 et tw=78
>
> Those are just examples...you can do your own.  :-)

Or rather, put them into vim-scripts in ~/.vim/after/ftplugin/ (on Unix) 
or in ~/vimfiles/after/ftplugin/ (on Windows):

--- ftplugin/perl.vim
        setlocal ts=4 sw=4 tw=78 et

--- ftplugin/xml.vim
        setlocal ts=2 sw=2 tw=0 noet

etc. (Create the files and/or directories if they don't exist yet.)

It is important to use ":setlocal" rather than ":set", to avoid changing 
the setting on other files being edited in parallel.


Best regards,
Tony.
-- 
hundred-and-one symptoms of being an internet addict:
171. You invent another person and chat with yourself in empty chat rooms.

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply via email to