Archlinux安装vim并配置颜色

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/sgzqc/article/details/48339847

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 ,效果如下:


阅读更多
想对作者说点什么?

博主推荐

换一批

没有更多推荐了,返回首页