From 6548be01a73d09c20f8ff4b1bca3af2cba5b7639 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Fri, 9 Sep 2016 19:35:58 +0200 Subject: Update vim plugins and add starme do install script Also vim plugin figitive is removed. Not that its bad plugin, I just not using it at all. --- .gitmodules | 3 --- install | 5 +++-- vim/bundle/YouCompleteMe | 2 +- vim/bundle/lightline.vim | 2 +- vim/bundle/syntastic | 2 +- vim/bundle/tlib_vim | 2 +- vim/bundle/vim-fugitive | 1 - vim/bundle/vim-gitgutter | 2 +- vim/bundle/vim-snipmate | 2 +- vim/bundle/vim-table-mode | 2 +- 10 files changed, 10 insertions(+), 13 deletions(-) delete mode 160000 vim/bundle/vim-fugitive diff --git a/.gitmodules b/.gitmodules index ac40256..507477c 100644 --- a/.gitmodules +++ b/.gitmodules @@ -10,9 +10,6 @@ [submodule "vim/bundle/tlib_vim"] path = vim/bundle/tlib_vim url = https://github.com/tomtom/tlib_vim.git -[submodule "vim/bundle/vim-fugitive"] - path = vim/bundle/vim-fugitive - url = https://github.com/tpope/vim-fugitive.git [submodule "vim/bundle/vim-snipmate"] path = vim/bundle/vim-snipmate url = https://github.com/garbas/vim-snipmate.git diff --git a/install b/install index 660cfb7..a4a7b73 100755 --- a/install +++ b/install @@ -25,7 +25,7 @@ dodiff() { } diff() { # Iterate trough source directory but ignore any git repositories - # Note that its design decision to not iterate trough target directory. + # Note that it's design decision to not iterate trough target directory. if [ -d "$1" ]; then # This is check if we have correct inst command basically. If it is # directory than it have to have trailing slash to ensure that no @@ -109,7 +109,8 @@ if [[ $REPLY =~ ^[Yy]?$ ]]; then inst config/i3blocks/ ~/.config/i3blocks inst config/i3status/ ~/.config/i3status inst config/dunst/ ~/.config/dunst - inst local/bin/mxrandr ~/.local/bin/mxrandr + inst local/bin/mxrandr ~/.local/bin/ + inst local/bin/startme ~/.local/bin/ fi read -p "Install Conkeror configuration? (Y/n) " diff --git a/vim/bundle/YouCompleteMe b/vim/bundle/YouCompleteMe index 0de1c0c..1215336 160000 --- a/vim/bundle/YouCompleteMe +++ b/vim/bundle/YouCompleteMe @@ -1 +1 @@ -Subproject commit 0de1c0c9bb13ce82172b472c676035cd47cf6a6a +Subproject commit 12153361d730e84c748ac68eaff773aa04f0b3b0 diff --git a/vim/bundle/lightline.vim b/vim/bundle/lightline.vim index 430ce2c..06d0dd3 160000 --- a/vim/bundle/lightline.vim +++ b/vim/bundle/lightline.vim @@ -1 +1 @@ -Subproject commit 430ce2cb063b39a0c7950cafd617e333acb6759a +Subproject commit 06d0dd33d3cae36ae1c400a1612ce38e409eb2b7 diff --git a/vim/bundle/syntastic b/vim/bundle/syntastic index cee74e0..9981797 160000 --- a/vim/bundle/syntastic +++ b/vim/bundle/syntastic @@ -1 +1 @@ -Subproject commit cee74e0c1af934065fd1b3046e53cda76574f703 +Subproject commit 998179747a5715114c5a9e9b94317d73f4fd4d3d diff --git a/vim/bundle/tlib_vim b/vim/bundle/tlib_vim index 5636472..8c74564 160000 --- a/vim/bundle/tlib_vim +++ b/vim/bundle/tlib_vim @@ -1 +1 @@ -Subproject commit 5636472e5dba1a4104376ce6bd93cc2546e02483 +Subproject commit 8c74564396e368788a5cb901b0e8017a3166cee9 diff --git a/vim/bundle/vim-fugitive b/vim/bundle/vim-fugitive deleted file mode 160000 index 50cc268..0000000 --- a/vim/bundle/vim-fugitive +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 50cc268d29c65738dab9eda8354d9387f1628519 diff --git a/vim/bundle/vim-gitgutter b/vim/bundle/vim-gitgutter index b5f23e9..43e7c1f 160000 --- a/vim/bundle/vim-gitgutter +++ b/vim/bundle/vim-gitgutter @@ -1 +1 @@ -Subproject commit b5f23e986747a6f4b1dc1196d2a5bd3dc7c8c2b6 +Subproject commit 43e7c1f542032ec5be1b6a0ff4440a5370e9bce3 diff --git a/vim/bundle/vim-snipmate b/vim/bundle/vim-snipmate index ee433e4..3198619 160000 --- a/vim/bundle/vim-snipmate +++ b/vim/bundle/vim-snipmate @@ -1 +1 @@ -Subproject commit ee433e43c76c768c95ad6d9af67c4cd4b40f7eac +Subproject commit 31986191ac9923afcd53bf6425c9b6c35fdbb214 diff --git a/vim/bundle/vim-table-mode b/vim/bundle/vim-table-mode index b613e39..8bacd0b 160000 --- a/vim/bundle/vim-table-mode +++ b/vim/bundle/vim-table-mode @@ -1 +1 @@ -Subproject commit b613e39bd08ecebdb9b18100dae518050f496048 +Subproject commit 8bacd0ba660e94e0bf7e1a41e803df58be4c7376 -- cgit v1.2.3 From 914ff39de8af7621d3d7a7abaec4828740a21952 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Fri, 9 Sep 2016 19:36:21 +0200 Subject: install script support git repositories --- install | 32 +++++++++++++++++++++++++++++++- vimrc | 4 ++++ 2 files changed, 35 insertions(+), 1 deletion(-) diff --git a/install b/install index a4a7b73..b71a5e1 100755 --- a/install +++ b/install @@ -34,19 +34,49 @@ diff() { echo ERROR: Directory without trailing slash detected: $1 exit 1 fi + # Got trough all files ignoring git repositories for f in `find "$1" \( -type d -exec test -e '{}'/.git \; \) -prune -o -type f -print`; do F="${f#$1}" - echo $f dodiff "$1/$F" "$2/$F" done + # Check if we have all directories ignoring those in git repositories + for d in `find "$1" -type d -print -exec test -e '{}'/.git \; -prune`; do + D="${d#$1}" + if [ ! -d "$2/$D" ]; then + echo "Directory not installed: $1/$D => $2/$D" + read -p "Install? (Y/n) " + if [[ $REPLY =~ ^[Yy]?$ ]]; then + doinst "$1/$D/" "$2/$D" + fi + fi + done + # Now checkout git repositories + for g in `find "$1" -name .git -type f -printf '%h '`; do + G="${g#$1}" + COMMIT=$( cd "$1/$G" && git rev-parse HEAD ) + echo "Checkout of git repository: $2/$G" + ( cd "$2/$G" && git --work-tree=. checkout -f "$COMMIT" ) + done else dodiff "$1" "$2" fi } +# Managing two git trees with master has small inconvenience that git allows only +# single branch checkout in all work trees, so as it sets now git will execute all +# commands not on deployed tree but on tree in this repository, so we need specify +# work tree on command line every time we want target deployed work tree. doinst() { echo rsync -rlpt $1 $2 rsync -rlpt $1 $2 + # Now edit all .git files in target directory + for g in `find "$2" -name '.git' -type f`; do + if ! grep -q "gitdir: " "$g"; then + continue # Probably not a git repository or who knows. + fi + echo "Pointing git repository $g to this repository" + echo gitdir: $PWD/.git`sed "s/^gitdir: [./]*git//" "$g"` > "$g" + done } inst() { if [ -e "$2" ]; then diff --git a/vimrc b/vimrc index 74a0659..63a51ba 100644 --- a/vimrc +++ b/vimrc @@ -48,6 +48,10 @@ colorscheme elflord " Directory where *.swp files will be stored set directory=$HOME/.cache/vim// +" Setup table-mode to markdown compliant +" Note: to start use "\ t m" +let g:table_mode_corner="|" + map :call InitBase() map :setlocal spell! spelllang=en_us map :setlocal spell! spelllang=cs -- cgit v1.2.3