On 8/15/06, Charles E Campbell Jr <[EMAIL PROTECTED]> wrote:
Hari Krishna Dara wrote:

>On Mon, 14 Aug 2006 at 9:43am, Charles E Campbell Jr wrote:
>
>
>
>>4mir Salihefendic wrote:
>>
>>
>>
>>>Is there a neat way to source vim files in a directory?
>>>Currently I use following solution that relies on "ls" - it's not
>>>feasible on other than Unix systems.
>>>
>>>
>>First, you could use glob() instead of system()+ls.
>>
>>Another idea: you could temporarily change the runtimepath
>>and use :runtime (not tested):
>>
>>  let keep_rtp= &rtp
>>  let &rtp= "PathToADirectory"
>>  runtime
>>  let &rtp= keep_rtp
>>
>>
>>
>Shouldn't it be more like ":runtime *.vim"?

It must be ':runtime! *.vim' actually, *with* the exclamation mark, the bang,
the !. The bang is needed when you want to source all mathcing files.
Without bang, only one matching file gets sourced.

Yakov

Reply via email to