From 8605a48acf8e07b052da8548d4eda3d37d909510 Mon Sep 17 00:00:00 2001 From: Sergey Matveev Date: Tue, 14 Jul 2020 21:37:01 +0300 Subject: [PATCH] Not all software accepts /usr/home path as /home --- vim/.vim/plugin/whereami.vim | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/vim/.vim/plugin/whereami.vim b/vim/.vim/plugin/whereami.vim index 99e6ed4..29c34f9 100644 --- a/vim/.vim/plugin/whereami.vim +++ b/vim/.vim/plugin/whereami.vim @@ -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 -- 2.44.0