From: Sergey Matveev Date: Tue, 14 Jul 2020 18:37:01 +0000 (+0300) Subject: Not all software accepts /usr/home path as /home X-Git-Url: http://www.git.stargrave.org/?p=dotfiles.git;a=commitdiff_plain;h=8605a48acf8e07b052da8548d4eda3d37d909510 Not all software accepts /usr/home path as /home --- 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