From 13434ca65f4790aa3a23a8b3db6cf93da85616b4 Mon Sep 17 00:00:00 2001 From: Douglas Anderson Date: Tue, 25 Apr 2017 23:01:00 -0400 Subject: [PATCH 1/6] Update the README me with the instructions. --- README.md | 21 +++++++++++---------- vim/spell/en.utf-8.add | 2 ++ 2 files changed, 13 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 15492a8..b8d3aba 100644 --- a/README.md +++ b/README.md @@ -17,9 +17,9 @@ Clone dah repo. I like to clone put it at `~/.dotlinker` ./scripts/bootstrap.sh -### 3. May need to install the vim deps via Vundle +### 3. May need to install the vim deps via [dein](https://github.com/Shougo/dein.vim) - ./scripts/vundle.sh + ./scripts/vim-bundles.sh ## Dependencies @@ -27,15 +27,16 @@ Clone dah repo. I like to clone put it at `~/.dotlinker` #### Minimum: 1. vim - 7.4 -2. bash - (whatever is installed) -3. git - 2.* -4. python - 2.7 and 3.5 +1. bash - (whatever is installed) +1. git - 2.* +1. python - 2.7 and 3.5 #### Ideal: +1. vim - 8.0 1. tmux - 1.9 -2. zsh - 5.0 -3. urxvt or iter2 -4. ripgrep -5. silver searcher -6. inconsolata font +1. zsh - 5.0 +1. urxvt or iterm2 +1. ripgrep +1. silver searcher +1. Inconsolata font diff --git a/vim/spell/en.utf-8.add b/vim/spell/en.utf-8.add index c185137..b3a55a2 100644 --- a/vim/spell/en.utf-8.add +++ b/vim/spell/en.utf-8.add @@ -198,3 +198,5 @@ deserialized codec codecs struct +Inconsolata +ripgrep From 717ed8f511ee8aba514d25d9e8bce73447c86932 Mon Sep 17 00:00:00 2001 From: Douglas Anderson Date: Tue, 25 Apr 2017 23:36:16 -0400 Subject: [PATCH 2/6] Adding some install "scripts" for dein. --- scripts/bootstrap.sh | 11 ++--- scripts/dein-installer.sh | 89 +++++++++++++++++++++++++++++++++++++++ scripts/vim-bundles.sh | 7 +++ scripts/vundle.sh | 8 ---- 4 files changed, 99 insertions(+), 16 deletions(-) create mode 100644 scripts/dein-installer.sh create mode 100755 scripts/vim-bundles.sh delete mode 100755 scripts/vundle.sh diff --git a/scripts/bootstrap.sh b/scripts/bootstrap.sh index 91ed11e..8a8ca3a 100755 --- a/scripts/bootstrap.sh +++ b/scripts/bootstrap.sh @@ -2,14 +2,9 @@ DIR="$HOME/.dotfiles" -if [ ! -d "$HOME/.vim/bundle/vundle" ]; then - echo "\nGrabing Vundle\n" - mkdir -p $DIR/vim/bundle - git clone https://github.com/gmarik/Vundle.git $DIR/vim/bundle/Vundle.vim -fi - -echo "\nInstalling Bundles\n" -vim +BundleInstall +qall +echo "\nInstalling Vim Bundler Dein\n" +sh $DIR/scripts/dein-install.sh $DIR/vim/bundles +vim "+call dein#install()" echo "\nLinking dotfiles...\n" diff --git a/scripts/dein-installer.sh b/scripts/dein-installer.sh new file mode 100644 index 0000000..57660a4 --- /dev/null +++ b/scripts/dein-installer.sh @@ -0,0 +1,89 @@ +#!/bin/sh +# Standalone installer for Unixs +# Original version is created by shoma2da +# https://github.com/shoma2da/neobundle_installer + +if [ $# -ne 1 ]; then + echo "You must specify the installation directory!" + exit 1 +fi + +# Convert the installation directory to absolute path +case $1 in + /*) PLUGIN_DIR=$1;; + *) PLUGIN_DIR=$PWD/$1;; +esac +INSTALL_DIR="${PLUGIN_DIR}/repos/github.com/Shougo/dein.vim" +echo "Install to \"$INSTALL_DIR\"..." +if [ -e "$INSTALL_DIR" ]; then + echo "\"$INSTALL_DIR\" already exists!" +fi + +echo "" + +# check git command +type git || { + echo 'Please install git or update your path to include the git executable!' + exit 1 +} +echo "" + +# make plugin dir and fetch dein +if ! [ -e "$INSTALL_DIR" ]; then + echo "Begin fetching dein..." + mkdir -p "$PLUGIN_DIR" + git clone https://github.com/Shougo/dein.vim "$INSTALL_DIR" + echo "Done." + echo "" +fi + +# write initial setting for .vimrc +echo "Please add the following settings for dein to the top of your vimrc (Vim) or init.vim (NeoVim) file:" +{ + echo "" + echo "" + echo "\"dein Scripts-----------------------------" + echo "if &compatible" + echo " set nocompatible \" Be iMproved" + echo "endif" + echo "" + echo "\" Required:" + echo "set runtimepath+=$INSTALL_DIR" + echo "" + echo "\" Required:" + echo "if dein#load_state('$PLUGIN_DIR')" + echo " call dein#begin('$PLUGIN_DIR')" + echo "" + echo " \" Let dein manage dein" + echo " \" Required:" + echo " call dein#add('$INSTALL_DIR')" + echo "" + echo " \" Add or remove your plugins here:" + echo " call dein#add('Shougo/neosnippet.vim')" + echo " call dein#add('Shougo/neosnippet-snippets')" + echo "" + echo " \" You can specify revision/branch/tag." + echo " call dein#add('Shougo/vimshell', { 'rev': '3787e5' })" + echo "" + echo " \" Required:" + echo " call dein#end()" + echo " call dein#save_state()" + echo "endif" + echo "" + echo "\" Required:" + echo "filetype plugin indent on" + echo "syntax enable" + echo "" + echo "\" If you want to install not installed plugins on startup." + echo "\"if dein#check_install()" + echo "\" call dein#install()" + echo "\"endif" + echo "" + echo "\"End dein Scripts-------------------------" + echo "" + echo "" +} + +echo "Done." + +echo "Complete setup dein!" diff --git a/scripts/vim-bundles.sh b/scripts/vim-bundles.sh new file mode 100755 index 0000000..98c5645 --- /dev/null +++ b/scripts/vim-bundles.sh @@ -0,0 +1,7 @@ +#!/bin/sh + +echo 'Updating vim plugins...' + +vim "+call dein#install()" + +echo 'Done.' diff --git a/scripts/vundle.sh b/scripts/vundle.sh deleted file mode 100755 index 3fe951f..0000000 --- a/scripts/vundle.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/sh - -echo 'Updating vundle plugins...' - -vim +PluginInstall +qall - -echo 'Done.' - From 8c244718f9e9e57e86ebe25220371664440b67ef Mon Sep 17 00:00:00 2001 From: Douglas Anderson Date: Tue, 25 Apr 2017 23:52:24 -0400 Subject: [PATCH 3/6] Switch the bundle install file to dein. --- vim/bundle.vim | 65 ++++++++++++++++++++++++++++++++++++++++++++++++ vim/vimrc.bundle | 58 ------------------------------------------ vimrc | 5 ++-- 3 files changed, 68 insertions(+), 60 deletions(-) create mode 100644 vim/bundle.vim delete mode 100644 vim/vimrc.bundle diff --git a/vim/bundle.vim b/vim/bundle.vim new file mode 100644 index 0000000..42f394f --- /dev/null +++ b/vim/bundle.vim @@ -0,0 +1,65 @@ +" This file holds bundles for Vundle + +filetype off + +set runtimepath+=~/.vim/bundles/repos/github.com/Shougo/dein.vim + +if dein#load_state('~/.vim/bundles') + call dein#begin('~/.vim/bundles') + + " Plugin manager + call dein#add('~/.vim/bundles/repos/github.com/Shougo/dein.vim') + + " Style + call dein#add('vim-airline/vim-airline') + call dein#add('vim-airline/vim-airline-themes') + call dein#add('altercation/vim-colors-solarized') + call dein#add('ap/vim-css-color') + + " Language + call dein#add('tpope/vim-git') + call dein#add('tpope/vim-fugitive') + call dein#add('plasticboy/vim-markdown') + call dein#add('mustache/vim-mustache-handlebars') + call dein#add('LaTeX-Box-Team/LaTeX-Box') + call dein#add('andersoncustodio/vim-tmux') + call dein#add('derekwyatt/vim-scala') + call dein#add('fatih/vim-go') + call dein#add('groenewege/vim-less') + call dein#add('rust-lang/rust.vim') + call dein#add('cespare/vim-toml') + call dein#add('pangloss/vim-javascript') + call dein#add('mxw/vim-jsx') + call dein#add('tikhomirov/vim-glsl') + call dein#add('dleonard0/pony-vim-syntax') + + " Textobjs + runtime macros/matchit.vim + call dein#add('kana/vim-textobj-user') + call dein#add('kana/vim-textobj-line') + call dein#add('kana/vim-textobj-indent') + call dein#add('kana/vim-textobj-entire') + call dein#add('nelstrom/vim-textobj-rubyblock') + call dein#add('lucapette/vim-textobj-underscore') + + " Utility + call dein#add('christoomey/vim-tmux-navigator') + call dein#add('nelstrom/vim-visual-star-search') + call dein#add('tpope/vim-unimpaired') + call dein#add('tpope/vim-surround') + call dein#add('tpope/vim-repeat') + call dein#add('tpope/vim-commentary') + call dein#add('tpope/vim-vinegar') + call dein#add('mileszs/ack.vim') + call dein#add('ctrlpvim/ctrlp.vim') + call dein#add('vim-scripts/gitignore') + call dein#add('justinmk/vim-sneak') + call dein#add('neomake/neomake') + call dein#add('benjie/neomake-local-eslint.vim') + + call dein#end() + call dein#save_state() +endif + +syntax on " TODO switch to syntax enable +filetype plugin indent on diff --git a/vim/vimrc.bundle b/vim/vimrc.bundle deleted file mode 100644 index c510413..0000000 --- a/vim/vimrc.bundle +++ /dev/null @@ -1,58 +0,0 @@ -" This file holds bundles for Vundle - -filetype off - -set rtp+=~/.vim/bundle/Vundle.vim -call vundle#rc() - -Plugin 'gmarik/Vundle.vim' - -" Style -Plugin 'vim-airline/vim-airline' -Plugin 'vim-airline/vim-airline-themes' -Plugin 'altercation/vim-colors-solarized' -Plugin 'ap/vim-css-color' - -" Language -Plugin 'tpope/vim-git' -Plugin 'tpope/vim-fugitive' -Plugin 'plasticboy/vim-markdown' -Plugin 'mustache/vim-mustache-handlebars' -Plugin 'LaTeX-Box-Team/LaTeX-Box' -Plugin 'andersoncustodio/vim-tmux' -Plugin 'derekwyatt/vim-scala' -Plugin 'fatih/vim-go' -Plugin 'groenewege/vim-less' -Plugin 'rust-lang/rust.vim' -Plugin 'cespare/vim-toml' -Plugin 'pangloss/vim-javascript' -Plugin 'mxw/vim-jsx' -Plugin 'tikhomirov/vim-glsl' -Plugin 'dleonard0/pony-vim-syntax' - -" Textobjs -runtime macros/matchit.vim -Plugin 'kana/vim-textobj-user' -Plugin 'kana/vim-textobj-line' -Plugin 'kana/vim-textobj-indent' -Plugin 'kana/vim-textobj-entire' -Plugin 'nelstrom/vim-textobj-rubyblock' -Plugin 'lucapette/vim-textobj-underscore' - -" Utility -Plugin 'christoomey/vim-tmux-navigator' -Plugin 'nelstrom/vim-visual-star-search' -Plugin 'tpope/vim-unimpaired' -Plugin 'tpope/vim-surround' -Plugin 'tpope/vim-repeat' -Plugin 'tpope/vim-commentary' -Plugin 'tpope/vim-vinegar' -Plugin 'mileszs/ack.vim' -Plugin 'ctrlpvim/ctrlp.vim' -Plugin 'vim-scripts/gitignore' -Plugin 'justinmk/vim-sneak' -Plugin 'neomake/neomake' -Plugin 'benjie/neomake-local-eslint.vim' - -syntax on -filetype plugin indent on diff --git a/vimrc b/vimrc index 8e84bf2..b5559b6 100644 --- a/vimrc +++ b/vimrc @@ -4,8 +4,9 @@ set nocompatible " Pffft... vi... Please... -if filereadable(expand("~/.vim/vimrc.bundle")) - source ~/.vim/vimrc.bundle +" Load plugins +if filereadable(expand("~/.vim/bundle.vim")) + source ~/.vim/bundle.vim endif """""""""""""""""""""""""""""""""""""""""""""""""" From 0608443b0b461c87751cbb555c9585a8159b0193 Mon Sep 17 00:00:00 2001 From: Douglas Anderson Date: Tue, 25 Apr 2017 23:57:32 -0400 Subject: [PATCH 4/6] Add `dein`. --- README.md | 3 ++- scripts/vim-bundles.sh | 7 ------- vim/spell/en.utf-8.add | 1 + 3 files changed, 3 insertions(+), 8 deletions(-) delete mode 100755 scripts/vim-bundles.sh diff --git a/README.md b/README.md index b8d3aba..649e31d 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,8 @@ Clone dah repo. I like to clone put it at `~/.dotlinker` ### 3. May need to install the vim deps via [dein](https://github.com/Shougo/dein.vim) - ./scripts/vim-bundles.sh + [within vim] + :call dein#install ## Dependencies diff --git a/scripts/vim-bundles.sh b/scripts/vim-bundles.sh deleted file mode 100755 index 98c5645..0000000 --- a/scripts/vim-bundles.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh - -echo 'Updating vim plugins...' - -vim "+call dein#install()" - -echo 'Done.' diff --git a/vim/spell/en.utf-8.add b/vim/spell/en.utf-8.add index b3a55a2..590c9c5 100644 --- a/vim/spell/en.utf-8.add +++ b/vim/spell/en.utf-8.add @@ -200,3 +200,4 @@ codecs struct Inconsolata ripgrep +dein From d33034c8efe9b1663c0520f606bd12f6cb3ebbd9 Mon Sep 17 00:00:00 2001 From: Douglas Anderson Date: Tue, 25 Apr 2017 23:59:01 -0400 Subject: [PATCH 5/6] Change to the new bundle directory in the gitignore. --- .gitignore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 2b99c78..8336b79 100644 --- a/.gitignore +++ b/.gitignore @@ -12,7 +12,7 @@ vim/.netrwhist vim/temp -vim/bundle +vim/bundles zsh/.zsh_history* From e3141a81520c430fcf16a78249dd70fb5f0d11d8 Mon Sep 17 00:00:00 2001 From: Douglas Anderson Date: Wed, 26 Apr 2017 00:02:52 -0400 Subject: [PATCH 6/6] Switch to syntax-enable vs syntax-on. --- vim/bundle.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vim/bundle.vim b/vim/bundle.vim index 42f394f..19ff5d8 100644 --- a/vim/bundle.vim +++ b/vim/bundle.vim @@ -61,5 +61,5 @@ if dein#load_state('~/.vim/bundles') call dein#save_state() endif -syntax on " TODO switch to syntax enable +syntax enable filetype plugin indent on