Added vim installation script
This commit is contained in:
parent
f4159bd54f
commit
a771bcb32d
4 changed files with 83 additions and 5 deletions
16
install-vim.sh
Executable file
16
install-vim.sh
Executable file
|
@ -0,0 +1,16 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
DOTVIM=~/.vim
|
||||||
|
|
||||||
|
rm -r $DOTVIM
|
||||||
|
mkdir $DOTVIM
|
||||||
|
|
||||||
|
OWNERS=( "tomtom" "scrooloose" "msanders" "ervandew" )
|
||||||
|
REPOS=( "checksyntax_vim" "nerdtree" "snipmate.vim" "supertab" )
|
||||||
|
|
||||||
|
for (( i = 0 ; i < ${#OWNERS[@]} ; i++ ))
|
||||||
|
do
|
||||||
|
git clone git://github.com/${OWNERS[$i]}/${REPOS[$i]}.git /tmp/${REPOS[$i]}
|
||||||
|
cp -R /tmp/${REPOS[$i]}/* $DOTVIM
|
||||||
|
rm -rf /tmp/${REPOS[$i]}
|
||||||
|
done
|
36
install.sh
36
install.sh
|
@ -1,11 +1,9 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# TODO check if fortune-mod is installed and if not, install it
|
|
||||||
|
|
||||||
# Clears out the old .bashrc
|
# Clears out the old .bashrc
|
||||||
if [ -f ~/.bashrc ];
|
if [ -f ~/.bashrc ];
|
||||||
then
|
then
|
||||||
rm ~/.bashrc
|
rm ~/.bashrc
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Grabs the skeleton .bashrc
|
# Grabs the skeleton .bashrc
|
||||||
|
@ -18,8 +16,8 @@ echo "export PATH=\"$PWD/git:$PATH\"" >> ~/.bashrc
|
||||||
|
|
||||||
# Appends the custom .bashrc file
|
# Appends the custom .bashrc file
|
||||||
echo "
|
echo "
|
||||||
if [ -f $PWD/bash.bashrc ] && ! shopt -oq posix; then
|
if [ -f $PWD/bashrc ] && ! shopt -oq posix; then
|
||||||
. $PWD/bash.bashrc
|
. $PWD/bashrc
|
||||||
fi" >> ~/.bashrc
|
fi" >> ~/.bashrc
|
||||||
|
|
||||||
# Removes the existing scripts
|
# Removes the existing scripts
|
||||||
|
@ -30,3 +28,31 @@ fi
|
||||||
|
|
||||||
# Symlinks back to our scripts
|
# Symlinks back to our scripts
|
||||||
ln -s $PWD/nautilus-scripts ~/.gnome2/nautilus-scripts
|
ln -s $PWD/nautilus-scripts ~/.gnome2/nautilus-scripts
|
||||||
|
|
||||||
|
# Copies .vimrc
|
||||||
|
if [ -f ~/.vimrc ];
|
||||||
|
then
|
||||||
|
rm ~/.vimrc
|
||||||
|
fi
|
||||||
|
|
||||||
|
cp $PWD/vimrc ~/.vimrc
|
||||||
|
|
||||||
|
# Pulls down and installs vim plugins
|
||||||
|
DOTVIM=~/.vim
|
||||||
|
|
||||||
|
if [ -d $DOTVIM ];
|
||||||
|
then
|
||||||
|
rm -r $DOTVIM
|
||||||
|
fi
|
||||||
|
|
||||||
|
mkdir $DOTVIM
|
||||||
|
|
||||||
|
OWNERS=( "tomtom" "scrooloose" "msanders" "ervandew" )
|
||||||
|
REPOS=( "checksyntax_vim" "nerdtree" "snipmate.vim" "supertab" )
|
||||||
|
|
||||||
|
for (( i = 0 ; i < ${#OWNERS[@]} ; i++ ))
|
||||||
|
do
|
||||||
|
git clone git://github.com/${OWNERS[$i]}/${REPOS[$i]}.git /tmp/${REPOS[$i]}
|
||||||
|
cp -R /tmp/${REPOS[$i]}/* $DOTVIM
|
||||||
|
rm -rf /tmp/${REPOS[$i]}
|
||||||
|
done
|
||||||
|
|
36
vimrc
Normal file
36
vimrc
Normal file
|
@ -0,0 +1,36 @@
|
||||||
|
set ttyfast
|
||||||
|
|
||||||
|
set autoindent
|
||||||
|
set backspace=2
|
||||||
|
set colorcolumn=80
|
||||||
|
set foldmethod=marker
|
||||||
|
set incsearch
|
||||||
|
set nocindent
|
||||||
|
set smartindent
|
||||||
|
set shiftwidth=4
|
||||||
|
set tabstop=4
|
||||||
|
set textwidth=0
|
||||||
|
|
||||||
|
set background=dark
|
||||||
|
colorscheme default
|
||||||
|
|
||||||
|
syntax on
|
||||||
|
syntax sync fromstart
|
||||||
|
|
||||||
|
autocmd FileType python set omnifunc=pythoncomplete#Complete
|
||||||
|
autocmd FileType javascript set omnifunc=javascriptcomplete#CompleteJS
|
||||||
|
autocmd FileType html set omnifunc=htmlcomplete#CompleteTags
|
||||||
|
autocmd FileType css set omnifunc=csscomplete#CompleteCSS
|
||||||
|
autocmd FileType xml set omnifunc=xmlcomplete#CompleteTags
|
||||||
|
autocmd FileType php set omnifunc=phpcomplete#CompletePHP
|
||||||
|
autocmd FileType c set omnifunc=ccomplete#CompleteCpp
|
||||||
|
|
||||||
|
set comments=sl:/*,mb:*,elx:*/
|
||||||
|
hi Statement cterm=NONE ctermfg=2
|
||||||
|
hi Constant cterm=NONE ctermfg=2
|
||||||
|
hi Number cterm=NONE ctermfg=darkred
|
||||||
|
hi String cterm=NONE ctermfg=darkred
|
||||||
|
hi Search cterm=NONE ctermfg=NONE
|
||||||
|
hi Function cterm=NONE ctermfg=2
|
||||||
|
hi Conditional ctermfg=2
|
||||||
|
hi link javaScriptBraces NONE
|
Loading…
Add table
Add a link
Reference in a new issue