Hi,

sgp wrote:
> On Windows gvim 7.0 I want to :set complete= to a file in the same folder of 
> a syntax file
> 
> c:\path\to\syntax\syn.vim
> c:\path\to\syntax\keywords.txt
> 
> what expression can I use with :exe to achieve that? I tried adding
> 
> exe "set 
> complete=k".substitute(fnamemodify(bufname('.'),':p:h').'\keywords.txt','\\','/','g')
> 
> in syn.vim - but it doesn't work, as it yields the path of the edited file 
> not of syn.vim

  let &complete = expand('<sfile>:p:h') . '\keywords.txt'

Regards,
Jürgen

-- 
Sometimes I think the surest sign that intelligent life exists elsewhere
in the universe is that none of it has tried to contact us.     (Calvin)

Reply via email to