]> Sergey Matveev's repositories - dotfiles.git/blob - vim/.vim/plugin/whereami.vim
99e6ed4943f9cd282bac9ea89fdb30c0f7dd5a76
[dotfiles.git] / vim / .vim / plugin / whereami.vim
1 function! WhereAmI(fmt)
2     if a:fmt == "gnu"
3         let where = expand("%:p") . ":" . line(".")
4     elseif a:fmt == "lldb"
5         let where = "breakpoint set --file " . expand('%:p') . " --line " . line(".")
6     else
7         let where = "unknown fmt"
8     endif
9     let @* = where
10     echomsg where
11 endfunction
12
13 nmap <leader>w :call WhereAmI("gnu")<CR>
14 nmap <leader>W :call WhereAmI("lldb")<CR>