X-Git-Url: http://www.git.stargrave.org/?a=blobdiff_plain;f=vim%2F.vim%2Fplugin%2Fwhereami.vim;fp=vim%2F.vim%2Fplugin%2Fwhereami.vim;h=a6d53365224d2298347280a6c2f39790b9c4927e;hb=c87a6c5de579ab6ae0e5d27b233b83bab85e17f6;hp=f3a4f3c94d94c1b80b20f0f7e998e4163598f189;hpb=8d4331f8ac20bfb0f5c6ce4ea0ada9618216c6f8;p=dotfiles.git diff --git a/vim/.vim/plugin/whereami.vim b/vim/.vim/plugin/whereami.vim index f3a4f3c..a6d5336 100644 --- a/vim/.vim/plugin/whereami.vim +++ b/vim/.vim/plugin/whereami.vim @@ -1,5 +1,4 @@ -if exists("g:loaded_mein_whereami") | finish | endif -let g:loaded_mein_whereami = 1 +if exists('*pwdLoad') | finish | endif function! s:pwdLoad() let g:mein_pwdL=trim(system("pwd -L")) @@ -8,7 +7,7 @@ endfunction autocmd VimEnter * call s:pwdLoad() -function! WhereAmI(fmt) +function! s:WhereAmI(fmt) let fullpath = expand("%:p") if fullpath[:len(g:mein_pwdP)-1] ==# g:mein_pwdP let fullpath = g:mein_pwdL . fullpath[len(g:mein_pwdP):] @@ -24,5 +23,5 @@ function! WhereAmI(fmt) echomsg where endfunction -nmap w :call WhereAmI("gnu") -nmap W :call WhereAmI("lldb") +nmap w :call WhereAmI("gnu") +nmap W :call WhereAmI("lldb")