首页 > Linux > debian设置vim颜色与SecureCRT颜色命令行终端颜色(彩色的文件及文件夹)

debian设置vim颜色与SecureCRT颜色命令行终端颜色(彩色的文件及文件夹)

2010年2月25日 a18ccms 发表评论 阅读评论

在debian下设置vim的颜色,需要更改vimrc这个文件,改动前请记得备份,以防修改错误。

debian:~# cp /etc/vim/vimrc /etc/vim/vimrc.bak

编辑vimrc文件

debian:~# vi /etc/vim/vimrc


按大写的G,跳跃到最后一行,添加以下代码。

set cindent
set smartindent
set hls
set nocompatible
set sw=3
set showmatch
set background=light
colorscheme desert
syntax on
set hlsearch
highlight Search term=reverse ctermbg=4 ctermfg=7
highlight Normal ctermbg=black ctermfg=white

然后设置颜色,添加以下的代码,也可以放在vimrc文件的最后面。

"highlight Comment ctermfg=Green
highlight Comment ctermfg=darkcyan
"highlight Comment ctermfg=blue

设置SecureCRT的颜色,点击”会话选项”–”仿真”–终端选择”Linux”–并且勾选ANSI

系统的文件及文件夹的颜色呢?
这时需要更改”.bashrc”这个文件,我的.bashrc文件是以下这样的..

root@debian:~# vi /root/.bashrc

# ~/.bashrc: executed by bash(1) for non-login shells.
#export PS1='\h:\w\$ '
export PS1='\[\033[1;32;40m\]\u@\h:\w\$ \[\033[0m\]'
umask 022

# You may uncomment the following lines if you want `ls' to be colorized:
 export LS_OPTIONS='--color=auto'
 eval "`dircolors`"
 alias ls='ls $LS_OPTIONS'
 alias ll='ls $LS_OPTIONS -l'
 alias l='ls $LS_OPTIONS -lA'
#
# Some more alias to avoid making mistakes:
# alias rm='rm -i'
# alias cp='cp -i'
# alias mv='mv -i'

改完要退出再登陆,就可以看到了。要是不愿意退出就运行

source /root/.bashrc #可以重读配置就不需推出session
分类: Linux 标签: , , , ,
  1. 本文目前尚无任何评论.
  1. 本文目前尚无任何 trackbacks 和 pingbacks.
注意: 评论者允许使用'@user空格'的方式将自己的评论通知另外评论者。例如, ABC是本文的评论者之一,则使用'@ABC '(不包括单引号)将会自动将您的评论发送给ABC。使用'@all ',将会将评论发送给之前所有其它评论者。请务必注意user必须和评论者名相匹配(大小写一致)。直接点击评论上方的回复实现此功能