Archlinux安装vim并配置颜色

Archlinux安装vim跟安装其他软件类似,仅需执行如下命令即可:

pacman -S vim


之后修改一下两个文件: /etc/profile 以及 /etc/vimrc

修改后的 profile文件如下:

# /etc/profile

#Set our umask
umask 022

# Set our default path
PATH="/usr/local/sbin:/usr/local/bin:/usr/bin"
export PATH

# Load profiles from /etc/profile.d
if test -d /etc/profile.d/; then
	for profile in /etc/profile.d/*.sh; do
		test -r "$profile" && . "$profile"
	done
	unset profile
fi

# Source global bash config
if test "$PS1" && test "$BASH" && test -r /etc/bash.bashrc; then
	. /etc/bash.bashrc
fi

# Termcap is outdated, old, and crusty, kill it.
unset TERMCAP

# Man is much better than us at figuring this out
unset MANPATH

export LS_OPTIONS="--color=auto -N -T 0"
alias ls="ls $LS_OPTIONS"
alias ll="ls -l"
alias lf="ls -F"
alias la="ls -a"
alias lt="ls -t"
alias lx="ls -X"
alias l="ls -lA"
alias l.="ls -d .*"

 修改后的vimrc文件如下:

set nocp
set ru
set background=dark
"set columns=80
set nobk
set is
syn on
set backspace=indent,eol,start
set whichwrap=b,s,<,>,[,]
set sw=4
set ts=4
set lbr
set sm
set cin
set softtabstop=4
set autoindent
set number
set hls
set fo+=mB
set vb t_vb=
set nobackup
if has("multi_byte")
        set encoding=gbk
        set termencoding=ucs-bom,utf-8,cp936,latin1
        set fileencoding=utf-8
endif

之后重新打开vim ,效果如下:


  • 1
    点赞
  • 8
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

赵卓不凡

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值