]> Sergey Matveev's repositories - dotfiles.git/commitdiff
LLDB WhereAmI formatting
authorSergey Matveev <stargrave@stargrave.org>
Wed, 6 May 2020 14:35:06 +0000 (17:35 +0300)
committerSergey Matveev <stargrave@stargrave.org>
Wed, 6 May 2020 14:35:06 +0000 (17:35 +0300)
vim/.vim/plugin/whereami.vim

index 71367936c61dc074e9cc6a329f63b99baf00e787..99e6ed4943f9cd282bac9ea89fdb30c0f7dd5a76 100644 (file)
@@ -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>