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"
- [normal mode] Space then h open vim_in_docker help in VIM
- [normal mode] Space then f quick jump to any words in the screen
- [normal mode] Space then r rebuild ctags for current directory
- [normal mode] Ctrl + ] jump to definition, need to rebuild ctags first
- [normal mode] Ctrl + o jump back to last cursor position
- [normal mode] Ctrl + i jump back to next cursor position
- [normal mode] Space then Space jump to and jump back between the current editing file and the last edited file
- [normal mode] Ctrl + n press multiple times to select multiple current word and edit all of them at the same time
- [visual mode] g then c toggle comment
- [insert mode] Tab auto complete with next candidate
- [insert mode] Shift + Tab auto complete with previous candidate
- [visual mode] Enter then = align selected lines by =
- [visual mode] Enter then : align selected lines by :
- [normal mode] Space then b browse files, use Ctrl + j/Ctrl + k to move between candidates
- [normal mode] Space then a search text patterns in directories using Ag, the result will be shown in a Quickfix window
- [normal mode] Space then t toggle directory tree
- [normal mode] Space then T open directory tree and select current editing file
- [normal mode] Space then s split a new horizontal window to the left
- [normal mode] Space then S split a new vertical window to the top
- [normal mode] Space then o toggle window/fullscreen
- [normal mode] Space then w shortcut for :w
- [normal mode] Space then W shortcut for :w!
- [normal mode] Space then q shortcut for :q
- [normal mode] Space then Q shortcut for :q!
- [normal mode] Ctrl + h/Ctrl + j/Ctrl + k/Ctrl + 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 mappings
In 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.