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.
LVL 1
naseeamAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

nociSoftware EngineerCommented:
export TERM=vt100

either setup in .bashrc or on a commandline.
0
Dr. KlahnPrincipal Software EngineerCommented:
There are so many linux programs that think it's clever to change colors that it's hard to nail down all of them.  It may be more practical to address the problem in the terminal emulator.

Most terminal emulators have the capability to disable color setting, or set colors to whatever color you want.  So either disable color setting, or set  all text colors to white and all background colors to black.

PuTTY color configuration
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
arnoldCommented:
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
0
Determine the Perfect Price for Your IT Services

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden with our free interactive tool and use it to determine the right price for your IT services. Download your free eBook now!

naseeamAuthor Commented:
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
0
arnoldCommented:
the display was of the windows command prompt settings.
Where does the change manifest?
Have not run into such a situation so can not say what might be going on.


Telnet is an insecure (plain text data stream) and should commonly be disabled with providing access only though an ssh client.

which telnet emulator are you using?
0
nociSoftware EngineerCommented:
That looks like the command (or CMD) window and native telnet command to me.
The preferred way for logons to unix systems (or any networked systems) is SSH (putty implements that). This is because ancient tools (Telnet, FTP, etc) from the 1970's have absolute trust in networks and transmit passwords & usernames without encryption across a network. Please covert to using ssh access protocol and forget aoubt ftp/telnet's existence as being useful.

I am still missing the 'export TERM=vt100' from the .bashrc?
what does echo $TERM show?

You may also like to use nano instead of vi.
0
naseeamAuthor Commented:
changing terminal to vt100 doesn't make any difference.

Is it possible to fix this problem in telnet ?
0
arnoldCommented:
unalias ls

this way directory lising will no longer be in a color scheme.
0
nociSoftware EngineerCommented:
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.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Linux

From novice to tech pro — start learning today.