X-Git-Url: http://www.git.stargrave.org/?a=blobdiff_plain;f=vim%2F.vim%2Fplugin%2Fwhereami.vim;h=33981349176e2fd2643be57d23443db67b86bc86;hb=1280549be01e3ce72d9e0aeef6254a1ff14a25a3;hp=8c55eded5f032db1fed06e8819392f70a01c70a3;hpb=50295e8d1d1b2ab4d5514d441ba28e45e7699c55;p=dotfiles.git diff --git a/vim/.vim/plugin/whereami.vim b/vim/.vim/plugin/whereami.vim index 8c55ede..3398134 100644 --- a/vim/.vim/plugin/whereami.vim +++ b/vim/.vim/plugin/whereami.vim @@ -1,18 +1,4 @@ -if exists("g:loaded_mein_whereami") | finish | endif -let g:loaded_mein_whereami = 1 - -function! WhereAmI(fmt) - let fullpath = expand("%:p") - if a:fmt == "gnu" - let where = fullpath . ":" . line(".") - elseif a:fmt == "lldb" - let where = "breakpoint set --file " . fullpath . " --line " . line(".") - else - let where = "unknown fmt" - endif - let @* = where - echomsg where -endfunction - -nmap w :call WhereAmI("gnu") -nmap W :call WhereAmI("lldb") +if exists("*whereami#pwdLoad") | finish | endif +autocmd VimEnter * call whereami#pwdLoad() +nmap w :call whereami#do("%s:%d") +nmap W :call whereami#do("breakpoint set --file %s --line %d")