4

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

my powerline status

tomekfranek
  • 6,852
  • 8
  • 45
  • 80

2 Answers2

3

There are two options.

Try this option:

    let g:Powerline_stl_path_style = 'short'

From the 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.
           I.e. "/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 truncated like Vim's default statusline, then you can create a theme that moves the truncation point. Try my sanity theme and see if it works better for you.

idbrii
  • 10,975
  • 5
  • 66
  • 107
0

There is currently no way to do this. I’ve missed this option somehow. There is an issue for changing the way powerline truncates path: issue 215, not to add truncation like I used to think.

ZyX
  • 52,536
  • 7
  • 114
  • 135