On 11/02/09 15:41, Albie wrote:
> Ben Fritz wrote:
>> setting the 'fo' option in the filetype detection
>> (ftdetect) directory is NOT correct. It should go in ~/.vim/ftplugin/
>> {file type}.vim or ~/.vim/after/ftplugin/{file type}.vim.
>
> Ah, thanks.  Where can I find a good reference regarding what I should
> use all these directories for?  The help on ftdetect was not clearly
> indicative, but there are many directories in the Vim settings/plugin
> directory of which the function is not immediately apparent.
>

It's scattered over the help, but the Vim help on that subject is 
usually structured as "I want to do this, how can I achieve it" rather 
than "what is directory X used for". Most files and directories have 
self-explanatory names though, and your ~/.vim and ~/.vim/after (or, on 
Windows, ~/vimfiles and ~/vimfiles/after) have the same structure, as do 
the system-wide $VIM/vimfiles and $VIM/vimfiles/after.

- filetype.vim sets autocommands to detect filetypes if you use 
:filetype [plugin] [indent] on (you can also have additional scripts in 
ftdetect/*.vim).
- optwin.vim handles the options window (sourced by the :options command)
- doc/*.txt is the help
- plugin/*.vim are the global plugins (sourced at the end of startup)
- ftplugin/*.vim are the filetype-plugins (sourced at the FileType event)
- syntax/*.vim are the syntax plugin (sourced at the Syntax event)
- colors/*.vim are the colorschemes (sourced by the :colorscheme command)
- keymap/*.vim are the keymaps (sourced when you set the 'keymap' option)
- indent/*.vim are the indent plugins (sourced at the FileType event if 
you have filetype-related indenting on)
- autoload/*.vim are scripts defining functions loadable on demand 
through the autoload mechanism
- And so on.


Best regards,
Tony.
-- 
"What I've done, of course, is total garbage."
                -- R. Willard, Pure Math 430a

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

Reply via email to