vim /etc/bashrc
PS1="\[\e[1;32m\][\[\e[0m\]\t \[\e[1;33m\]\u\[\e[36m\]@\h\[\e[1;31m\] \W\[\e[1;32m\]]\[\e[0m\]\\$ "
# Bash Alias Starting
alias cdnet='cd /etc/sysconfig/network-scripts/'
alias cdyum='cd /etc/yum.repos.d/'
alias nm='systemctl restart NetworkManager'
alias disepel='sed -ri /enabled/s/enabled=1/enabled=0/ /etc/yum.repos.d/base.repo'
alias egrep='egrep --color=auto'
alias epel='sed -ri /enabled/s/enabled=0/enabled=1/ /etc/yum.repos.d/base.repo'
alias fgrep='fgrep --color=auto'
alias i.='ls -d .* --color=auto'
alias lh='ls -lh --color=auto'
alias more='more -d'
alias p='poweroff'
alias restart='systemctl restart '
alias restartnet='systemctl restart network'
alias scandisk='echo "- - -" > /sys/class/scsi_host/host0/scan;\
echo "- - -" > /sys/class/scsi_host/host1/scan;\
echo "- - -" > /sys/class/scsi_host/host2/scan'
alias vie0='vim /etc/sysconfig/network-scripts/ifcfg-eth0'
alias vie1='vim /etc/sysconfig/network-scripts/ifcfg-eth1'
alias xzfgrep='xzfgrep --color=auto'
alias xzgrep=' xzgrep --color=auto'
alias yr='yum remove'
alias yy='yum -y install'
alias zegrep='zegrep --color=auto'
alias zfgrep='zfgrep --color=auto'
alias zgrep='zgrep --color=auto'
alias more='more -d'
# Bash Alias End
set number
set cursorline
# set autoindent
set paste
set textwidth=65
set expandtab
set tabstop=4
autocmd BufNewFile *.sh exec ":call SetTitle()"
func SetTitle()
if expand("%:e") == "sh"
call setline(1,"#!/bin/bash")
call setline(2,"#")
call setline(3,"#**************************************************#")
call setline(4,"#Author: zhongzw")
call setline(5,"#QQ: www.935523993.com")
call setline(6,"#Date: ".strftime("%Y-%m-%d"))
call setline(7,"#FileName: ".expand("%"))
call setline(8,"#URL: http://www.kubernetes.com")
call setline(9,"#Description: The test script")
call setline(10,"#Copyright(C): ".strftime("%Y")."All rights reserved")
call setline(11,"#**************************************************#")
call setline(12,"")
endif
endfunc
autocmd BufNewFile * normal G