Last night + this morning, I was furious with a shell script about Vim's automated configuration, and I saw a similar script project on GitHub before, and then I saw a brother in the same school who wrote a similar script file, Then I also draw a copy of their own vim to write a configuration script file, this file configuration to a large extent referred to the above two configuration files, of course, plus a lot of their own configuration, the total sentence to synthesize the above two advantages, remove some of the configuration is not suitable for their own, Add a combination that fits your configuration.
The configuration file is as follows: (name saved as ourvim.sh)
#!/bin/BASHCDEcho "and happily use Vim to beat out our code ."Install_handle=""if whichApt-get >/dev/NULL; ThenInstall_handle="Apt-get"elif which Yum>/dev/NULL; ThenInstall_handle="Yum"Else Echo-N"Enter Your installer:"Read Install_name install_handle=$install _namefi sudo$install _handleInstall-YGCCg++ vim ctags xclip astyle python-setuptools python-dev git python-pip python-twisted xsel Cmake SL cowsay >/dev/NULLsudoPipInstall--upgrade AUTOPEP8 >/dev/NULL#python缩进Echo "------------Remove the old vim backup--------------------------"[ -D. Vim] &&MV-V vim. vim.$ (Stat-c%Y. Vim) [ -F. vimrc] &&MV-V VIMRC. vimrc.$ (Stat-c%Y. VIMRC)Echo "------------Let's relax for a moment---------------------------"Echo "duang!duang!duang!duang!duang!"Slcowsay"am I not going to use vim swelling? "Cowsay"Don't worry, let this script take you to fly!! "Echo "------------Get some of the configuration files for vim from GitHub-----------"[ ! -D"MYVIMRC"] && git clone [email protected]:jusonalien/ourvim.git >/dev/NULLCP-R ~/ourvim/vim ~/. VimCP~/OURVIM/VIMRC ~/. VIMRCEcho "------------Plug-in installation-------------------------------"Echo "install Vundle, a plugin for managing plugins"git clone https://github.com/gmarik/vundle.git ~/.vim/bundle/vundle >/dev/nullCD ~/.vim/BundleEcho "This VIM configuration specific please go to Https://github.com/jusonalien/ourvim under the view">JusonalienEcho "Installing VIM colors">>JusonalienEcho "Installing the H and CPP switch plugins">>JusonalienEcho "Install the Nice-looking status bar">>JusonalienEcho "Install the directory tree plug-in, when you are finished, press F2 to use">>JusonalienEcho "Installing the handle bracket artifact">>JusonalienEcho "Install the error prompt plugin">>JusonalienEcho "Installing the Outline plugin">>JusonalienEcho "Installing the Command-t for fuzzy search">>JusonalienEcho "Jusonalien is working hard to install a variety of fun plugins for you">>JusonalienEcho "please be patient and wait ... ">>JusonalienEcho "Press F5 to execute the program">>JusonalienEcho "Press F4 to display outline">>JusonalienEcho "Press F3 to display the directory">>JusonalienEcho "There are only two types of faith in programmers">>JusonalienEcho "The first is the belief in vim.">>JusonalienEcho "the other is that you don't believe in vim.">>Jusonalienvim Jusonalien-C"Bundleinstall"-C"Q"-C"Q"RMJUSONALIENCD~/.vim/bundle/Youcompletemesudo./Install.SH--clang-completer## Setting the color of the solarized thememkdir~/. FONTSCD~/. Fontsgit Clone https://Github.com/eugeneching/consolas-powerline-vim.gitEcho "-----------Start Configuring Colors-------------------"#配色开始Echo 'Export Term=xterm-256color'>> ~/. BASHRCCP~/ourvim/dircolors.256dark ~/. Dircolorseval'dircolors ~/.dircolors'>/dev/NULLCD~/Ourvim. Set_dark.SH RM-RF ~/OurvimEcho "installation finally completed ~\ (≧▽≦)/~ la la"
View Code
The process of using this document:
1. First give the shell script executable permissions:
chmod +x ourvim. SH
2. Then execute the file:
./ourvim. SH
This is also a personal small open-source project Bar ~
After the configuration, the effect is roughly as follows:
This project has been hosted on the Personal GitHub homepage, please click on the link for more information ~ Welcome to VIM enthusiasts.
A configuration file for Vim