1 if exists("g:loaded_mein_whereami") | finish | endif
2 let g:loaded_mein_whereami = 1
5 let g:mein_pwdL=trim(system("pwd -L"))
6 let g:mein_pwdP=trim(system("pwd -P"))
9 autocmd VimEnter * call s:pwdLoad()
11 function! WhereAmI(fmt)
12 let fullpath = expand("%:p")
13 if fullpath[:len(g:mein_pwdP)-1] ==# g:mein_pwdP
14 let fullpath = g:mein_pwdL . fullpath[len(g:mein_pwdP):]
17 let where = fullpath . ":" . line(".")
18 elseif a:fmt == "lldb"
19 let where = "breakpoint set --file " . fullpath . " --line " . line(".")
21 let where = "unknown fmt"
27 nmap <leader>w :call WhereAmI("gnu")<CR>
28 nmap <leader>W :call WhereAmI("lldb")<CR>