From 9f518ccfa2d51c21176c5945e0c7b8f74a3e4cd6 Mon Sep 17 00:00:00 2001 From: Tianon Gravi Date: Fri, 10 Apr 2015 12:34:45 -0600 Subject: [PATCH] More Vim improvements and adding my "push.sh" wrapper (especially to help remind that "-e TERM" is a Good Idea to get the most out of these changes) --- Dockerfile | 16 +++++++++++++++- push.sh | 8 ++++++++ 2 files changed, 23 insertions(+), 1 deletion(-) create mode 100755 push.sh diff --git a/Dockerfile b/Dockerfile index 43cb6f8b0..abf5cfa9a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -23,12 +23,26 @@ RUN apt-get update && apt-get install -y git vim --no-install-recommends && rm - ENV LANG C.UTF-8 -RUN git clone https://github.com/jtratner/vim-flavored-markdown.git ~/.vim +RUN mkdir ~/.vim ~/.vim/bundle ~/.vim/autoload +RUN set -x \ + && git clone https://github.com/tpope/vim-pathogen.git ~/.vim/bundle/pathogen \ + && ln -s ../bundle/pathogen/autoload/pathogen.vim ~/.vim/autoload/ +RUN git clone https://github.com/jtratner/vim-flavored-markdown.git ~/.vim/bundle/ghmarkdown +RUN git clone https://github.com/nanotech/jellybeans.vim.git ~/.vim/bundle/jellybeans RUN { \ echo 'scriptencoding utf-8'; \ + \ + echo 'execute pathogen#infect()'; \ + \ echo 'syntax on'; \ echo 'filetype plugin indent on'; \ echo 'set list listchars=tab:»·,nbsp:_,extends:¬ noet ts=4 sw=4 nobackup noswapfile'; \ + \ + echo 'set background=dark'; \ + echo 'colorscheme jellybeans'; \ + \ + echo 'au FilterWritePre * if &diff | setlocal wrap< | endif'; \ + \ echo 'au BufNewFile,BufRead *.md,*.markdown setlocal filetype=ghmarkdown'; \ } > ~/.vimrc diff --git a/push.sh b/push.sh new file mode 100755 index 000000000..1314ee48e --- /dev/null +++ b/push.sh @@ -0,0 +1,8 @@ +#!/bin/bash +set -e + +cd "$(dirname "$(readlink -f "$BASH_SOURCE")")" + +#docker pull $(awk '$1 == "FROM" { print $2 }' Dockerfile) +docker build -t docker-library-docs . +docker run -it --rm -v "$(pwd)":/wtf -w /wtf -e TERM --entrypoint 'bash' docker-library-docs -c './push.pl "$@"' -- "$@"