]> Sergey Matveev's repositories - dotfiles.git/commitdiff
Not all software accepts /usr/home path as /home
authorSergey Matveev <stargrave@stargrave.org>
Tue, 14 Jul 2020 18:37:01 +0000 (21:37 +0300)
committerSergey Matveev <stargrave@stargrave.org>
Tue, 14 Jul 2020 18:37:01 +0000 (21:37 +0300)
vim/.vim/plugin/whereami.vim

index 99e6ed4943f9cd282bac9ea89fdb30c0f7dd5a76..29c34f99f646f43b41f65923a719ffd85cdd4fb7 100644 (file)
@@ -1,8 +1,9 @@
 function! WhereAmI(fmt)
+    let fullpath = substitute(expand("%:p"), "/usr/home/", "/home/", "")
     if a:fmt == "gnu"
-        let where = expand("%:p") . ":" . line(".")
+        let where = fullpath . ":" . line(".")
     elseif a:fmt == "lldb"
-        let where = "breakpoint set --file " . expand('%:p') . " --line " . line(".")
+        let where = "breakpoint set --file " . fullpath . " --line " . line(".")
     else
         let where = "unknown fmt"
     endif