Interface elements

SpaceVim has a minimalistic and distraction free UI:

  • custom airline with color feedback according to current check status
  • custom icon in sign column and error feedbacks for checker.

    Colorschemes

The default colorscheme of SpaceVim is gruvbox.There are two variants of this colorscheme, a dark one and a light one. Some aspectsof these colorscheme can be customized in the custom configuration file, read :h gruvbox.

It is possible to define your default themes in your ~/.SpaceVim.d/init.toml withthe variable colorschemes. For instance, to specify desert:

  1. [options]
  2. colorscheme = "desert"
  3. colorscheme_bg = "dark"
Mappings Description
SPC T n switch to next random colorscheme listed in colorscheme layer.
SPC T s select a theme using a unite buffer.

all the included colorscheme can be found in colorscheme layer.

NOTE:

SpaceVim use true colors by default, so you should make sure your terminal support true colors.for more information see: Colours in terminal

If your terminal do not supports true colors, you can disable SpaceVim true colors featurein [options] section:

  1. enable_guicolors = false

Font

The default font used by SpaceVim is DejaVu Sans Mono for Powerline. It is recommendedto install it on your system if you wish to use it.

To change the default font set the variable guifont in your ~/.SpaceVim.d/init.toml file. By default its value is:

  1. guifont = 'DejaVu Sans Mono for Powerline:h11'

If the specified font is not found, the fallback one will be used (depends on your system).Also note that changing this value has no effect if you are running Vim/Neovim in terminal.

UI Toggles

Some UI indicators can be toggled on and off (toggles start with t and T):

Key Binding Description
SPC t 8 highlight any character past the 80th column
SPC t f display the fill column (by default max_column is 120)
SPC t h h toggle highlight of the current line
SPC t h i toggle highlight indentation levels (TODO)
SPC t h c toggle highlight indentation current column
SPC t h s toggle syntax highlighting
SPC t i toggle indentation guide at point
SPC t n toggle line numbers
SPC t b toggle background
SPC t t open tabs manager
SPC T ~ display ~ in the fringe on empty lines
SPC T F toggle frame fullscreen
SPC T f toggle display of the fringe
SPC T m toggle menu bar
SPC T t toggle tool bar

Statusline

The core#statusline layer provide a heavily customized powerline with the following capabilities:

  • show the window number
  • show the current mode
  • color code for current state
  • show the index of searching result
  • toggle syntax checking info
  • toggle battery info
  • toggle minor mode lighters
  • show VCS information (branch, hunk summary) (need git and VersionControl layer)
Key bindings Description
SPC [1-9] jump to the windows with the specific number

Reminder of the color codes for the states:

Mode Color
Normal Grey
Insert Blue
Visual Orange
Replace Aqua

all the colors based on the current colorscheme

Some elements can be dynamically toggled:

Key Binding Description
SPC t m b toggle the battery status (need to install acpi)
SPC t m c toggle the org task clock (available in org layer)(TODO)
SPC t m m toggle the minor mode lighters
SPC t m M toggle the major mode
SPC t m n toggle the cat! (if colors layer is declared in your dotfile)(TODO)
SPC t m p toggle the cursor position
SPC t m t toggle the time
SPC t m d toggle the date
SPC t m T toggle the mode line itself
SPC t m v toggle the version control info

nerd font installation:

By default SpaceVim use nerd-fonts, please read the documentation of nerd fonts.

syntax checking integration:

When syntax checking minor mode is enabled, a new element appears showing the number of errors, warnings.

Search index integration:

Search index shows the number of occurrence when performing a search via / or ?. SpaceVim integrates nicely the search status by displaying it temporarily when n or N are being pressed. See the 20/22 segment on the screenshot below.

search status

Battery status integration:

acpi displays the percentage of total charge of the battery as well as the time remaining to charge or discharge completely the battery.

A color code is used for the battery status:

Battery State Color
Charging Green
Discharging Orange
Critical Red

all the colors based on the current colorscheme

Statusline separators:

It is possible to easily customize the statusline separator by setting the statusline_separator variable in your custom configuration file and then redraw the statusline. For instance if you want to set back the separator to the well-known arrow separator add the following snippet to your configuration file:

  1. statusline_separator = 'arrow'

here is an exhaustive set of screenshots for all the available separator:

Separator Screenshot
arrow separator-arrow
curve separator-curve
slant separator-slant
nil separator-nil
fire separator-fire

Minor Modes:

The minor mode area can be toggled on and off with SPC t m m

Unicode symbols are displayed by default. Add statusline_unicode_symbols = false to your custom configuration file, statusline will display ASCII characters instead (may be useful in terminal if you cannot set an appropriate font).

The letters displayed in the statusline correspond to the key bindings used to toggle them.

Key Binding Unicode ASCII Mode
SPC t 8 8 toggle highlight of characters for long lines
SPC t f f fill-column-indicator mode
SPC t s s syntax checking (neomake)
SPC t S S enabled in spell checking
SPC t w w whitespace mode

colorscheme of statusline:

current version only support gruvbox/molokai/nord/one/onedark, if you want tocontribute theme please check the template of a statusline theme.

  1. " the theme colors should be
  2. " [
  3. " \ [ a_guifg, a_guibg, a_ctermfg, a_ctermbg],
  4. " \ [ b_guifg, b_guibg, b_ctermfg, b_ctermbg],
  5. " \ [ c_guifg, c_guibg, c_ctermfg, c_ctermbg],
  6. " \ [ z_guibg, z_ctermbg],
  7. " \ [ i_guifg, i_guibg, i_ctermfg, i_ctermbg],
  8. " \ [ v_guifg, v_guibg, v_ctermfg, v_ctermbg],
  9. " \ [ r_guifg, r_guibg, r_ctermfg, r_ctermbg],
  10. " \ [ ii_guifg, ii_guibg, ii_ctermfg, ii_ctermbg],
  11. " \ [ in_guifg, in_guibg, in_ctermfg, in_ctermbg],
  12. " \ ]
  13. " group_a: window id
  14. " group_b/group_c: stausline sections
  15. " group_z: empty area
  16. " group_i: window id in insert mode
  17. " group_v: window id in visual mode
  18. " group_r: window id in select mode
  19. " group_ii: window id in iedit-insert mode
  20. " group_in: windows id in iedit-normal mode
  21. function! SpaceVim#mapping#guide#theme#gruvbox#palette() abort
  22. return [
  23. \ ['#282828', '#a89984', 246, 235],
  24. \ ['#a89984', '#504945', 239, 246],
  25. \ ['#a89984', '#3c3836', 237, 246],
  26. \ ['#665c54', 241],
  27. \ ['#282828', '#83a598', 235, 109],
  28. \ ['#282828', '#fe8019', 235, 208],
  29. \ ['#282828', '#8ec07c', 235, 108],
  30. \ ['#282828', '#689d6a', 235, 72],
  31. \ ['#282828', '#8f3f71', 235, 132],
  32. \ ]
  33. endfunction

this example is for gruvbox colorscheme, if you want to use same colors whenswitch between different colorschemes, you may need to setcustom_color_palette in your custom configuration file. for example:

  1. custom_color_palette = [
  2. ["#282828", "#a89984", 246, 235],
  3. ["#a89984", "#504945", 239, 246],
  4. ["#a89984", "#3c3836", 237, 246],
  5. ["#665c54", 241],
  6. ["#282828", "#83a598", 235, 109],
  7. ["#282828", "#fe8019", 235, 208],
  8. ["#282828", "#8ec07c", 235, 108],
  9. ["#282828", "#689d6a", 235, 72],
  10. ["#282828", "#8f3f71", 235, 132],
  11. ]

tabline

Buffers will be listed on tabline if there is only one tab, each item containsthe index, bufname and the filetype icon. if there are more than one tab, alltabs will be listed on the tabline. each item can be quickly accessed using<Leader> number. default <Leader> is \.

Key Binding Description
<Leader> 1 Jump to index 1 on tabline
<Leader> 2 Jump to index 2 on tabline
<Leader> 3 Jump to index 3 on tabline
<Leader> 4 Jump to index 4 on tabline
<Leader> 5 Jump to index 5 on tabline
<Leader> 6 Jump to index 6 on tabline
<Leader> 7 Jump to index 7 on tabline
<Leader> 8 Jump to index 8 on tabline
<Leader> 9 Jump to index 9 on tabline

SpaceVim tabline also support mouse click, left mouse button will switch to buffer, middle button will delete the buffer.

NOTE: this feature is only supported in neovim with has('tablineat').

Key Binding Description
<Mouse-left> Jump to the buffer
<Mouse-middle> Delete the buffer

Tab manager:

You can also use SPC t t to open the tab manager windows.

key bindings within tab manager windows:

Key Binding Description
o Close or expand tab windows.
r Rename the tab under the cursor.
n Create new named tab below the cursor tab
N Create new tab below the cursor tab
x Delete the tab
<C-S-Up> Move tab backward
<C-S-Down> Move tab forward
<Enter> Jump to windows under the cursor.