Browse Source

Ajout d'un script d'installation à télécharger

Thibaut Marty 9 years ago
parent
commit
4d8293388c
3 changed files with 24 additions and 13 deletions
  1. 12 12
      README.md
  2. 8 0
      install
  3. 4 1
      vimrc

+ 12 - 12
README.md

@@ -4,26 +4,27 @@ Vim est hautement configurable. Parce qu'il n'existe pas de vimrc ultime, voici
 
 ## Installation
 
+Commencez par tout installer :
+* via Curl :
+
 ```bash
-cd ~
-git clone --recursive https://github.com/ThibautMarty/non-ultimate-vimrc
-cd non-ultimate-vimrc
-./update
-cd ..
-ln -s non-ultimate-vimrc .vim
+curl -L https://raw.githubusercontent.com/ThibautMarty/non-ultimate-vimrc/master/install | sh
 ```
 
-Si cela ne suffit pas, il faut rajouter un lien vers vimrc dans votre répertoire home :
+* via Wget :
 
 ```bash
-cd ~
-ln -s .vim/vimrc .vimrc
+wget --no-check-certificate https://raw.githubusercontent.com/ThibautMarty/non-ultimate-vimrc/master/install -O - | sh
 ```
 
+* ou en exécutant les commandes dans le fichier [install](install).
+
+Puis installez tous les plugins avec les commandes de la partie **Mise à jour**.
+
 ## Mise à jour
 
 ```bash
-cd ~/non-ultimate-vimrc
+cd ~/.vim
 ./update
 ```
 
@@ -35,8 +36,7 @@ Modifiez le fichier `~/.vim/vimrc`. Les plugins sont gérés grâce à [Vundle](
 
 ```bash
 cd ~
-rm -rf .vim
-rm .vimrc
+rm -rf .vim .vimrc
 ```
 
 ## Liste des plugins

+ 8 - 0
install

@@ -0,0 +1,8 @@
+set -x
+cd ~
+git clone https://github.com/ThibautMarty/non-ultimate-vimrc .vim
+ln -s .vim/vimrc .vimrc
+ln -s ../../hooks/pre-commit .vim/.git/hooks/pre-commit
+cd .vim
+mkdir bundle
+git clone https://github.com/gmarik/Vundle.vim.git bundle/Vundle.vim

+ 4 - 1
vimrc

@@ -66,7 +66,10 @@ set listchars=nbsp:¬,tab:»·,trail:·
 
 "# Statusline
 " Informations git (branche +-~) :
-set statusline+=%{strlen(fugitive#statusline())?'\ \ ('.fugitive#statusline()[5:-3].'\ '.HunkSummary().')\ ':''}
+" (Vérifie que le plugin fugitive est accessible)
+if filereadable($HOME.'/.vim/bundle/vim-fugitive/plugin/fugitive.vim')
+  set statusline+=%{strlen(fugitive#statusline())?'\ \ ('.fugitive#statusline()[5:-3].'\ '.HunkSummary().')\ ':''}
+endif
 " Nom du fichier
 set statusline+=%f%<
 " Encodage du fichier