Guillermo wrote: > What's the correct way to tell Vim to load a > syntax/indent/ftplugin based on a file extension?
Our tip on this is: http://vim.wikia.com/wiki/Filetype.vim The tip gives too much detail before the simple things you want to know, and incorrectly refers to %USERPROFILE% on Windows. In brief, create directories/file $HOME/.vim/filetype.vim (Unix) or $HOME/vimfiles/filetype.vim (Windows). In Vim, enter command ':echo $HOME' to see its value. ---contents--- if exists("did_load_filetypes") finish endif augroup filetypedetect au! BufNewFile,BufRead *.ps1 setf XXX au! BufNewFile,BufRead *.csv setf csv augroup END ---end--- Replace XXX with whatever the name of your file type is (I'm assuming you have such a file type, but it's not being applied to *.ps1 files). I added the *.csv line to show what it looks like with two entries (you don't need the csv line). John --~--~---------~--~----~------------~-------~--~----~ You received this message from the "vim_use" maillist. For more information, visit http://www.vim.org/maillist.php -~----------~----~----~----~------~----~------~--~---
