X-Git-Url: http://www.git.stargrave.org/?a=blobdiff_plain;f=vim%2F.vim%2Fplugin%2Fwhereami.vim;h=33981349176e2fd2643be57d23443db67b86bc86;hb=1280549be01e3ce72d9e0aeef6254a1ff14a25a3;hp=29c34f99f646f43b41f65923a719ffd85cdd4fb7;hpb=8605a48acf8e07b052da8548d4eda3d37d909510;p=dotfiles.git diff --git a/vim/.vim/plugin/whereami.vim b/vim/.vim/plugin/whereami.vim index 29c34f9..3398134 100644 --- a/vim/.vim/plugin/whereami.vim +++ b/vim/.vim/plugin/whereami.vim @@ -1,15 +1,4 @@ -function! WhereAmI(fmt) - let fullpath = substitute(expand("%:p"), "/usr/home/", "/home/", "") - 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")