Navigating

Point/Cursor

Navigation is performed using the Vi key bindings hjkl.

Key Binding Description
h move cursor left (origin vim key, no mappings)
j move cursor down (origin vim key, no mappings)
k move cursor up (origin vim key, no mappings)
l move cursor right (origin vim key, no mappings)
H move cursor to the top of the screen (origin vim key, no mappings)
L move cursor to the bottom of the screen (origin vim key, no mappings)
SPC j 0 go to the beginning of line (and set a mark at the previous location in the line)
SPC j $ go to the end of line (and set a mark at the previous location in the line)
SPC t - lock the cursor at the center of the screen

Vim motions with vim-easymotion

https://github.com/easymotion/vim-easymotion/issues/315

Similar to easymotion or f in vimperator for firefox, this mode allows one to jump to any link in help file with two key strokes.

mapping description
o initiate quick jump link mode in help buffer

Unimpaired bindings

Mappings Description
[ SPC Insert space above
] SPC Insert space below
[ b Go to previous buffer
] b Go to next buffer
[ f Go to previous file in directory
] f Go to next file in directory
[ l Go to the previous error
] l Go to the next error
[ c Go to the previous vcs hunk (need VersionControl layer)
] c Go to the next vcs hunk (need VersionControl layer)
[ q Go to the previous error
] q Go to the next error
[ t Go to the previous frame
] t Go to the next frame
[ w Go to the previous window
] w Go to the next window
[ e Move line up
] e Move line down
[ p Paste above current line
] p Paste below current line
g p Select pasted text

Jumping, Joining and Splitting

The SPC j prefix is for jumping, joining and splitting.

Jumping
Key Binding Description
SPC j 0 go to the beginning of line (and set a mark at the previous location in the line)
SPC j $ go to the end of line (and set a mark at the previous location in the line)
SPC j b jump backward
SPC j f jump forward
SPC j d jump to a listing of the current directory
SPC j D jump to a listing of the current directory (other window)
SPC j i jump to a definition in buffer (denite outline)
SPC j I jump to a definition in any buffer (denite outline)
SPC j j jump to a character in the buffer (easymotion)
SPC j J jump to a suite of two characters in the buffer (easymotion)
SPC j k jump to next line and indent it using auto-indent rules
SPC j l jump to a line with avy (easymotion)
SPC j q show the dumb-jump quick look tooltip (TODO)
SPC j u jump to a URL in the current window
SPC j v jump to the definition/declaration of an Emacs Lisp variable (TODO)
SPC j w jump to a word in the current buffer (easymotion)
Joining and splitting
Key Binding Description
J join the current line with the next line
SPC j k go to next line and indent it using auto-indent rules
SPC j n split the current line at point, insert a new line and auto-indent
SPC j o split the current line at point but let point on current line
SPC j s split a quoted string or s-expression in place
SPC j S split a quoted string or s-expression, insert a new line and auto-indent

Window manipulation

Window manipulation key bindings

Every window has a number displayed at the start of the statusline and can be quickly accessed using SPC number.

Key Binding Description
SPC 1 go to window number 1
SPC 2 go to window number 2
SPC 3 go to window number 3
SPC 4 go to window number 4
SPC 5 go to window number 5
SPC 6 go to window number 6
SPC 7 go to window number 7
SPC 8 go to window number 8
SPC 9 go to window number 9

Windows manipulation commands (start with w):

Key Binding Description
SPC w TAB switch to alternate window in the current frame (switch back and forth)
SPC w = balance split windows
SPC w b force the focus back to the minibuffer (TODO)
SPC w c Distraction-free reading current window
SPC w C Distraction-free reading other windows via vim-choosewin
SPC w d delete a window
SPC u SPC w d delete a window and its current buffer (does not delete the file) (TODO)
SPC w D delete another window using vim-choosewin
SPC u SPC w D delete another window and its current buffer using vim-choosewin (TODO)
SPC w t toggle window dedication (dedicated window cannot be reused by a mode) (TODO)
SPC w f toggle follow mode (TODO)
SPC w F create new tab(frame)
SPC w h move to window on the left
SPC w H move window to the left
SPC w j move to window below
SPC w J move window to the bottom
SPC w k move to window above
SPC w K move window to the top
SPC w l move to window on the right
SPC w L move window to the right
SPC w m maximize/minimize a window (maximize is equivalent to delete other windows) (TODO, now only support maximize)
SPC w M swap windows using vim-choosewin
SPC w o cycle and focus between tabs
SPC w p m open messages buffer in a popup window (TODO)
SPC w p p close the current sticky popup window (TODO)
SPC w r rotate windows forward
SPC w R rotate windows backward
SPC w s or SPC w - horizontal split
SPC w S horizontal split and focus new window
SPC w u undo window layout (used to effectively undo a closed window) (TODO)
SPC w U redo window layout (TODO)
SPC w v or SPC w / vertical split
SPC w V vertical split and focus new window
SPC w w cycle and focus between windows
SPC w W select window using vim-choosewin

Buffers and Files

Buffers manipulation key bindings

Buffer manipulation commands (start with b):

Key Binding Description
SPC TAB switch to alternate buffer in the current window (switch back and forth)
SPC b . buffer transient state
SPC b b switch to a buffer (via denite/unite)
SPC b d kill the current buffer (does not delete the visited file)
SPC u SPC b d kill the current buffer and window (does not delete the visited file) (TODO)
SPC b D kill a visible buffer using vim-choosewin
SPC u SPC b D kill a visible buffer and its window using ace-window(TODO)
SPC b C-d kill other buffers
SPC b C-D kill buffers using a regular expression(TODO)
SPC b e erase the content of the buffer (ask for confirmation)
SPC b h open SpaceVim home buffer
SPC b n switch to next buffer avoiding special buffers
SPC b m open Messages buffer
SPC u SPC b m kill all buffers and windows except the current one(TODO)
SPC b p switch to previous buffer avoiding special buffers
SPC b P copy clipboard and replace buffer (useful when pasting from a browser)
SPC b R revert the current buffer (reload from disk)
SPC b s switch to the scratch buffer (create it if needed)
SPC b w toggle read-only (writable state)
SPC b Y copy whole buffer to clipboard (useful when copying to a browser)
z f Make current function or comments visible in buffer as much as possible (TODO)
Create a new empty buffer
Key Binding Description
SPC b N h create new empty buffer in a new window on the left
SPC b N j create new empty buffer in a new window at the bottom
SPC b N k create new empty buffer in a new window above
SPC b N l create new empty buffer in a new window below
SPC b N n create new empty buffer in current window
Special Buffers

In SpaceVim, there are many special buffers, these buffers are created by plugins or SpaceVim itself. And these buffers are not listed.

Files manipulations key bindings

Files manipulation commands (start with f):

Key Binding Description
SPC f b go to file bookmarks
SPC f c copy current file to a different location(TODO)
SPC f C d convert file from unix to dos encoding
SPC f C u convert file from dos to unix encoding
SPC f D delete a file and the associated buffer (ask for confirmation)
SPC f E open a file with elevated privileges (sudo edit)(TODO)
SPC f f open file
SPC f F try to open the file under point
SPC f o open a file using the default external program(TODO)
SPC f R rename the current file(TODO)
SPC f s save a file
SPC f S save all files
SPC f r open a recent file
SPC f t toggle file tree side bar
SPC f T show file tree side bar
SPC f y show and copy current file absolute path in the cmdline
Vim and SpaceVim files

Convenient key bindings are located under the prefix SPC f v to quickly navigate between Vim and SpaceVim specific files.

Key Binding Description
SPC f v v display and copy SpaceVim version
SPC f v d open SpaceVim custom configuration file

File tree

SpaceVim use vimfiler as the default file tree, and the default key binding is F3, and SpaceVim also provide SPC f t and SPC f T to open the file tree. to change the file explore to nerdtree:

  1. # the default value is vimfiler
  2. filemanager = "nerdtree"

VCS integration is supported, there will be a column status, this feature maybe make vimfiler slow, soit is not enabled by default. to enable this feature, add enable_vimfiler_gitstatus = true to your custom config.here is any picture for this feature:

file-tree

File tree navigation

Navigation is centered on the hjkl keys with the hope of providing a fast navigation experience like in vifm:

Key Binding Description
<F3> or SPC f t Toggle file explorer
Within file tree buffers
<Left> or h go to parent node and collapse expanded directory
<Down> or j select next file or directory
<Up> or k select previous file or directory
<Right> or l open selected file or expand directory
Ctrl+j Un-map
Ctrl+l Un-map
E Un-map
N Create new file under corsor
yy Copy file full path to system clipboard
yY Copy file to system clipboard
P Paste file to the position under the cursor
. toggle visible ignored files
sv Split edit
sg Vertical split edit
p Preview
i Switch to directory history
v Quick look
gx Execute with vimfiler associated
' Toggle mark current line
V Clear all marks
Ctrl+r Redraw
Open file with file tree.

If there is only one file buffer opened, a file is opened in the active window, otherwise we need to use vim-choosewin to select a window to open the file.

Key Binding Description
l or Enter open file in one window
sg open file in an vertically split window
sv open file in an horizontally split window