naseeam
asked on
How do I prevent colors from changing when vim is invoked ?
Prevent color change when vim is invoked.
My computer is running Windows 10 Pro 64-bit. I connect to remote Linux Machine using telnet utility.
My shell is bash. My terminal emulator screen has black background and white foreground. I invoke vim <filename>. I exit vim and return to
my terminal. Now the terminal has changed colors. man vim doesn't have color option that will tell me how to disable color when vim is inovked.
My computer is running Windows 10 Pro 64-bit. I connect to remote Linux Machine using telnet utility.
My shell is bash. My terminal emulator screen has black background and white foreground. I invoke vim <filename>. I exit vim and return to
my terminal. Now the terminal has changed colors. man vim doesn't have color option that will tell me how to disable color when vim is inovked.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
I've never seen. Exiting vim, changing the prior term view.
:! Invokes the shell from within vim.
:q quits vim, returning back to the display you had when vim was launched.
Could you post a screen shot of
:! Invokes the shell from within vim.
:q quits vim, returning back to the display you had when vim was launched.
Could you post a screen shot of
ASKER
setting terminal to vt100 didn't make any difference.
Attached are screenshots of my telnet emulator color settings.
Also attached excel file contains screenshots of changed colors.
I think telnet terminal emulator colors change before I was experimenting with colors in vim ?
telnet_Screen_Text_white.PNG
Attached are screenshots of my telnet emulator color settings.
Also attached excel file contains screenshots of changed colors.
I think telnet terminal emulator colors change before I was experimenting with colors in vim ?
telnet_Screen_Text_white.PNG
ASKER
Remaining files are attached here.
telnet_screen_background_black.PNG
telnet_popup_text_white.PNG
telnet_popup_background_black.PNG
invoking_vim_changes_color.xlsx
telnet_screen_background_black.PNG
telnet_popup_text_white.PNG
telnet_popup_background_black.PNG
invoking_vim_changes_color.xlsx
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
changing terminal to vt100 doesn't make any difference.
Is it possible to fix this problem in telnet ?
Is it possible to fix this problem in telnet ?
unalias ls
this way directory lising will no longer be in a color scheme.
this way directory lising will no longer be in a color scheme.
export TERM=vt100 doesn't change the terminal in ANY way.....
export tells bash to export the TERM variable to teh environment strings of all programs it calls. (so a program can get it's value with getenv("TERM"). and term won't work, Term neither, spelling is case sensitive. TERM is needed.
without export the variable stay private for the shell that is running.
the vt100 part must be vt100, not Vt100 or VT100 ...
(it refers to a filename on the system in this case /etc/terminfo/v/vt100 )
Many tools use [n]cusrses /terminfo library for screen management (vi does) en vi looks for the TERM variable to determine what commands are needed for 'clearscreen()' , cursor_gotoXY(), select_reverse(), select_normal() etc.etc.
see /etc/terminfo/... and vt100 is a classic very popular terminal with a standards compliant set of commands sequences without colors.
although it had attributes like blink, reverse, underline it is fairly easy to emulate so that explains the popular choice.
export TERM=dumb might work as well, although lots of commands to clear screen or position a cursor will be lost as well.
export tells bash to export the TERM variable to teh environment strings of all programs it calls. (so a program can get it's value with getenv("TERM"). and term won't work, Term neither, spelling is case sensitive. TERM is needed.
without export the variable stay private for the shell that is running.
the vt100 part must be vt100, not Vt100 or VT100 ...
(it refers to a filename on the system in this case /etc/terminfo/v/vt100 )
Many tools use [n]cusrses /terminfo library for screen management (vi does) en vi looks for the TERM variable to determine what commands are needed for 'clearscreen()' , cursor_gotoXY(), select_reverse(), select_normal() etc.etc.
see /etc/terminfo/... and vt100 is a classic very popular terminal with a standards compliant set of commands sequences without colors.
although it had attributes like blink, reverse, underline it is fairly easy to emulate so that explains the popular choice.
export TERM=dumb might work as well, although lots of commands to clear screen or position a cursor will be lost as well.
either setup in .bashrc or on a commandline.