I use konsole terminal emulator and I am facing an issue with changing the font size in vim.

If I add the following snippet into my .vimrc. In the vim application, the font size will snap back to the original value as seen in the gif. Note that in the video, Ctrl = binding is used to increase the font size of my terminal.

" Change cursor in the various different mode
let &t_SI = "\<Esc>]50;CursorShape=1\x7"
let &t_SR = "\<Esc>]50;CursorShape=2\x7"
let &t_EI = "\<Esc>]50;CursorShape=0\x7"
if exists('$TMUX')
  let &t_SI = "\ePtmux;\e" . &t_SI . "\e\\"
  let &t_EI = "\ePtmux;\e" . &t_EI . "\e\\"

Don't work However, once I remove the following snippet it works as intended. enter image description here

  • hmmm, managed to get it to work when i change the font size manually through the GUI, but not when I use Ctrl = binding. – keith ang Nov 5 '19 at 12:33
  • It's possible that the issue is unrelated to Vim. Have you tried sending the same escape codes outside of Vim? In bash, I think this should send the sequence you've bound to t_SI: echo -e '\e]50;CursorShape=1\x07' – Rich Nov 7 '19 at 10:01
  • Hey @Rich, thanks for helping:) yup the escape code works. In my zsh, when i echo the sequence, nothing is being shown. I've taken that snippet from vim.fandom.com/wiki/… – keith ang Nov 7 '19 at 13:56

I also have this problem. Unfortunately, I think the fault lies with Konsole.

When I open Konsole, I can click Settings-> Edit Current Profile and it correctly edits my profile. Then I send the cursor change sequence (echo to the terminal, or from vim). If the font size has been changed, it will reset as described in the question. I then again go to Settings-> Edit Current Profile, and now the profile name is empty, and there is a warning stating that it is empty.

I suspect Konsole implements the cursor change command by making an adjustment to the current profile, and fails to consider any changes you have made since originally loading that profile.

If I were running a new version of Konsole, I would be inclined to file a bug report, but I'm rather out of date. So, my answer is to update your version and file a bug report if it still happens.

While this answer isn't terribly helpful to solve the problem, I think it may at least help with diagnosis.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.