This is a dockerized vim installation that shares your system clipboard. Edit code on your local machine by exposing it to the container with a volume.
- vim 8.*, with its new, built-in package system
- zsh, configured via prezto
TODO
TODO
This project relies on docker volumes. Unfortunately, docker volumes are slower than the real filesystem. Right now, the best we can do is use NFS.
NFS (Network File System) is much faster for file reads inside of virtualbox. Since our applications read a ton of files to operate (think: every ruby gem and their files), it's recommended to use NFS for mounted volumes.
Luckily, this is super easy to do with the tool https://github.com/adlogix/docker-machine-nfs
$ brew install docker-machine-nfs
$ docker-machine-nfs <machine name> --mount-opts="noacl,async,nolock,vers=3,udp,noatime,actimeo=1"
This will configure NFS against your VirtualBox VM and Mac OSX.
TODO
docker build -t dev-box .
In your normal shell:
brew install socat
brew cask install xquartz
open -a XQuartz
In your quartz shell:
socat TCP-LISTEN:6000,reuseaddr,fork UNIX-CLIENT:\"$DISPLAY\"
In your normal shell:
vboxip=$(ifconfig | grep -A 2 vbox | grep inet | awk '{ print $2 }')
Untested: moby/moby#8710 (comment)
From the project root of this app, run:
./run /path/to/project/root
This will put you inside the docker container with your project root loaded via volumes. If you exit
, the container will clean itself up. If you accidentally drop out of it without editing, the container will live on, and you can find it via docker ps --filter "name=dev-box" --format "table {{.Names}}"
. You'll see the container is named dev-box-<PROJECT ROOT DIRECTORY NAME>
.
Assuming you've cloned this repo to ~/dev-box:
alias dvim="~/dev-box/run $(pwd)"
The system clipboard is the +
register, so for example, you can yank a word into it with "+yw
- Share ssh with local machine so git fetches work
- Offer command for removing trailing whitespaces
- Comment block
- Relative line number
- Fix line-move command
- Fix syntastic linting
- Add cucumber go-to-step
- Add "surround" plugin
- Research how to reload vim buffers automatically when underlying file changes, rather than prompt the user on save
- Stop ctrl-s from freezing the terminal
- Use vim mode on the commandline (maybe
set -o vi
)
- Jim Walker had the awesome idea of putting vim in a docker container
- Yan Pritzer maintains an amazing set of dotfiles here
- Bryan Yap for introducing me to skwp's dotfiles with this blogpost