Hello, Matthias-Christian Ott <[EMAIL PROTECTED]> wrote:
> Yakov Lerner wrote:
> > let script_dir=expand("<sfile>:p:h")
> Expands to the current working directory when calling it with my
> function. It was supposed to expand to the directory of the plugin.
Store the result in a script-local variable, outside functions.
=>
let s:script_dir = expand('<sfile>:p:h')
fun! s:Foo()
echo s:script_dir
endfunction
nnoremap <silent> <F1> :call <sid>Foo()<cr>
--
Luc Hermitte
