This happens on any file an even just typing "vi" whereas it never happened before. I suspect an update or environment variable is causing this issue
When entering vi I get this weird stuff
line 58:
E488: Trailing characters: t_Sbet
line 63:
E171: Missing :endif
When exiting vi I get this weird stuff
t_Sb=^[[4%?%p1%{1}%=%t4%e%p1%{3}%=%t6%e%p1%{4}%=%t1%e%p1%{6}%=%t3%e%p1%d%;m
The Solution
/etc/vim/vimrc is bad
I added an endif and also commented out a line that caused the problem and commented the "n't wake up system" portion.
#1) Backup
cp /etc/vim/vimrc /etc/vim/vimrc-bad
I am not 100% sure if this harms anything but you can always restore the old/bad file
Find line 58 and replace everything with this:
if &term=="xterm"
set t_Co=8
"set t_Sbet t_Sf
"n't wake up system with blinking cursor:
" http://www.linuxpowertop.org/known.php
let &guicursor = &guicursor . ",a:blinkon0"
endif
After setting the above I no longer get that annoying error/text. Clearly some update missed up vimrc
vi, errors, linux, mint, ubuntu, trailing, characters, t_sbet, endifthis, typing, quot, whereas, update, variable, endif, exiting, t_sb, etc, vim, vimrc, commented, portion, cp, harms, restore, xterm, t_co, t_sf, blinking, cursor, http, www, linuxpowertop, org, php, guicursor, blinkon, text,