there is guitablabel option in vim which allows one to modify tab title. But I would like to change it to some macro perhaps, which would give me titles like:
a/b/c/Filename.txt
where directories are replaced with single characters. Or anything similar would also work. Do you have any snippets or plugin tips? Thanks.
You could do something like
:set guitablabel=%{substitute(expand('%:p'),'/\\zs\\(.\\)[^/]*\\ze/','\\1','g')}This sets the
:help guitablabeloption to display the file /path/to/file.txt as /p/t/file.txt. It uses expression evaluation%{ }(documented under:help statusline) to evaluate the substitution (:help substitute()) with a pattern.