edkolev / promptline.vim

Generate a fast shell prompt with powerline symbols and airline colors
MIT License
623 stars 54 forks source link

Is promptline smart enough to know about its size? #82

Open ghost opened 4 years ago

ghost commented 4 years ago

I have noticed that if I have a repository in version control and the upper directory names + the branch name are long enough - the shell prompt just gets ruined and doesn't show up on screen. Sometimes all I see is just <.

Does promptline know when this happens (by taking into account terminal width) and can it do anything to dynamically shorten displayed items so it fits?

For example: I am happy with current behavior as long as I see the prompt line. If it gets too big as I navigate deeper, I'd like promptline to show a shorter version of cwd or not show it at all if it can't fit. Cwd in prompt is handy, but when I'm inside a repository, I'd like to see the branch name (highest priority) and the user name (if both fit), then cwd (eventually in shortened form, so it fits on screen).