From: Sergey Matveev <stargrave@stargrave.org>
Date: Wed, 6 May 2020 14:35:06 +0000 (+0300)
Subject: LLDB WhereAmI formatting
X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=6cb2c2da2d54fc4423697e5b6b9f6459dd9b9dad;p=dotfiles.git

LLDB WhereAmI formatting
---

diff --git a/vim/.vim/plugin/whereami.vim b/vim/.vim/plugin/whereami.vim
index 7136793..99e6ed4 100644
--- a/vim/.vim/plugin/whereami.vim
+++ b/vim/.vim/plugin/whereami.vim
@@ -1,7 +1,14 @@
-function! WhereAmI()
-    let where = expand('%:p') . ":" . line('.')
+function! WhereAmI(fmt)
+    if a:fmt == "gnu"
+        let where = expand("%:p") . ":" . line(".")
+    elseif a:fmt == "lldb"
+        let where = "breakpoint set --file " . expand('%:p') . " --line " . line(".")
+    else
+        let where = "unknown fmt"
+    endif
     let @* = where
     echomsg where
 endfunction
 
-nmap <leader>w :call WhereAmI()<CR>
+nmap <leader>w :call WhereAmI("gnu")<CR>
+nmap <leader>W :call WhereAmI("lldb")<CR>