Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

SpaceVim - A Modern Vim/NeoVim Configuration

Things under legendu.net/outdated are outdated technologies that the author does not plan to update any more. Please look for better alternatives.

The SpaceVim project has been abandoned. Check AstroVim instead.

Installation

curl -sLf https://spacevim.org/install.sh | bash
# enable Python3 support
sudo apt install python3 python3-pip
pip3 install -U pynvim

Uninstallation

curl -sLf https://spacevim.org/install.sh | bash -s -- --uninstall

SpaceVim/SpaceVim#84

SpaceVim/SpaceVim#78

Tricks & Traps

  1. SpaceVim might be too slow when editing a large (>50M) text file. One trick helps is to disable plugins when editing large files. For example, if you are using NeoVim, you can use the following command to edit a large file without loading plugins.

     :::bash
     nvim --noplugin /path/to/large/text/file
  2. By default SpaceVim enables GUI colors. This makes SpaceVim extremely slow in terminals that does not support 24 bits true colors. To resolve the performance issue, simplify disable GUI colors by setting enable_guicolors = false under [options] in your SpaceVim configure file $HOME/.SpaceVim.d/init.toml.

  3. SpaceVim has mapped q as smart buffer close. The normal functionality (recording macros) of q can be get by <leader>qr. By default, <leader> is \ so you can use \qr to record macros in SpaceVim.

  4. Custom configuration files are in the directory $HOME/.SpaceVim.d.

Some Useful Key Bindings

Key BindingDescription
SPC b fformat the buffer
SPC t 8highlight characters that execeeds 80th column
SPC t fhighlight characters that execeeds the fill column
SPC [1-9]jump to the windows with the specific number

Window

Key BindingDescription
SPC 1got to window number 1
SPC 2go to window number 2

Comment

Key BindingDescription
SPC c hhide/show comments
SPC c ltoggle comment line

Buffers and Files

Key BindingDescription
:bngo to the next buffer
SPC b ngo to the next buffer
:bpgo to the previous buffer
:e #go to the previous buffer
SPC b pgo to the previous buffer
SPC t fhighlight characters that execeeds the fill column
SPC [1-9]jump to the windows with the specific number

Lanugage Server Protocol

https://spacevim.org/layers/language-server-protocol/

Language Layers

Available Layers >> lang#python

I’m not sure whether this layer is really helpful given that you always uses the LSP layer.

Additional Useful Plugins

[[custom_plugins]]
name = "vim-scripts/dbext.vim"
merged = false

[[custom_plugins]]
repo = "machakann/vim-swap"
merged = false

References