"dockerized" Vim
jare/vim-bundle:latest
jare/drop-in
jare/spacemacs
Make sure to use "Solarized Dark" compatible theme or color palette may look weird.
You can configure terminal color mode by setting TERM variable docker run ... -e TERM=<VALUE> jare/vim-bundle
By default the <VALUE>
is xterm-256color
but for the "less colorful" terminals set it to xterm
.
Make an alias:
alias edit='docker run -ti --rm -v $(pwd):/home/developer/workspace jare/vim-bundle'
Have fun! edit some.file
Also You can use this one for getting updates: alias edit_update="docker pull jare/vim-bundle:latest"
docker run ... -e DISABLE="'vim-airline', 'nerdtree'" ... jare/vim-bundle
.vimrc
file and, if you want to add plugins, subfolder called bundle
with them.docker run ... -v <***>/my-stuff:/ext/ ... jare/vim-bundle
But the best way will be extending this container.
/usr/lib/go
. For example, run jare/go-tools
in the detached mode docker create -v /usr/lib/go --name vim-go-tools jare/go-tools /bin/true
and mount its volumes like this docker run ... --volumes-from vim-go-tools ... jare/vim-bundle
or add it to the alias alias edit="docker run -ti --rm --volumes-from go-tools -v $(pwd):/home/developer/workspace jare/vim-bundle"
:!gofmt %
and it will output formatted source of the current buffers(%:p
absolute file path, %:h
head of the file name and %:p:h
is the current directory). If you want to overwrite - use :% ! gofmt %
The gofmt
tool used as an example, actually, it covered in vim-go.#docker vim-bundle
function ed() {
local dtc_id=$(docker ps -a -q --filter 'name=vim-go-tools')
if [[ -z "${dtc_id}" ]]; then
echo 'vim-go-tools container not found. Creating...'
docker create -v '/usr/lib/go' --name 'vim-go-tools' \
'jare/go-tools' '/bin/true'
echo 'Done!'
fi
echo 'Starting Vim'
docker run -ti --rm -p 8080:8080 --volumes-from 'vim-go-tools' \
-v $('pwd'):/home/developer/workspace 'jare/vim-bundle' "${@}"
}
export -f ed
Shift
.<Leader>
mapped to ,
. I use the basic mappings from the great amix .vimrc
tmux -2
go install
package