VimBox

Mac Key Commands

CMD+P

CTRL+P

Open anything and begin searching for file

CMD+N

New tab

CMD+SHIFT+N

New window

CMD+SHIFT+T

Reopen last closed tab

CMD+W

Close active tab

CMD+S

Save

CMD+Z

Undo

CMD+SHIFT+Z

Redo

CMD+Enter

Distraction free full screen mode (enter/exit)

CMD+E

File explorer (NerdTree)

CMD+SHIFT+[

CTRL+Tab

SHIFT+Space

SHIFT+Tab

Previous tab

CMD+SHIFT+]

CTRL+SHIFT+Tab

Space

Tab

Next tab

CMD+1

Tab 1

F5

Sort lines

CMD+SHIFT+P

Toggle spell check

CMD+/

Toggle comments (line or selection)

CMD+SHIFT+M

Format & indent entire file, restore cursor

CMD+R

Toggle quickfix list

CMD+SHIFT+R

Toggle error list

Tab

Enter

Accept highlighted autocomplete entry

  • Tab also triggers a snippet when applicable, and tab will allow "tabbing" through the snippet placeholders
  • Place custom snippets in ~/.vim/myUltiSnippets/
  • CTRL+Enter / SHIFT+Enter to insert newline when autocomplete window is open

File Explorer / NerdTree

CMD+E

Reveal current file in side bar file explorer

j

Move up

k

Move down

Enter

Open a file in new tab or jump to existing window if already open

s

Open a file in vertical split or jump to existing window if already open

h

Open a file in horizontal split or jump to existing window if already open

u

Move up a directory

o

Expand sub-directory

CD

Set file explorer directory to Vim cwd

cd

Set Vim cwd to file explorer directory

Command-P

Enter

While searching, opens the top hit in new tab or jumps to existing window if already open

c-s

While searching, opens the top hit in a vertical split or jumps to existing window if already open

c-h

While searching, opens the top hit in a horizontal split or jumps to existing window if already open

CTRL+C

Kill slow search

Bundles (vim-plug)

:PlugUpgrade

Check if a new version of vim-plug is available

:PlugStatus

Check the status of plugins

:PlugInstall

Install all specified plugins. Already installed are not re-installed, missing will be installed

:PlugUpdate

Install or update configured plugin

:PlugClean[!]

Remove unused directories, [!] clean without prompt

:PlugDiff

Examine changes from the previous update and the pending changes

:PlugSnapshot

Generate script for restoring the current snapshot of the plugins

Notes