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
--
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Gregory H. Margo
gmargo at yahoo/com, gmail/com, pacbell/net; greg at margofamily/org
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---