Vim初始化设置

cd ~ && vim .vimrc << EOF
set autoindent
set smartindent
set tabstop=4
set shiftwidth=4
set number
set textwidth=80
set wrapmargin=2
set showmatch
set hlsearch
set incsearch
set ignorecase
set smartcase
set scrolloff=5
set laststatus=2
set autochdir
set undofile
set errorbells
set visualbell
syntax on
eof
sudo cp -v .vimrc /root/

添加nginx语法高亮

cd ~ && mkdir -p .vim/syntax && \
cp -v nginx.vim ~/.vim/syntax/ && \
echo 'au BufRead,BufNewFile /etc/nginx/*,/usr/local/nginx/conf/* set ft=nginx' > .vim/filetype.vim
#拷贝到root目录下
sudo cp -rv .vim /root/