On Jan 29, 12:46 pm, Matt Wozniski <[email protected]> wrote: > On 1/29/09, Samuel Ferencik wrote: > > > > > Hi, > > > I sometimes open files with names like > > display.c_bla > > I want vim to understand that whatever comes after the underscore > > should not matter in the filetype detection. > > You can take an example from filetype.vim - something like this would > probably do the trick (and I apologize in advance for the wrapping > that gmail's going to do...): > > mkdir ~/.vim/ftdetect > > echo 'au BufRead,BufNewFile *.*_* exe "doau filetypedetect BufRead " . > matchstr(expand("<afile>"), "^.*\\..*\\ze_")' > > ~/.vim/ftdetect/underscores.vim > > Something more-or-less like that should do the trick. > > ~Matt
Thanks, Matt, that solves it for me. Sam --~--~---------~--~----~------------~-------~--~----~ You received this message from the "vim_use" maillist. For more information, visit http://www.vim.org/maillist.php -~----------~----~----~----~------~----~------~--~---
