Created
July 17, 2013 21:51
-
-
Save yrgoldteeth/6024870 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
#!/usr/bin/env bash | |
# This is my setup for Vim. It assumes you're using a unixy system that has | |
# vim already installed as well as bash, git and curl. This will install the janus | |
# set of plugins as well as create my specific vim customizations | |
# Cat the text of my .vimrc.after file | |
function vimrcafter() | |
{ | |
cat<<EOF | |
" control-j to tab next, control-k to tab previous | |
map <C-J> :tabn<CR> | |
map <C-K> :tabp<CR> | |
" make j/k work on wrapped lines. | |
nnoremap j gj | |
nnoremap k gk | |
" KILL ALL TRAILING WHITESPACE WITH FIRE | |
nnoremap <silent> <F5> :let _s=@/<Bar>:%s/\s\+$//e<Bar>:let @/=_s<Bar>:nohl<CR> | |
EOF | |
} | |
# Cat the text of my .gvimrc.after file | |
function gvimrcafter() | |
{ | |
cat<<EOF | |
set guioptions-=T | |
set guioptions-=m | |
set guioptions-=r | |
set guioptions-=e | |
set guifont=Inconsolata:h14 | |
set vb | |
colorscheme Mustang | |
EOF | |
} | |
# Download and install Janus | |
if [ ! -d $HOME/.vim/janus ] | |
then | |
echo "Installing Janus" | |
curl -Lo- https://bit.ly/janus-bootstrap | bash | |
fi | |
# Create .vimrc.after | |
if [ ! -f $HOME/.vimrc.after ] | |
then | |
echo "Creating $HOME/.vimrc.after" | |
vimrcafter > $HOME/.vimrc.after | |
fi | |
# Create .vimrc.before | |
if [ ! -f $HOME/.vimrc.before ] | |
then | |
echo "Creating $HOME/.vimrc.before" | |
echo "call janus#disable_plugin('nerdtree')" > $HOME/.vimrc.before | |
fi | |
# Create .gvimrc.after | |
if [ ! -f $HOME/.gvimrc.after ] | |
then | |
echo "Creating $HOME/.gvimrc.after" | |
gvimrcafter > $HOME/.gvimrc.after | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment