On Sun, Sep 20, 2009 at 3:58 AM, Gregory Margo <[email protected]> wrote:
> > On Sun, Sep 20, 2009 at 03:02:57AM +0800, Steven Woody wrote: > > Hi, > > My c project has a directory structure that puts all global header files > in > > a separate directory 'Include', so I want to set the 'path' variable in > vim > > to something like 'set path=.,Include', but I only want to do this for > the > > specific project, for other projects, the path may be set other ways. > How > > do I do this with vim? > > Here's how I set custom options on a per project basis. > Generalize by creating different functions for different projects. > > > " ----- Local Buffer options for XXX Project ----- > function! ProjectOptions() > setlocal path=.,Include > endfunction > > augroup MyBufferOptions > autocmd! > autocmd BufNewFile,BufReadPost /directory/path/to/project/* call > ProjectOptions() > augroup END > Thank you, this is nice! -- Life is the only flaw in an otherwise perfect nonexistence -- Schopenhauer narke public key at http://subkeys.pgp.net:11371 ([email protected]) --~--~---------~--~----~------------~-------~--~----~ You received this message from the "vim_use" maillist. For more information, visit http://www.vim.org/maillist.php -~----------~----~----~----~------~----~------~--~---
