How to trim long path to file in vim-powerline status line?

I would like to trim my path to ex: a/a/j/c/popularCategories.js .

my powerline status

+4
source share
2 answers

There are two options.

Try this option:

  let g:Powerline_stl_path_style = 'short' 

In powerline docs:

 short Display a short path. The home directory is substituted with "~", the first directory is displayed with its full name, and subsequent directories are shortened to their first letter. Ie "/home/user/foo/bar/baz.vim" becomes "~/f/b/baz.vim" and "long/relative/path/foo/bar/baz.vim becomes "long/r/p/f/b/baz.vim". 

Or, if you want the path to be truncated as the default status line of Vim, you can create a theme that moves the truncation point . Try the sanity theme and see if it works best for you.

+3
source

There is currently no way to do this. Ive somehow missed this option. There is a problem with changing the path of the channel bypass: issue 215 , so as not to add truncation, as I thought.

0
source

Source: https://habr.com/ru/post/1443302/


All Articles