-
-
Save mgathu1/10982742 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #sudo yum remove $(rpm -qa | grep ^vim) | |
| # the above line requires sudo and cvs to be removed | |
| # so we use the one below instead | |
| sudo yum remove vim-common vim-enhanced | |
| #!/bin/bash | |
| # on centos minimal | |
| sudo yum install gcc make ncurses-devel lua lua-devel perl wget | |
| # Download vim7.4 | |
| cd /usr/local/src | |
| wget ftp://ftp.vim.org/pub/vim/unix/vim-7.4.tar.bz2 | |
| tar -xjf vim-7.4.tar.bz2 | |
| cd vim74 | |
| # vim7.4 | |
| ./configure --disable-selinux \ | |
| --enable-luainterp \ | |
| --enable-multibyte \ | |
| --disable-gui \ | |
| --with-features=huge \ | |
| --with-modified-by=mgathu | |
| make | |
| make install | |
| hash -r | |
| PATH=$PATH:/usr/local/bin | |
| export $PATH | |
| ln -sv /usr/local/vim /usr/bin/vi | |
| for L in /usr/share/man/{,*/}man1/vim.1; do | |
| ln -sv vim.1 $(dirname $L)/vi.1 | |
| done | |
| PATH=$PATH:/usr/local/bin | |
| export $PATH | |
| #By default, vim runs in vi-incompatible mode. This may be new to users who have used other editors in the past. | |
| #The “nocompatible” setting is included below to highlight the fact that a new behavior is being used. | |
| #It also reminds those who would change to “compatible” mode that it should be the first setting in the configuration file. | |
| cat > /etc/vimrc << "EOF" | |
| " Begin /etc/vimrc | |
| set nocompatible | |
| set backspace=2 | |
| syntax on | |
| if (&term == "iterm") || (&term == "putty") | |
| set background=dark | |
| endif | |
| " End /etc/vimrc | |
| EOF | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment