Fix Alignment of Split Terminal Panes

1

0

Essentially, it seems that any kind of split within terminal becomes unaligned. I'm using tmux below to demonstrate the problem, but it also occurs when I make split panes using NERDTree with vim. This is problematic because it makes the cursor pointer hard to read. I'm using linux beta for ChromeOS. How can I fix this?

Screenshot

ogbigpimpin

Posted 2019-07-24T02:52:21.400

Reputation: 11

1

The arrow in prompts on the left is wider than any other character. Your problem may be very similar to this issue. Please see if the answers there advance your research.

– Kamil Maciorowski – 2019-07-24T04:06:23.397

Answers

1

I use the same Oh My Zsh theme, by the looks of it, and have the same issue. As Kamil Maciorowski says, the ➜ character in the prompt is double-width, and hterm (the Web terminal emulator used in the ChromeOS terminal) seems to have a problem with that (see https://crbug.com/939084).

In the meantime, replacing that character in your prompt with something else will work around the issue. In our case (with the Oh My Zsh theme), I changed the first line of ~/.oh-my-zsh/themes/robbyrussell.zsh-theme to use -> instead:

# Old line: local ret_status="%(?:%{$fg_bold[green]%}➜ :%{$fg_bold[red]%}➜ )"
local ret_status="%(?:%{$fg_bold[green]%}-> :%{$fg_bold[red]%}➜ )"
PROMPT='${ret_status} %{$fg[cyan]%}%c%{$reset_color%} $(git_prompt_info)'

Harry Cutts

Posted 2019-07-24T02:52:21.400

Reputation: 121