Efraim Yawitz wrote: > On Mon, Oct 6, 2008 at 6:41 PM, Tony Mechelynck > <[EMAIL PROTECTED]> wrote: > >> On 06/10/08 13:05, Efraim Yawitz wrote: >> >>> Why doesn't the following work to make all files in a given directory >>> have a certain syntax highlighting? >>> >>> :au BufRead /some/directory set syn=somesyntax >>> >> You should set 'filetype' rather than 'syntax'. What happens is (I >> think) the following: >> > > I checked this also, and it also wasn't working. Then I realized what > the problem was. I had done a :cd (actually a :lcd) to > /some/directory and opened the file without the full path, so the > match wasn't working. When opening with the full path, set syn worked > fine. Now the question is, how do I get this match to work without > the full path? > Well, your original question has "/some/directory" in it, which presumes a full path. What portion of the path is adequate? Would au BufRead */partial/path/to/directory/* set ft=somesyntax do what you want? Or /home/userid/*/directory/* set ft=somesyntax
Regards, Chip Campbell --~--~---------~--~----~------------~-------~--~----~ You received this message from the "vim_use" maillist. For more information, visit http://www.vim.org/maillist.php -~----------~----~----~----~------~----~------~--~---
