1. vim /etc/bashrc
    2. PS1="\[\e[1;32m\][\[\e[0m\]\t \[\e[1;33m\]\u\[\e[36m\]@\h\[\e[1;31m\] \W\[\e[1;32m\]]\[\e[0m\]\\$ "
    3. # Bash Alias Starting
    4. alias cdnet='cd /etc/sysconfig/network-scripts/'
    5. alias cdyum='cd /etc/yum.repos.d/'
    6. alias nm='systemctl restart NetworkManager'
    7. alias disepel='sed -ri /enabled/s/enabled=1/enabled=0/ /etc/yum.repos.d/base.repo'
    8. alias egrep='egrep --color=auto'
    9. alias epel='sed -ri /enabled/s/enabled=0/enabled=1/ /etc/yum.repos.d/base.repo'
    10. alias fgrep='fgrep --color=auto'
    11. alias i.='ls -d .* --color=auto'
    12. alias lh='ls -lh --color=auto'
    13. alias more='more -d'
    14. alias p='poweroff'
    15. alias restart='systemctl restart '
    16. alias restartnet='systemctl restart network'
    17. alias scandisk='echo "- - -" > /sys/class/scsi_host/host0/scan;\
    18. echo "- - -" > /sys/class/scsi_host/host1/scan;\
    19. echo "- - -" > /sys/class/scsi_host/host2/scan'
    20. alias vie0='vim /etc/sysconfig/network-scripts/ifcfg-eth0'
    21. alias vie1='vim /etc/sysconfig/network-scripts/ifcfg-eth1'
    22. alias xzfgrep='xzfgrep --color=auto'
    23. alias xzgrep=' xzgrep --color=auto'
    24. alias yr='yum remove'
    25. alias yy='yum -y install'
    26. alias zegrep='zegrep --color=auto'
    27. alias zfgrep='zfgrep --color=auto'
    28. alias zgrep='zgrep --color=auto'
    29. alias more='more -d'
    30. # 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