Vim run in a Docker container, support MacOS/Linux which has docker installed
1.8K
A customized vim run in a Docker container, it could be run in MacOS, Linux with docker installed.
sudo -- sh -c "curl -LSso /usr/local/bin/vim http://bit.ly/vim_in_docker; chmod +x /usr/local/bin/vim"

space then h open vim_in_docker help in VIMspace then f quick jump to any words in the screen 
space then r rebuild ctags for current directoryctrl and ] jump to definition, need to rebuild ctags firstctrl and o jump back to last cursor positionctrl and i jump back to next cursor positionspace then space jump to and jump back between the current editing file and the last edited filectrl and n press multiple times to select multiple current word and edit all of them at the same time 
g then c toggle commenttab auto complete with next candidateshift and tab auto complete with previous candidateenter then = align selected lines by =enter then : align selected lines by :space then b browse files, use ctrl + j/k to move between candidates 
space then a search text patterns in directories using Ack, the result will be shown in a Quickfix windowspace then t toggle directory treespace then T open directory tree and select current editing file 
space then s split a new horizontal window to the leftspace then S split a new vertical window to the topspace then o toggle window/fullscreenspace then w shortcut for :wspace then W shortcut for :w!space then q shortcut for :qspace then Q shortcut for :q!ctrl and h/j/k/l move left/up/down/right among windows 
:map all mode key mappings:nmap normal mode key mappings:vmap visual mode key mappings:imap insert mode key mappingsIn MacOS we always need boot2docker which is a lightweight Linux where we could run docker(which relies on Linux Kernel features such as cgroups), when starting boot2docker, the typical installation only map the host's /Users directory inside the guest's /Users directory(reasonable from security perspective). Considering Vim in Docker is essentially a process in boot2docker VM, it can only read files inside the VM file system, that explains why we can only edit files in the /Users directory.
Content type
Image
Digest
sha256:b322fe5ae…
Size
129.7 MB
Last updated
over 8 years ago
docker pull benb88/vim_in_docker