1200字范文,内容丰富有趣,写作的好帮手!
1200字范文 > arch linux vim安装教程 Archlinux安装vim并配置颜色

arch linux vim安装教程 Archlinux安装vim并配置颜色

时间:2019-08-07 12:40:28

相关推荐

arch linux vim安装教程 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 ,效果如下:

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。