VIM syntax highlighting on SecureCRT

My SecureCRT terminal window wasn’t displaying ANSI colors which was really annoying me. To be honest I dislike procrastination and finally I have enabled ANSI colors:)

In Ubuntu installing “vim” package is sufficient I suppose. In other distributions you may have to install supplementary packages. Here are the possible steps;

1) Set your terminal to xterm or linux if xterm does not work


#export TERM=xterm

or 

#export TERM=linux

2) On SecureCRT


a) Go to Options-> Session Options -> Terminal -> Emulation menu

b) Set terminal to Xterm and select ANSI Color box.

securecrt_ansi

3) Open a file and see if highlighting is on

4) If not, type the command inside the vim editor.


:syn on

if you can see the highlighting, then add “syntax on” to your .vimrc file under your home directory to make it permanent. According to SecureCRT article, you can also add the followings to your .vimrc file

set t_Co=8
set t_Sf=\033[3%p1%dm
set t_Sb=\033[4%p1%dm
syntax on

About: rtoodtoo

Worked for more than 10 years as a Network/Support Engineer and also interested in Python, Linux, Security and SD-WAN // JNCIE-SEC #223 / RHCE / PCNSE


You have a feedback?

Discover more from RtoDto.net

Subscribe now to keep reading and get access to the full archive.

Continue reading