mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-01-23 12:50:04 +08:00
Doc: fix typos. (#2481)
This commit is contained in:
parent
472b71c085
commit
f5c8244f2c
@ -11,6 +11,6 @@ permalink: /404
|
||||
{% else %}
|
||||
|
||||
## Oops! The page you requested was not found!
|
||||
> you can go to [home](https://spacevim.org) or checkout [Blogs](https://spacevim.org/blog/)
|
||||
> You can go to [home](https://spacevim.org) or checkout [Blogs](https://spacevim.org/blog/)
|
||||
|
||||
{% endif %}
|
||||
|
@ -5,14 +5,14 @@ description: "SpaceVim is a community-driven vim distribution with layer feature
|
||||
|
||||
# About
|
||||
|
||||
[SpaceVim](https://github.com/SpaceVim/SpaceVim) is a community-driven vim distribution with layer feature.
|
||||
[SpaceVim](https://github.com/SpaceVim/SpaceVim) is a community-driven Vim distribution with layer feature.
|
||||
SpaceVim manages collections of plugins in layers. Layers make it easy for you, the user, to enable a new
|
||||
language or feature by grouping all the related plugins together. It got inspired by spacemacs.
|
||||
|
||||
### Goals
|
||||
|
||||
- more IDE-like features in vim and neovim
|
||||
- better default different languages
|
||||
- More IDE-like features in Vim and Neovim
|
||||
- Better default different languages
|
||||
|
||||
### Credits & Thanks
|
||||
|
||||
|
@ -14,8 +14,8 @@ description: "A list of available APIs in SpaceVim, provide compatible functions
|
||||
|
||||
#### Introduction
|
||||
|
||||
SpaceVim provides many public apis, you can use this apis in your plugins.
|
||||
This is an example for how to load API, and how to use the public functions within the APIs.
|
||||
SpaceVim provides many public APIs, you can use these APIs in your plugins.
|
||||
The following example shows how to load APIs, and how to use the public functions within the APIs.
|
||||
|
||||
```vim
|
||||
" use SpaceVim#api#import() to load the API
|
||||
@ -36,7 +36,7 @@ echom s:file.pathSeparator
|
||||
|
||||
## Available APIs
|
||||
|
||||
here is the list of all available APIs, and welcome to contribute to SpaceVim.
|
||||
Here is the list of all available APIs, and welcome to contribute to SpaceVim.
|
||||
|
||||
| Name | Description |
|
||||
| ------------------------------------- | -------------------------------------------------------------------------------------------------- |
|
||||
|
@ -6,7 +6,7 @@ description: "A list of latest blog about the feature of SpaceVim and tutorials
|
||||
# Blog
|
||||
|
||||
Here you can learn more about SpaceVim with our tutorials and find out what's
|
||||
going on. feel free to [feed this blog via RSS](../../feed.xml):
|
||||
going on. Feel free to [feed this blog via RSS](../../feed.xml):
|
||||
|
||||
<ul>
|
||||
{% for post in site.categories.blog %}
|
||||
|
@ -33,7 +33,7 @@ Visit these resources for help or general questions.
|
||||
### Chat
|
||||
|
||||
All of these channels are bridged together. Click on one of the badges
|
||||
below to join the chat, In all of these channels, messages from
|
||||
below to join the chat. In all of these channels, messages from
|
||||
`SpaceVimBot` is sent by remote user, and the format of the remote
|
||||
messages is:
|
||||
|
||||
|
@ -39,9 +39,9 @@ description: "conventions of contributing to SpaceVim, including the coding styl
|
||||
|
||||
## Commit emoji convention
|
||||
|
||||
- `:memo:` Add comment or doc
|
||||
- `:memo:` Add comment or doc.
|
||||
- `:gift:` New feature.
|
||||
- `:bug:` Bug fix
|
||||
- `:bug:` Bug fix.
|
||||
- `:bomb:` Breaking compatibility.
|
||||
- `:white_check_mark:` Write test.
|
||||
- `:fire:` Remove something.
|
||||
@ -83,7 +83,7 @@ Avoid using :s[ubstitute] as it moves the cursor and prints error messages. Pref
|
||||
|
||||
The meaning of the g flag depends upon the gdefault setting. If you do use :substitute you must save gdefault, set it to 0 or 1, perform the substitution, and then restore it.
|
||||
|
||||
For many vim commands, functions exist that do the same thing with fewer side effects. See :help functions() for a list of built-in functions.
|
||||
For many Vim commands, functions exist that do the same thing with fewer side effects. See `:help functions` for a list of built-in functions.
|
||||
|
||||
#### Fragile commands
|
||||
|
||||
@ -132,9 +132,9 @@ Use python only when it provides critical functionality, for example when writin
|
||||
|
||||
#### Other Languages
|
||||
|
||||
**Use vimscript instead.**
|
||||
**Use Vimscript instead.**
|
||||
|
||||
Avoid using other scripting languages such as ruby and lua. We can not guarantee that the end user's vim has been compiled with support for non-vimscript languages.
|
||||
Avoid using other scripting languages such as ruby and lua. We cannot guarantee that the end user's Vim has been compiled with support for non-vimscript languages.
|
||||
|
||||
#### Plugin layout
|
||||
|
||||
@ -198,8 +198,7 @@ Use :setlocal and &l: instead of :set and & unless you have explicit reason to d
|
||||
|
||||
### Style
|
||||
|
||||
Follow google style conventions. When in doubt, treat vimscript style like
|
||||
python style.
|
||||
Follow google style conventions. When in doubt, treat vimscript style like python style.
|
||||
|
||||
#### Whitespace
|
||||
|
||||
@ -247,7 +246,7 @@ such as "noremap <leader>gf :grep -f ".
|
||||
|
||||
When continuing a multi-line command a pipe can be substituted for this space as necessary, as follows:
|
||||
|
||||
```viml
|
||||
```vim
|
||||
autocommand BufEnter <buffer>
|
||||
\ if !empty(s:var)
|
||||
\| call some#function()
|
||||
@ -288,11 +287,11 @@ Always prefix variables with their scope.
|
||||
|
||||
## Key notations
|
||||
|
||||
- use capital case and angle brackets for keyboard button: `<Down>`, `<Up>`
|
||||
- use uppercase for custom leader: `SPC`, `WIN`, `UNITE`, `DENITE`
|
||||
- use space as delimiter for key sequences: `SPC t w`, `<Leader> f f`
|
||||
- use `/` for alternative sequences: `<Tab>` / `<C-n>`
|
||||
- Use `Ctrl-e` instead of `<C-e>` in documentation
|
||||
- Use capital case and angle brackets for keyboard buttons: `<Down>`, `<Up>`.
|
||||
- Use uppercase for custom leader: `SPC`, `WIN`, `UNITE`, `DENITE`.
|
||||
- Use space as delimiter for key sequences: `SPC t w`, `<Leader> f f`.
|
||||
- Use `/` for alternative sequences: `<Tab>` / `<C-n>`.
|
||||
- Use `Ctrl-e` rather than `<C-e>` in documentation.
|
||||
|
||||
## Thanks:
|
||||
|
||||
|
@ -30,10 +30,10 @@ description: "General contributing guidelines and changelog of SpaceVim, includi
|
||||
|
||||
<!-- vim-markdown-toc -->
|
||||
|
||||
SpaceVim is an effort of all the volunteers, we encourage you to pitch in. The community makes SpaceVim what it is.
|
||||
We have a few guidelines, which we ask all contributors to follow.
|
||||
SpaceVim is an effort of all the volunteers. We encourage you to pitch in. The community makes SpaceVim what it is.
|
||||
We have a few guidelines which we need all contributors to follow.
|
||||
|
||||
Development happens in the GitHub repository. here is a throughput graph of the repository for the last few weeks:
|
||||
Development happens in the GitHub repository. Here is a throughput graph of the repository for the last few weeks:
|
||||
|
||||
[![Throughput Graph](https://graphs.waffle.io/SpaceVim/SpaceVim/throughput.svg)](https://waffle.io/SpaceVim/SpaceVim/metrics/throughput)
|
||||
|
||||
@ -52,9 +52,9 @@ If you want to ask an usage question, be sure to look first into some places as
|
||||
|
||||
## Reporting issues
|
||||
|
||||
Issues have to be reported on [issues tracker](https://github.com/SpaceVim/SpaceVim/issues), Please:
|
||||
Issues have to be reported on [issues tracker](https://github.com/SpaceVim/SpaceVim/issues), please:
|
||||
|
||||
- Check that there is no duplicate issue in the issues tracker, you can search for keywords in the issues tracker.
|
||||
- Check that no duplicate issue is in the issues tracker, you can search for keywords in the issues tracker.
|
||||
- Check that the issue has not been fixed in latest version of SpaceVim, please update your SpaceVim, and try to reproduce the bug here.
|
||||
- Use a clear title and follow the issue template.
|
||||
- Include details on how to reproduce it, just like a step by step guide.
|
||||
@ -65,7 +65,7 @@ Code contributions are welcome. Please read the following sections carefully. In
|
||||
|
||||
### License
|
||||
|
||||
The license is GPLv3 for all the parts of SpaceVim. this includes:
|
||||
The license is GPLv3 for all the parts of SpaceVim. This includes:
|
||||
|
||||
- The initialization and core files.
|
||||
- All the layer files.
|
||||
@ -91,32 +91,29 @@ Pull request titles should contain one of these prefix:
|
||||
|
||||
- `Add:` Adding a new feature.
|
||||
- `Change:` Change default behaviors or the existing features.
|
||||
- `Fixed:` Fix some bugs
|
||||
- `Fixed:` Fix some bugs.
|
||||
- `Remove:` Remove any existing features.
|
||||
- `Doc:` update the help file.
|
||||
- `Doc:` Update the help file.
|
||||
- `Website:` Update the content of website.
|
||||
|
||||
Here is an example:
|
||||
|
||||
`Website: update the lang#c layer page`
|
||||
`Website: Update the lang#c layer page.`
|
||||
|
||||
#### Rebase on top of upstream master
|
||||
|
||||
- fork SpaceVim repository
|
||||
- clone your repository
|
||||
|
||||
- Fork SpaceVim repository
|
||||
- Clone your repository
|
||||
```sh
|
||||
git clone ${YOUR_OWN_REPOSITORY_URL}
|
||||
```
|
||||
|
||||
- add upstream remote
|
||||
|
||||
- Add upstream remote
|
||||
```sh
|
||||
git remote add upstream https://github.com/SpaceVim/SpaceVim.git
|
||||
```
|
||||
|
||||
- fetch upstream and rebase on top of upstream master
|
||||
|
||||
- Fetch upstream and rebase on top of upstream master
|
||||
```sh
|
||||
git fetch upstream
|
||||
git rebase upstream/master
|
||||
@ -132,7 +129,7 @@ git rebase upstream/master
|
||||
|
||||
#### For complex PRs
|
||||
|
||||
Squash only the commits with uninteresting changes like typos, syntax fixes, etc… and keep the important and isolated steps in different commits.
|
||||
Squash only the commits with uninteresting changes like typos, syntax fixes, etc. And keep the important and isolated steps in different commits.
|
||||
|
||||
Those PRs are merged and explicitly not fast-forwarded.
|
||||
|
||||
@ -171,19 +168,19 @@ Further paragraphs come after blank lines.
|
||||
- Use a hanging indent
|
||||
```
|
||||
|
||||
[Gita] provide vim mode for Git commit messages, which helps you to comply to these guidelines.
|
||||
[Gita] provide Vim mode for Git commit messages, which helps you to comply to these guidelines.
|
||||
|
||||
### Contributing a layer
|
||||
|
||||
Please read the layers documentation first.
|
||||
|
||||
Layer with no associated configuration will be rejected. For instance a layer with just a package and a hook can be easily replaced by the usage of the variable `g:spacevim_custom_plugins`.
|
||||
Layer with no associated configuration will be rejected. For instance a layer with just a package and a hook can be easily replaced by the usage of the variable `custom_plugins`.
|
||||
|
||||
#### File header
|
||||
|
||||
The file header for vim script should look like the following template:
|
||||
The file header for Vim script should look like the following template:
|
||||
|
||||
```viml
|
||||
```vim
|
||||
"=============================================================================
|
||||
" FILENAME --- NAME layer file for SpaceVim
|
||||
" Copyright (c) 2012-2016 Shidong Wang & Contributors
|
||||
@ -193,17 +190,17 @@ The file header for vim script should look like the following template:
|
||||
"=============================================================================
|
||||
```
|
||||
|
||||
You should replace FILENAME by the name of the file (e.g. foo.vim) and NAME by the name of the layer you are creating, don’t forget to replace **YOUR NAME** and **YOUR EMAIL** also.
|
||||
You should replace FILENAME by the name of the file (e.g. foo.vim) and NAME by the name of the layer you are creating, don’t forget to replace **YOUR NAME** and **YOUR EMAIL** neighter.
|
||||
|
||||
#### Author of a new layer
|
||||
|
||||
In the files header, change the default author name (Shidong Wang) to your name.
|
||||
In the files header, replace the default author name (Shidong Wang) with your name.
|
||||
|
||||
Here is an example for creating a new layer names `foo`:
|
||||
The following example shows how to create a new layer names `foo`:
|
||||
|
||||
1. fork SpaceVim repo
|
||||
2. add a layer file `autoload/SpaceVim/layers/foo.vim` for `foo` layer.
|
||||
3. edit layer file, check out the example below:
|
||||
1. Fork SpaceVim repo.
|
||||
2. Add a layer file `autoload/SpaceVim/layers/foo.vim` for `foo` layer.
|
||||
3. Edit layer file, check out the example below:
|
||||
|
||||
```vim
|
||||
"=============================================================================
|
||||
@ -260,28 +257,28 @@ endfunction
|
||||
|
||||
4. Add layer document `docs/layers/foo.md` for `foo` layer.
|
||||
5. Open `docs/layers/index.md`, run `:call SpaceVim#dev#layers#update()` to update layer list.
|
||||
6. send PR to SpaceVim.
|
||||
6. Send PR to SpaceVim.
|
||||
|
||||
#### Contributor to an existing layer
|
||||
|
||||
If you are contributing to an already existing layer, you should not modify any header file.
|
||||
If you want to contribute to an already existing layer, you should not modify any header file.
|
||||
|
||||
#### Contributing a keybinding
|
||||
|
||||
Mappings are an important part of SpaceVim.
|
||||
|
||||
First if you want to have some personal mappings, This can be done in your `~/.SpaceVim.d/init.vim` file.
|
||||
First if you want to have some personal mappings. This can be done in your bootstrap function.
|
||||
|
||||
If you think it worth contributing a new mappings then be sure to read the documentation to find the best mappings, then create a Pull-Request with your changes.
|
||||
If you think it worth contributing new mappings, be sure to read the documentation to find the best mappings, then create a Pull-Request with your mappings.
|
||||
|
||||
ALWAYS document your new mappings or mappings changes inside the relevant documentation file.
|
||||
It should be the the layer file and the [documentation](../documentation/).
|
||||
It should be the layername.md and the [documentation](../documentation/).
|
||||
|
||||
##### Language specified key bindings
|
||||
|
||||
All language specified key bindings are started with `SPC l` prefix.
|
||||
All language specified key bindings prefix `SPC l`.
|
||||
|
||||
we recommended to keep same language specified key bindings for different languages:
|
||||
We recommend to keep same language specified key bindings for different languages:
|
||||
|
||||
| Key Binding | Description |
|
||||
| ----------- | ------------------------------------------------ |
|
||||
@ -295,7 +292,7 @@ we recommended to keep same language specified key bindings for different langua
|
||||
| `SPC l s l` | send line and keep code buffer focused |
|
||||
| `SPC l s s` | send selection text and keep code buffer focused |
|
||||
|
||||
All of these above key bindings are just recommended as default, but it also base on the language layer itself.
|
||||
All above key bindings are just recommended as default, but they also base on the language layer itself.
|
||||
|
||||
#### Contributing a banner
|
||||
|
||||
@ -307,7 +304,7 @@ You are free to choose a reasonable height size but the width size should be aro
|
||||
|
||||
## Build with SpaceVim
|
||||
|
||||
SpaceVim provide a lot of public [APIs](../api/), you can create plugins base on this APIs. also you can add a badge to the README.md of your plugin.
|
||||
SpaceVim provide a lot of public [APIs](../api/), you can create plugins base on this APIs. Also you can add a badge to the README.md of your plugin.
|
||||
|
||||
![](https://img.shields.io/badge/build%20with-SpaceVim-ff69b4.svg)
|
||||
|
||||
|
@ -26,7 +26,7 @@ description: "General documentation about how to using SpaceVim, including the q
|
||||
- [Font](#font)
|
||||
- [UI Toggles](#ui-toggles)
|
||||
- [Statusline](#statusline)
|
||||
- [tabline](#tabline)
|
||||
- [Tabline](#tabline)
|
||||
- [General Key bindings](#general-key-bindings)
|
||||
- [Window manager](#window-manager)
|
||||
- [File Operations](#file-operations)
|
||||
@ -111,7 +111,7 @@ Innovative real-time display of available key bindings. Simple query system to q
|
||||
|
||||
**Consistent**
|
||||
|
||||
Similar functionalities have the same key binding everywhere thanks to a clearly defined set of conventions. Documentation is mandatory for any layer that ships with SpaceVim.
|
||||
Similar functionalities have the same key bindings everywhere thanks to a clearly defined set of conventions. Documentation is mandatory for any layer that ships with SpaceVim.
|
||||
|
||||
**Crowd-Configured**
|
||||
|
||||
@ -144,11 +144,11 @@ Depicts a common frontend development scenario with JavaScript (jQuery), SASS, a
|
||||
|
||||
Non-code buffers show a Neovim terminal, a TagBar window, a Vimfiler window and a TernJS definition window.
|
||||
|
||||
to get more screenshots, see: [issue #415](https://github.com/SpaceVim/SpaceVim/issues/415)
|
||||
To get more screenshots, see: [issue #415](https://github.com/SpaceVim/SpaceVim/issues/415)
|
||||
|
||||
## Who can benefit from this?
|
||||
|
||||
- **Elementary** vim users.
|
||||
- **Elementary** Vim users.
|
||||
- Vim users pursuing a beautiful appearance.
|
||||
- Vim users wanting to lower the [risk of RSI](http://en.wikipedia.org/wiki/Repetitive_strain_injury).
|
||||
- Vim users wanting to learn a different way to edit files.
|
||||
@ -162,7 +162,7 @@ There are several methods of updating the core files of SpaceVim. It is recommen
|
||||
|
||||
**Automatic Updates**
|
||||
|
||||
NOTE: By default, this feature is disabled, It will slow down the startup of Vim/neovim. If you like this feature, add `let g:spacevim_automatic_update = 1` to your custom configuration file.
|
||||
NOTE: By default, this feature is disabled. It would slow down the startup of Vim/Neovim. If you like this feature, add `automatic_update = 1` to your custom configuration file.
|
||||
|
||||
SpaceVim will automatically check for a new version every startup. You have restart Vim after updating.
|
||||
|
||||
@ -172,7 +172,7 @@ Use `:SPUpdate SpaceVim` in SpaceVim buffer. This command will open a new buffer
|
||||
|
||||
**Updating Manually with git**
|
||||
|
||||
Yor can close Vim/neovim and update the git repository to update manually:
|
||||
Yor can close Vim/Neovim and update the git repository to update manually:
|
||||
|
||||
`git -C ~/.SpaceVim pull`.
|
||||
|
||||
@ -188,7 +188,7 @@ Use `:SPDebugInfo!` command to display the log of SpaceVim. You also can use `SP
|
||||
|
||||
The very first time SpaceVim starts up, it will ask you to choose a mode, then it will create a `SpaceVim.d/init.toml` in your `HOME` directory. All User configurations can be stored in your `~/.SpaceVim.d` directory.
|
||||
|
||||
`~/.SpaceVim.d/` will be added to `&runtimepath` of vim.
|
||||
`~/.SpaceVim.d/` will be added to `&runtimepath` of Vim.
|
||||
|
||||
It is also possible to override the location of `~/.SpaceVim.d/` using the environment
|
||||
variable `SPACEVIMDIR`. Of course you can also use symlinks to change the location of
|
||||
@ -198,7 +198,7 @@ SpaceVim also support local config file for project, the init file is `.SpaceVim
|
||||
in the root of your project. `.SpaceVim.d/` will also be added into runtimepath.
|
||||
|
||||
All SpaceVim options can be found in `:h SpaceVim-config`, the key is same as
|
||||
the option name(just remove `g:spacevim_` prefix).
|
||||
the option name with the prefix `g:spacevim_` being removed.
|
||||
|
||||
Comprehensive documentation is available for each layer by `:h SpaceVim`.
|
||||
|
||||
@ -210,14 +210,14 @@ If you want to add plugins from github, just add the repo name to the `custom_pl
|
||||
[[custom_plugins]]
|
||||
name = "lilydjwg/colorizer"
|
||||
on_cmd = ["ColorHighlight", "ColorToggle"]
|
||||
merged = 0
|
||||
merged = false
|
||||
```
|
||||
|
||||
`on_cmd` option means this plugin will be loaded only when the following commands are called. for more options see `:h dein-options`
|
||||
`on_cmd` option means this plugin will be loaded only when the following commands are called. For more options see `:h dein-options`.
|
||||
|
||||
**disable existing plugins**
|
||||
|
||||
if you want to disable plugins which are added by SpaceVim, you can use SpaceVim `disabled_plugins` options:
|
||||
If you want to disable plugins which are added by SpaceVim, you can use SpaceVim `disabled_plugins` options:
|
||||
|
||||
```toml
|
||||
[options]
|
||||
@ -232,26 +232,26 @@ SpaceVim provides two kinds of bootstrap functions for custom configurations and
|
||||
The bootstrap functions should be placed to the `autoload` directory in `runtimepath`, please refer to `:h autoload-functions` for further instructions. In our case, create file `.SpaceVim.d/autoload/myspacevim.vim` with contents for example
|
||||
|
||||
```vim
|
||||
func! myspacevim#before() abort
|
||||
function! myspacevim#before() abort
|
||||
let g:neomake_enabled_c_makers = ['clang']
|
||||
nnoremap jk <Esc>
|
||||
endf
|
||||
endfunction
|
||||
|
||||
func! myspacevim#after() abort
|
||||
function! myspacevim#after() abort
|
||||
iunmap jk
|
||||
endf
|
||||
endfunction
|
||||
```
|
||||
|
||||
the `bootstrap_before` will be called after custom configuration file is loaded. and the `bootstrap_after` will
|
||||
be called after VimEnter autocmd.
|
||||
The `bootstrap_before` will be called after custom configuration file is loaded.
|
||||
And the `bootstrap_after` will be called after VimEnter autocmd.
|
||||
|
||||
If you want to add custom `SPC` prefix key bindings, you can add them to bootstrap function, **be sure** the key bindings are not used in SpaceVim.
|
||||
|
||||
```vim
|
||||
func! myspacevim#before() abort
|
||||
function! myspacevim#before() abort
|
||||
call SpaceVim#custom#SPCGroupName(['G'], '+TestGroup')
|
||||
call SpaceVim#custom#SPC('nore', ['G', 't'], 'echom 1', 'echomessage 1', 1)
|
||||
endf
|
||||
endfunction
|
||||
```
|
||||
|
||||
### Vim compatible mode
|
||||
@ -260,15 +260,15 @@ The different key bindings between SpaceVim and origin vim are shown as below.
|
||||
|
||||
- The `s` key does replace cursor char, but in SpaceVim it is the `Window` key bindings specific leader key by default (which can be set on another key binding in dotfile). If you still prefer the origin function of `s`, you can use an empty string to disable this feature.
|
||||
|
||||
The option is `g:spacevim_windows_leader`, default value is `s`.
|
||||
The option is `windows_leader`, default value is `s`.
|
||||
|
||||
- The `,` key does repeat last `f`, `F`, `t` and `T` in vim, but in SpaceVim it is the language specified Leader key.
|
||||
|
||||
The option is `g:spacevim_enable_language_specific_leader`, default value is `1`.
|
||||
The option is `enable_language_specific_leader`, default value is `1`.
|
||||
|
||||
- The `q` key does recording, but in SpaceVim it is used for closing window smart. If you still prefer the origin function of `q`, you can use an empty string to disable this feature.
|
||||
|
||||
The option is `g:spacevim_windows_smartclose`, default value is `q`.
|
||||
The option is `windows_smartclose`, default value is `q`.
|
||||
|
||||
- The `Ctrl-a` binding on the command line can auto-complete variable names, but in SpaceVim it moves to the cursor to the beginning of the command line.
|
||||
- `Ctrl-b` in command line mode is mapped to `<Left>`, which will move cursor to the left.
|
||||
@ -305,21 +305,17 @@ In SpaceVim, a layer is a single file. In a layer, for example, `autocomplete` l
|
||||
|
||||
### Debug upstream plugins
|
||||
|
||||
If you found one of the built-in plugins has bugs, and you want to debug that plugin. you can follow these steps:
|
||||
If you found one of the built-in plugins has bugs, and you want to debug that plugin. You can follow these steps:
|
||||
|
||||
1. Disable this plugin
|
||||
|
||||
For example, disable neomake.vim:
|
||||
|
||||
Take disabling neomake.vim for instance:
|
||||
```toml
|
||||
[option]
|
||||
[options]
|
||||
disabled_plugins = ["neomake.vim"]
|
||||
```
|
||||
|
||||
2. Add a forked plugin or add a local plugin
|
||||
|
||||
Use toml file to add custom forked plugins:
|
||||
|
||||
```toml
|
||||
[[custom_plugins]]
|
||||
name = "wsdjeg/neomake.vim"
|
||||
@ -328,7 +324,6 @@ Use toml file to add custom forked plugins:
|
||||
```
|
||||
|
||||
Use the `bootstrap_before` function to add local plugin:
|
||||
|
||||
```vim
|
||||
function! myspacevim#before() abort
|
||||
set rtp+=~/path/to/your/localplugin
|
||||
@ -372,7 +367,7 @@ the variable colorschemes. For instance, to specify `desert`:
|
||||
colorscheme_bg = "dark"
|
||||
```
|
||||
|
||||
| Mappings | Description |
|
||||
| Mappings | Descriptions |
|
||||
| --------- | -------------------------------------------------------------- |
|
||||
| `SPC T n` | switch to next random colorscheme listed in colorscheme layer. |
|
||||
| `SPC T s` | select a theme using a unite buffer. |
|
||||
@ -382,7 +377,7 @@ All the included colorschemes can be found in [colorscheme layer](../layers/colo
|
||||
**NOTE**:
|
||||
|
||||
SpaceVim uses true colors by default, so you should make sure your terminal supports true colors.
|
||||
for more information see: [Colours in terminal](https://gist.github.com/XVilka/8346728).
|
||||
For more information see: [Colours in terminal](https://gist.github.com/XVilka/8346728).
|
||||
|
||||
If your terminal does not support true colors, you can disable SpaceVim true colors feature in `[options]` section:
|
||||
|
||||
@ -392,8 +387,8 @@ If your terminal does not support true colors, you can disable SpaceVim true col
|
||||
|
||||
### Font
|
||||
|
||||
The default font used by SpaceVim is [SauceCodePro Nerd Font Mono](https://github.com/ryanoasis/nerd-fonts/releases/download/v2.0.0/SourceCodePro.zip). It is recommended
|
||||
to install it on your system if you wish to use it.
|
||||
The default font used by SpaceVim is [SauceCodePro Nerd Font Mono](https://github.com/ryanoasis/nerd-fonts/releases/download/v2.0.0/SourceCodePro.zip).
|
||||
It is recommended to 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:
|
||||
|
||||
@ -408,8 +403,8 @@ Also note that changing this value has no effect if you are running Vim/Neovim i
|
||||
|
||||
Some UI indicators can be toggled on and off (toggles start with t and T):
|
||||
|
||||
| Key Binding | Description |
|
||||
| ----------- | -------------------------------------------------------- |
|
||||
| Key Bindings | Descriptions |
|
||||
| ------------ | -------------------------------------------------------- |
|
||||
| `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 |
|
||||
@ -440,7 +435,7 @@ The `core#statusline` layer provides a heavily customized powerline with the fol
|
||||
- toggle minor mode lighters
|
||||
- show VCS information (branch, hunk summary) (need `git` and `VersionControl` layer)
|
||||
|
||||
| Key bindings | Description |
|
||||
| Key Bindings | Descriptions |
|
||||
| ------------ | -------------------------------------------- |
|
||||
| `SPC [1-9]` | jump to the windows with the specific number |
|
||||
|
||||
@ -457,13 +452,13 @@ All the colors based on the current colorscheme
|
||||
|
||||
Some elements can be dynamically toggled:
|
||||
|
||||
| Key Binding | Description |
|
||||
| ----------- | ------------------------------------------------------------------- |
|
||||
| Key Bindings | Descriptions |
|
||||
| ------------ | ------------------------------------------------------------------- |
|
||||
| `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 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 |
|
||||
@ -506,7 +501,7 @@ It is possible to easily customize the statusline separator by setting the `stat
|
||||
statusline_separator = 'arrow'
|
||||
```
|
||||
|
||||
here is an exhaustive set of screenshots for all the available separator:
|
||||
Here is an exhaustive set of screenshots for all the available separator:
|
||||
|
||||
| Separator | Screenshot |
|
||||
| --------- | ------------------------------------------------------------------------------------------------------------------------- |
|
||||
@ -518,14 +513,14 @@ here is an exhaustive set of screenshots for all the available separator:
|
||||
|
||||
**Minor Modes:**
|
||||
|
||||
The minor mode area can be toggled on and off with `SPC t m m`
|
||||
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 |
|
||||
| ----------- | ------- | ----- | --------------------------------------------- |
|
||||
| Key Bindings | 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) |
|
||||
@ -534,8 +529,7 @@ The letters displayed in the statusline correspond to the key bindings used to t
|
||||
|
||||
**colorscheme of statusline:**
|
||||
|
||||
By default SpaceVim only support colorschemes which has
|
||||
been included in [colorscheme layer](../layers/colorscheme/).
|
||||
By default SpaceVim only support colorschemes which has been included in [colorscheme layer](../layers/colorscheme/).
|
||||
|
||||
If you want to contribute theme please check the template of a statusline theme.
|
||||
|
||||
@ -576,8 +570,8 @@ endfunction
|
||||
```
|
||||
|
||||
This example is the gruvbox colorscheme, if you want to use same colors when
|
||||
switch between different colorschemes, you may need to set
|
||||
`custom_color_palette` in your custom configuration file. for example:
|
||||
switching between different colorschemes, you may need to set
|
||||
`custom_color_palette` in your custom configuration file. For example:
|
||||
|
||||
```toml
|
||||
custom_color_palette = [
|
||||
@ -593,14 +587,14 @@ custom_color_palette = [
|
||||
]
|
||||
```
|
||||
|
||||
### tabline
|
||||
### Tabline
|
||||
|
||||
Buffers will be listed on tabline if there is only one tab, each item contains
|
||||
Buffers will be listed on the tabline if there is only one tab, each item contains
|
||||
the index, bufname and the filetype icon. If there are more than one tab, all
|
||||
tabs will be listed on the tabline. each item can be quickly accessed using
|
||||
`<Leader> number`. default `<Leader>` is `\`.
|
||||
tabs will be listed on the tabline. Each item can be quickly accessed by using
|
||||
`<Leader> number`. Default `<Leader>` is `\`.
|
||||
|
||||
| Key Binding | Description |
|
||||
| Key Bindings | Descriptions |
|
||||
| ------------ | -------------------------- |
|
||||
| `<Leader> 1` | Jump to index 1 on tabline |
|
||||
| `<Leader> 2` | Jump to index 2 on tabline |
|
||||
@ -614,9 +608,9 @@ tabs will be listed on the tabline. each item can be quickly accessed using
|
||||
|
||||
SpaceVim tabline also supports mouse click, left mouse button will switch to buffer, while middle button will delete the buffer.
|
||||
|
||||
**NOTE:** This feature is only supported in neovim with `has('tablineat')`.
|
||||
**NOTE:** This feature is only supported in Neovim with `has('tablineat')`.
|
||||
|
||||
| Key Binding | Description |
|
||||
| Key Bindings | Descriptions |
|
||||
| ---------------- | ------------------ |
|
||||
| `<Mouse-left>` | Jump to the buffer |
|
||||
| `<Mouse-middle>` | Delete the buffer |
|
||||
@ -627,7 +621,7 @@ You can also use `SPC t t` to open the tab manager windows.
|
||||
|
||||
Key bindings within tab manager windows:
|
||||
|
||||
| Key Binding | Description |
|
||||
| Key Bindings | Descriptions |
|
||||
| ----------------- | ----------------------------------------- |
|
||||
| `o` | Close or expand tab windows. |
|
||||
| `r` | Rename the tab under the cursor. |
|
||||
@ -642,7 +636,7 @@ Key bindings within tab manager windows:
|
||||
|
||||
### Window manager
|
||||
|
||||
Windows manager key bindings can only be used in normal mode. The default leader `[WIN]` is `s`, you
|
||||
Window manager key bindings can only be used in normal mode. The default leader `[WIN]` is `s`, you
|
||||
can change it via `windows_leader` option:
|
||||
|
||||
```toml
|
||||
@ -650,7 +644,7 @@ can change it via `windows_leader` option:
|
||||
windows_leader = "s"
|
||||
```
|
||||
|
||||
| Key bindings | Description |
|
||||
| Key Bindings | Descriptions |
|
||||
| -------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
||||
| `q` | Smart buffer close |
|
||||
| `WIN p` | Split nicely |
|
||||
@ -670,7 +664,7 @@ SpaceVim has mapped normal `q` as smart buffer close, the normal func of `q`
|
||||
can be get by `<Leader> q r`, if you want to disable this feature, you can use `vimcompatible` mode.
|
||||
|
||||
| Key | Mode | Action |
|
||||
| ----------------- | :-----------: | ------------------------------------------------------------------------------ |
|
||||
| ----------------- | ------------- | ------------------------------------------------------------------------------ |
|
||||
| `<Leader> y` | visual | Copy selection to X11 clipboard ("+y) |
|
||||
| `Ctrl-c` | Normal | Copy full path of current buffer to X11 clipboard |
|
||||
| `<Leader> Ctrl-c` | Normal | Copy github.com url of current buffer to X11 clipboard(if it is a github repo) |
|
||||
@ -696,7 +690,7 @@ can be get by `<Leader> q r`, if you want to disable this feature, you can use `
|
||||
|
||||
### File Operations
|
||||
|
||||
| Key binding | Description |
|
||||
| Key Bindings | Descriptions |
|
||||
| -------------- | ------------------------------------------ |
|
||||
| `<Leader> c d` | Switch to the directory of the open buffer |
|
||||
| `SPC f s` | Write (:w) |
|
||||
@ -705,14 +699,14 @@ can be get by `<Leader> q r`, if you want to disable this feature, you can use `
|
||||
|
||||
### Editor UI
|
||||
|
||||
| Key binding | Description |
|
||||
| Key Bindings | Descriptions |
|
||||
| --------------------- | ---------------------------------------------------------------- |
|
||||
| `<F2>` | Toggle tagbar |
|
||||
| `<F3>` | Toggle Vimfiler |
|
||||
| `<Leader> [1-9]` | Jump to the buffer with the num index |
|
||||
| `Alt-[1-9]` | Jump to the buffer with the num index, this only works in neovim |
|
||||
| `Alt-h` / `Alt-Left` | Jump to left buffer in the tabline, this only works in neovim |
|
||||
| `Alt-l` / `Alt-Right` | Jump to Right buffer in the tabline, this only works in neovim |
|
||||
| `Alt-[1-9]` | Jump to the buffer with the num index, this only works in Neovim |
|
||||
| `Alt-h` / `Alt-Left` | Jump to left buffer in the tabline, this only works in Neovim |
|
||||
| `Alt-l` / `Alt-Right` | Jump to Right buffer in the tabline, this only works in Neovim |
|
||||
| `SPC t S` | Toggle spell checker |
|
||||
| `SPC t n` | Toggle line number and relativenumber |
|
||||
| `SPC t l` | Toggle hidden characters (:setlocal nolist!) |
|
||||
@ -731,8 +725,8 @@ can be get by `<Leader> q r`, if you want to disable this feature, you can use `
|
||||
|
||||
### Native functions
|
||||
|
||||
| Key | Mode | Action |
|
||||
| ---------------- | :----: | --------------------------------- |
|
||||
| Key bindings | Mode | Action |
|
||||
| ---------------- | ------ | --------------------------------- |
|
||||
| `<Leader> q r` | Normal | Same as native `q` |
|
||||
| `<Leader> q r /` | Normal | Same as native `q /`, open cmdwin |
|
||||
| `<Leader> q r ?` | Normal | Same as native `q ?`, open cmdwin |
|
||||
@ -740,7 +734,7 @@ can be get by `<Leader> q r`, if you want to disable this feature, you can use `
|
||||
|
||||
### Bookmarks management
|
||||
|
||||
Bookmarks manager are included in `tools` layer, to use following key bindings, you need to enable
|
||||
Bookmarks manager is included in `tools` layer, to use following key bindings, you need to enable
|
||||
`tools` layer:
|
||||
|
||||
```toml
|
||||
@ -748,8 +742,8 @@ Bookmarks manager are included in `tools` layer, to use following key bindings,
|
||||
name = "tools"
|
||||
```
|
||||
|
||||
| Key binding | Description |
|
||||
| ----------- | ------------------------------- |
|
||||
| Key Bindings | Descriptions |
|
||||
| ------------ | ------------------------------- |
|
||||
| `m a` | Show list of all bookmarks |
|
||||
| `m m` | Toggle bookmark in current line |
|
||||
| `m n` | Jump to next bookmark |
|
||||
@ -798,7 +792,7 @@ But in current version of SpaceVim, leaderf/ctrlp and fzf layer have not be fini
|
||||
|
||||
**Key bindings within fuzzy finder buffer**
|
||||
|
||||
| key bindings | description |
|
||||
| Key Bindings | Descriptions |
|
||||
| ---------------------- | ----------------------------------------- |
|
||||
| `<Tab>` / `Ctrl-j` | Select next line |
|
||||
| `Shift-Tab` / `Ctrl-k` | Select previous line |
|
||||
@ -812,7 +806,7 @@ But in current version of SpaceVim, leaderf/ctrlp and fzf layer have not be fini
|
||||
|
||||
**Denite/Unite normal mode key bindings**
|
||||
|
||||
| key bindings | Mode | description |
|
||||
| Key Bindings | Mode | Descriptions |
|
||||
| -------------- | ------------- | ------------------------------------ |
|
||||
| `Ctrl-h/k/l/r` | Normal | Un-map |
|
||||
| `Ctrl-l` | Normal | Redraw |
|
||||
@ -829,18 +823,18 @@ The above key bindings are only part of fuzzy finder layers, please read the lay
|
||||
|
||||
**Mappings guide**
|
||||
|
||||
A guide buffer is displayed each time the prefix key is pressed in normal mode. It lists the available key bindings and their short description.
|
||||
A guide buffer is displayed each time the prefix key is pressed in normal mode. It lists the available key bindings and their short descriptions.
|
||||
The prefix can be `[SPC]`, `[WIN]` and `<Leader>`.
|
||||
|
||||
The default key of these prefixs are:
|
||||
The default keys of these prefixs are:
|
||||
|
||||
| Prefix name | custom option and default value | description |
|
||||
| ----------- | ------------------------------- | ----------------------------------- |
|
||||
| Prefix name | Custom options and default values | Descriptions |
|
||||
| ----------- | --------------------------------- | ----------------------------------- |
|
||||
| `[SPC]` | NONE / `<Space>` | default mapping prefix of SpaceVim |
|
||||
| `[WIN]` | `windows_leader` / `s` | window mapping prefix of SpaceVim |
|
||||
| `<Leader>` | default vim leader | default leader prefix of vim/neovim |
|
||||
| `<Leader>` | default vim leader | default leader prefix of vim/Neovim |
|
||||
|
||||
By default the guide buffer will be displayed 1000ms after the key has been pressed.
|
||||
By default the guide buffer will be displayed 1000ms after the keys being pressed.
|
||||
You can change the delay by setting `'timeoutlen'` option to your liking (the value is in milliseconds).
|
||||
|
||||
For example, after pressing `<Space>` in normal mode, you will see:
|
||||
@ -851,8 +845,8 @@ This guide shows you all the available key bindings begin with `[SPC]`, you can
|
||||
|
||||
After pressing `Ctrl-h` in guide buffer, you will get paging and help info in the statusline.
|
||||
|
||||
| key | description |
|
||||
| --- | ----------------------------- |
|
||||
| Keys | Descriptions |
|
||||
| ---- | ----------------------------- |
|
||||
| `u` | undo pressing |
|
||||
| `n` | next page of guide buffer |
|
||||
| `p` | previous page of guide buffer |
|
||||
@ -867,7 +861,7 @@ call SpaceVim#custom#SPC('nnoremap', ['f', 't'], 'echom "hello world"', 'test cu
|
||||
|
||||
It is possible to search for specific key bindings by pressing `?` in the root of guide buffer.
|
||||
|
||||
To narrow the list, just insert the mapping keys or description of what mapping you want, Unite/Denite will fuzzy find the mappings, to find buffer related mappings:
|
||||
To narrow the list, just insert the mapping keys or descriptions of what mappings you want, Unite/Denite will fuzzy find the mappings, to find buffer related mappings:
|
||||
|
||||
![unite-mapping](https://cloud.githubusercontent.com/assets/13142418/25779196/2f370b0a-3345-11e7-977c-a2377d23286e.png)
|
||||
|
||||
@ -875,12 +869,12 @@ Then use `<Tab>` or `<Up>` and `<Down>` to select the mapping, press `<Enter>` t
|
||||
|
||||
#### Getting help
|
||||
|
||||
fuzzy finder layer is powerful tool to unite all interfaces. it was meant to be
|
||||
like [Helm](https://github.com/emacs-helm/helm) for Vim. These mappings is for
|
||||
Fuzzy finder layer is powerful tool to unite all interfaces. It is meant to be
|
||||
like [Helm](https://github.com/emacs-helm/helm) for Vim. These mappings are for
|
||||
getting help info about functions, variables etc:
|
||||
|
||||
| Mappings | Description |
|
||||
| ----------- | ----------------------------------------------------------------------------- |
|
||||
| Key Bindings | Descriptions |
|
||||
| ------------ | ----------------------------------------------------------------------------- |
|
||||
| `SPC h SPC` | discover SpaceVim documentation, layers and packages using fuzzy finder layer |
|
||||
| `SPC h i` | get help with the symbol at point |
|
||||
| `SPC h k` | show top-level bindings with which-key |
|
||||
@ -888,8 +882,8 @@ getting help info about functions, variables etc:
|
||||
|
||||
Reporting an issue:
|
||||
|
||||
| Mappings | Description |
|
||||
| --------- | ----------------------------------------------------------- |
|
||||
| Key Bindings | Descriptions |
|
||||
| ------------ | ----------------------------------------------------------- |
|
||||
| `SPC h I` | Open SpaceVim GitHub issue page with pre-filled information |
|
||||
|
||||
#### Available layers
|
||||
@ -910,14 +904,14 @@ Both the toggles mappings start with `[SPC] t` or `[SPC] T`. You can find them i
|
||||
|
||||
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) |
|
||||
| Key Bindings | Descriptions |
|
||||
| ------------ | --------------------------------------------------------------------------------- |
|
||||
| `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 |
|
||||
@ -930,13 +924,13 @@ Navigation is performed using the Vi key bindings `hjkl`.
|
||||
|
||||
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 |
|
||||
| ------- | -------------------------------------------- |
|
||||
| Mappings | Descriptions |
|
||||
| -------- | -------------------------------------------- |
|
||||
| `o` | initiate quick jump link mode in help buffer |
|
||||
|
||||
#### Unimpaired bindings
|
||||
|
||||
| Mappings | Description |
|
||||
| Mappings | Descriptions |
|
||||
| -------- | ------------------------------------------------------- |
|
||||
| `[ SPC` | Insert space above |
|
||||
| `] SPC` | Insert space below |
|
||||
@ -966,8 +960,8 @@ The `SPC j` prefix is for jumping, joining and splitting.
|
||||
|
||||
##### Jumping
|
||||
|
||||
| Key Binding | Description |
|
||||
| ----------- | --------------------------------------------------------------------------------- |
|
||||
| Key Bindings | Descriptions |
|
||||
| ------------ | --------------------------------------------------------------------------------- |
|
||||
| `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 |
|
||||
@ -987,8 +981,8 @@ The `SPC j` prefix is for jumping, joining and splitting.
|
||||
|
||||
##### Joining and splitting
|
||||
|
||||
| Key Binding | Description |
|
||||
| ----------- | ------------------------------------------------------------------------ |
|
||||
| Key Bindings | Descriptions |
|
||||
| ------------ | ------------------------------------------------------------------------ |
|
||||
| `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 |
|
||||
@ -1002,8 +996,8 @@ The `SPC j` prefix is for jumping, joining and splitting.
|
||||
|
||||
Every window has a number displayed at the start of the statusline and can be quickly accessed using `SPC number`.
|
||||
|
||||
| Key Binding | Description |
|
||||
| ----------- | --------------------- |
|
||||
| Key Bindings | Descriptions |
|
||||
| ------------ | --------------------- |
|
||||
| `SPC 1` | go to window number 1 |
|
||||
| `SPC 2` | go to window number 2 |
|
||||
| `SPC 3` | go to window number 3 |
|
||||
@ -1016,7 +1010,7 @@ Every window has a number displayed at the start of the statusline and can be qu
|
||||
|
||||
Windows manipulation commands (start with `w`):
|
||||
|
||||
| Key Binding | Description |
|
||||
| Key Bindings | Descriptions |
|
||||
| -------------------- | ------------------------------------------------------------------------------------------------------------- |
|
||||
| `SPC w TAB` | switch to alternate window in the current frame (switch back and forth) |
|
||||
| `SPC w =` | balance split windows |
|
||||
@ -1060,7 +1054,7 @@ Windows manipulation commands (start with `w`):
|
||||
|
||||
Buffer manipulation commands (start with `b`):
|
||||
|
||||
| Key Binding | Description |
|
||||
| Key Bindings | Descriptions |
|
||||
| --------------- | ------------------------------------------------------------------------------ |
|
||||
| `SPC TAB` | switch to alternate buffer in the current window (switch back and forth) |
|
||||
| `SPC b .` | buffer transient state |
|
||||
@ -1086,8 +1080,8 @@ Buffer manipulation commands (start with `b`):
|
||||
|
||||
##### Create a new empty buffer
|
||||
|
||||
| Key Binding | Description |
|
||||
| ----------- | ----------------------------------------------------- |
|
||||
| Key Bindings | Descriptions |
|
||||
| ------------ | ----------------------------------------------------- |
|
||||
| `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 |
|
||||
@ -1102,8 +1096,8 @@ In SpaceVim, there are many special buffers, these buffers are created by plugin
|
||||
|
||||
Files manipulation commands (start with f):
|
||||
|
||||
| Key Binding | Description |
|
||||
| ----------- | -------------------------------------------------------------- |
|
||||
| Key Bindings | Descriptions |
|
||||
| ------------ | -------------------------------------------------------------- |
|
||||
| `SPC f /` | Find files with `find` command |
|
||||
| `SPC f b` | go to file bookmarks |
|
||||
| `SPC f c` | copy current file to a different location(TODO) |
|
||||
@ -1127,8 +1121,8 @@ Files manipulation commands (start with f):
|
||||
|
||||
Convenient key bindings are located under the prefix `SPC f v` to quickly navigate between Vim and SpaceVim specific files.
|
||||
|
||||
| Key Binding | Description |
|
||||
| ----------- | --------------------------------------- |
|
||||
| Key Bindings | Descriptions |
|
||||
| ------------ | --------------------------------------- |
|
||||
| `SPC f v v` | display and copy SpaceVim version |
|
||||
| `SPC f v d` | open SpaceVim custom configuration file |
|
||||
|
||||
@ -1139,7 +1133,8 @@ And SpaceVim also provides `SPC f t` and `SPC f T` to open the file tree.
|
||||
To replace the file explorer to nerdtree:
|
||||
|
||||
```toml
|
||||
# the default value is vimfiler
|
||||
[options]
|
||||
# The default value is vimfiler.
|
||||
filemanager = "nerdtree"
|
||||
```
|
||||
|
||||
@ -1153,7 +1148,7 @@ Here is a picture for this feature:
|
||||
|
||||
Navigation is centered on the `hjkl` keys with the hope of providing a fast navigation experience like in [vifm](https://github.com/vifm):
|
||||
|
||||
| Key Binding | Description |
|
||||
| Key Bindings | Descriptions |
|
||||
| ------------------ | ------------------------------------------------- |
|
||||
| `<F3>` / `SPC f t` | Toggle file explorer |
|
||||
| `<Left>` / `h` | go to parent node and collapse expanded directory |
|
||||
@ -1179,7 +1174,7 @@ Navigation is centered on the `hjkl` keys with the hope of providing a fast navi
|
||||
|
||||
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 |
|
||||
| Key Bindings | Descriptions |
|
||||
| -------------- | ----------------------------------------- |
|
||||
| `l` or `Enter` | open file in one window |
|
||||
| `sg` | open file in an vertically split window |
|
||||
@ -1190,8 +1185,8 @@ If there is only one file buffer opened, a file is opened in the active window,
|
||||
After pressing prefix `g` in normal mode, if you do not remember the mappings, you will see the guide
|
||||
which will tell you the functional of all mappings starting with `g`.
|
||||
|
||||
| Key Binding | Description |
|
||||
| ----------- | ----------------------------------------------- |
|
||||
| Key Bindings | Descriptions |
|
||||
| ------------ | ----------------------------------------------- |
|
||||
| `g #` | search under cursor backward |
|
||||
| `g $` | go to rightmost character |
|
||||
| `g &` | repeat last ":s" on all lines |
|
||||
@ -1243,8 +1238,8 @@ which will tell you the functional of all mappings starting with `g`.
|
||||
After pressing prefix `z` in normal mode, if you do not remember the mappings, you will see the guide
|
||||
which will tell you the functional of all mappings starting with `z`.
|
||||
|
||||
| Key Binding | Description |
|
||||
| ----------- | -------------------------------------------- |
|
||||
| Key Bindings | Descriptions |
|
||||
| ------------ | -------------------------------------------- |
|
||||
| `z <Right>` | scroll screen N characters to left |
|
||||
| `z +` | cursor to screen top line N |
|
||||
| `z -` | cursor to screen bottom line N |
|
||||
@ -1305,7 +1300,7 @@ The search commands in SpaceVim are organized under the `SPC s` prefix with the
|
||||
|
||||
If the last key (determining the scope) is uppercase then the current word under the cursor is used as default input for the search. For instance, `SPC s a B` will search the word under cursor.
|
||||
|
||||
If the tool key is omitted then a default tool will be automatically selected for the search. This tool corresponds to the first tool found on the system of the list `g:spacevim_search_tools`, the default order is `rg`, `ag`, `pt`, `ack` then `grep`. For instance `SPC s b` will search in the opened buffers using `pt` if `rg` and `ag` have not been found on the system.
|
||||
If the tool key is omitted then a default tool will be automatically selected for the search. This tool corresponds to the first tool found on the system of the list `search_tools`, the default order is `rg`, `ag`, `pt`, `ack` then `grep`. For instance `SPC s b` will search in the opened buffers using `pt` if `rg` and `ag` have not been found on the system.
|
||||
|
||||
The tool keys are:
|
||||
|
||||
@ -1337,8 +1332,8 @@ Notes:
|
||||
|
||||
##### Custom searching tool
|
||||
|
||||
To change the options of a search tool, you need to use bootstrap function. Here is an example
|
||||
how to change the default option of searching tool `rg`.
|
||||
To change the options of a search tool, you need to use the bootstrap function.
|
||||
The following example shows how to change the default option of searching tool `rg`.
|
||||
|
||||
```vim
|
||||
function! myspacevim#before() abort
|
||||
@ -1366,7 +1361,7 @@ The structure of searching tool profile is:
|
||||
|
||||
##### Useful key bindings
|
||||
|
||||
| Key Binding | Description |
|
||||
| Key Bindings | Descriptions |
|
||||
| --------------- | ----------------------------------------- |
|
||||
| `SPC r l` | resume the last completion buffer |
|
||||
| `` SPC s ` `` | go back to the previous place before jump |
|
||||
@ -1374,8 +1369,8 @@ The structure of searching tool profile is:
|
||||
|
||||
##### Searching in current file
|
||||
|
||||
| Key Binding | Description |
|
||||
| ----------- | --------------------------------------------------- |
|
||||
| Key Bindings | Descriptions |
|
||||
| ------------ | --------------------------------------------------- |
|
||||
| `SPC s s` | search with the first found tool |
|
||||
| `SPC s S` | search with the first found tool with default input |
|
||||
| `SPC s a a` | ag |
|
||||
@ -1387,8 +1382,8 @@ The structure of searching tool profile is:
|
||||
|
||||
##### Searching in buffer directory
|
||||
|
||||
| Key Binding | Description |
|
||||
| ----------- | ----------------------------------------------------------- |
|
||||
| Key Bindings | Descriptions |
|
||||
| ------------ | ----------------------------------------------------------- |
|
||||
| `SPC s d` | searching in buffer directory with default tool |
|
||||
| `SPC s D` | searching in buffer directory cursor word with default tool |
|
||||
| `SPC s a d` | searching in buffer directory with ag |
|
||||
@ -1404,8 +1399,8 @@ The structure of searching tool profile is:
|
||||
|
||||
##### Searching in all loaded buffers
|
||||
|
||||
| Key Binding | Description |
|
||||
| ----------- | --------------------------------------------------- |
|
||||
| Key Bindings | Descriptions |
|
||||
| ------------ | --------------------------------------------------- |
|
||||
| `SPC s b` | search with the first found tool |
|
||||
| `SPC s B` | search with the first found tool with default input |
|
||||
| `SPC s a b` | ag |
|
||||
@ -1421,8 +1416,8 @@ The structure of searching tool profile is:
|
||||
|
||||
##### Searching in an arbitrary directory
|
||||
|
||||
| Key Binding | Description |
|
||||
| ----------- | --------------------------------------------------- |
|
||||
| Key Bindings | Descriptions |
|
||||
| ------------ | --------------------------------------------------- |
|
||||
| `SPC s f` | search with the first found tool |
|
||||
| `SPC s F` | search with the first found tool with default input |
|
||||
| `SPC s a f` | ag |
|
||||
@ -1438,7 +1433,7 @@ The structure of searching tool profile is:
|
||||
|
||||
##### Searching in a project
|
||||
|
||||
| Key Binding | Description |
|
||||
| Key Bindings | Descriptions |
|
||||
| -------------------- | --------------------------------------------------- |
|
||||
| `SPC /` or `SPC s p` | search with the first found tool |
|
||||
| `SPC *` or `SPC s P` | search with the first found tool with default input |
|
||||
@ -1459,8 +1454,8 @@ The structure of searching tool profile is:
|
||||
|
||||
Background search keyword in a project, when searching done, the count will be shown on the statusline.
|
||||
|
||||
| Key Binding | Description |
|
||||
| ----------- | ---------------------------------------------------------- |
|
||||
| Key Bindings | Descriptions |
|
||||
| ------------ | ---------------------------------------------------------- |
|
||||
| `SPC s j` | searching input expr background with the first found tool |
|
||||
| `SPC s J` | searching cursor word background with the first found tool |
|
||||
| `SPC s l` | List all searching result in quickfix buffer |
|
||||
@ -1477,22 +1472,22 @@ Background search keyword in a project, when searching done, the count will be s
|
||||
|
||||
##### Searching the web
|
||||
|
||||
| Key Binding | Description |
|
||||
| ----------- | ------------------------------------------------------------------------ |
|
||||
| `SPC s w g` | Get Google suggestions in vim. Opens Google results in Browser. |
|
||||
| `SPC s w w` | Get Wikipedia suggestions in vim. Opens Wikipedia page in Browser.(TODO) |
|
||||
| Key Bindings | Descriptions |
|
||||
| ------------ | ------------------------------------------------------------------------ |
|
||||
| `SPC s w g` | Get Google suggestions in Vim. Opens Google results in Browser. |
|
||||
| `SPC s w w` | Get Wikipedia suggestions in Vim. Opens Wikipedia page in Browser.(TODO) |
|
||||
|
||||
**Note**: to enable google suggestions in vim, you need to add `let g:spacevim_enable_googlesuggest = 1` to your custom Configuration file.
|
||||
**Note**: to enable google suggestions in Vim, you need to add `enable_googlesuggest = 1` to your custom Configuration file.
|
||||
|
||||
#### Searching on the fly
|
||||
|
||||
| Key Binding | Description |
|
||||
| ----------- | -------------------------------------------------- |
|
||||
| Key Bindings | Descriptions |
|
||||
| ------------ | -------------------------------------------------- |
|
||||
| `SPC s g G` | Searching in project on the fly with default tools |
|
||||
|
||||
key binding in FlyGrep buffer:
|
||||
Key bindings in FlyGrep buffer:
|
||||
|
||||
| Key Binding | Description |
|
||||
| Key Bindings | Descriptions |
|
||||
| ------------------- | --------------------------------- |
|
||||
| `<Esc>` | close FlyGrep buffer |
|
||||
| `<Enter>` | open file at the cursor line |
|
||||
@ -1507,7 +1502,7 @@ key binding in FlyGrep buffer:
|
||||
|
||||
#### Persistent highlighting
|
||||
|
||||
SpaceVim uses `g:spacevim_search_highlight_persist` to keep the searched expression highlighted until the next search. It is also possible to clear the highlighting by pressing `SPC s c` or executing the ex command `:noh`.
|
||||
SpaceVim uses `search_highlight_persist` to keep the searched expression highlighted until the next search. It is also possible to clear the highlighting by pressing `SPC s c` or executing the ex command `:noh`.
|
||||
|
||||
#### Highlight current symbol
|
||||
|
||||
@ -1523,8 +1518,8 @@ To Highlight the current symbol under point press `SPC s h`.
|
||||
|
||||
Navigation between the highlighted symbols can be done with the commands:
|
||||
|
||||
| Key Binding | Description |
|
||||
| ----------- | ---------------------------------------------------------------------------- |
|
||||
| Key Bindings | Descriptions |
|
||||
| ------------ | ---------------------------------------------------------------------------- |
|
||||
| `*` | initiate navigation transient state on current symbol and jump forwards |
|
||||
| `#` | initiate navigation transient state on current symbol and jump backwards |
|
||||
| `SPC s e` | edit all occurrences of the current symbol |
|
||||
@ -1533,7 +1528,7 @@ Navigation between the highlighted symbols can be done with the commands:
|
||||
|
||||
In highlight symbol transient state:
|
||||
|
||||
| Key Binding | Description |
|
||||
| Key Bindings | Descriptions |
|
||||
| ------------- | ------------------------------------------------------------- |
|
||||
| `e` | edit occurrences (`*`) |
|
||||
| `n` | go to next occurrence |
|
||||
@ -1555,7 +1550,7 @@ In highlight symbol transient state:
|
||||
|
||||
Text related commands (start with `x`):
|
||||
|
||||
| Key Binding | Description |
|
||||
| Key Bindings | Descriptions |
|
||||
| ------------- | -------------------------------------------------------------------- |
|
||||
| `SPC x a &` | align region at & |
|
||||
| `SPC x a (` | align region at ( |
|
||||
@ -1616,8 +1611,8 @@ Text related commands (start with `x`):
|
||||
|
||||
Text insertion commands (start with `i`):
|
||||
|
||||
| Key binding | Description |
|
||||
| ----------- | --------------------------------------------------------------------- |
|
||||
| Key bindings | Descriptions |
|
||||
| ------------ | --------------------------------------------------------------------- |
|
||||
| `SPC i l l` | insert lorem-ipsum list |
|
||||
| `SPC i l p` | insert lorem-ipsum paragraph |
|
||||
| `SPC i l s` | insert lorem-ipsum sentence |
|
||||
@ -1633,14 +1628,14 @@ Text insertion commands (start with `i`):
|
||||
|
||||
#### Increase/Decrease numbers
|
||||
|
||||
| Key Binding | Description |
|
||||
| ----------- | ------------------------------------------------------------------- |
|
||||
| Key Bindings | Descriptions |
|
||||
| ------------ | ------------------------------------------------------------------- |
|
||||
| `SPC n +` | increase the number under point by one and initiate transient state |
|
||||
| `SPC n -` | decrease the number under point by one and initiate transient state |
|
||||
|
||||
In transient state:
|
||||
|
||||
| Key Binding | Description |
|
||||
| Key Bindings | Descriptions |
|
||||
| ------------- | -------------------------------------- |
|
||||
| `+` | increase the number under point by one |
|
||||
| `-` | decrease the number under point by one |
|
||||
@ -1660,15 +1655,15 @@ The default color for iedit is `red`/`green` which is based on the current color
|
||||
|
||||
**State transitions:**
|
||||
|
||||
| Key Binding | From | to |
|
||||
| ----------- | ---------------- | ------------ |
|
||||
| Key Bindings | From | to |
|
||||
| ------------ | ---------------- | ------------ |
|
||||
| `SPC s e` | normal or visual | iedit-Normal |
|
||||
|
||||
**In iedit-Normal mode:**
|
||||
|
||||
`iedit-Normal` mode inherits from `Normal` mode, the following key bindings are specific to `iedit-Normal` mode.
|
||||
|
||||
| Key Binding | Description |
|
||||
| Key Binding | Descriptions |
|
||||
| ------------- | ------------------------------------------------------------------------------- |
|
||||
| `Esc` | go back to `Normal` mode |
|
||||
| `i` | switch to `iedit-Insert` mode, same as `i` |
|
||||
@ -1690,8 +1685,8 @@ The default color for iedit is `red`/`green` which is based on the current color
|
||||
|
||||
**In iedit-Insert mode:**
|
||||
|
||||
| Key Binding | Description |
|
||||
| ----------- | ------------------------------ |
|
||||
| Key Bindings | Descriptions |
|
||||
| ------------ | ------------------------------ |
|
||||
| `<Esc>` | go back to `iedit-Normal` mode |
|
||||
| `<Left>` | Move cursor to left |
|
||||
| `<Right>` | Move cursor to right |
|
||||
@ -1704,8 +1699,8 @@ The default color for iedit is `red`/`green` which is based on the current color
|
||||
|
||||
Comments are handled by [nerdcommenter](https://github.com/scrooloose/nerdcommenter), it’s bound to the following keys.
|
||||
|
||||
| Key Binding | Description |
|
||||
| ----------- | -------------------------- |
|
||||
| Key Bindings | Descriptions |
|
||||
| ------------ | -------------------------- |
|
||||
| `SPC ;` | comment operator |
|
||||
| `SPC c h` | hide/show comments |
|
||||
| `SPC c l` | comment lines |
|
||||
@ -1728,7 +1723,7 @@ SpaceVim uses utf-8 as default encoding. There are four options for these case:
|
||||
- fileencodings (fencs): ucs-bom,utf-8,default,latin1
|
||||
- fileencoding (fenc): utf-8
|
||||
- encoding (enc): utf-8
|
||||
- termencoding (tenc): utf-8 (only supported in vim)
|
||||
- termencoding (tenc): utf-8 (only supported in Vim)
|
||||
|
||||
To fix messy display: `SPC e a` is the mapping for auto detect the file encoding. After detecting file encoding, you can run the command below to fix the encoding:
|
||||
|
||||
@ -1741,10 +1736,10 @@ write
|
||||
|
||||
SpaceVim provides an asynchronously code runner plugin. In most language layer,
|
||||
we have defined a key bidning `SPC l r` for running current buffer.
|
||||
If you need to add new commands, you can use bootstrap func. for example:
|
||||
If you need to add new commands, you can use the bootstrap function. For example:
|
||||
Use `F5` to build project asynchronously.
|
||||
|
||||
```viml
|
||||
```vim
|
||||
nnoremap <silent> <F5> :call SpaceVim#plugins#runner#open('make')
|
||||
```
|
||||
|
||||
@ -1767,7 +1762,7 @@ The checks are only performed at save time by default.
|
||||
|
||||
Errors management mappings (start with e):
|
||||
|
||||
| Mappings | Description |
|
||||
| Mappings | Descriptions |
|
||||
| --------- | --------------------------------------------------------------------------- |
|
||||
| `SPC t s` | toggle syntax checker |
|
||||
| `SPC e c` | clear all errors |
|
||||
@ -1778,30 +1773,30 @@ Errors management mappings (start with e):
|
||||
| `SPC e v` | verify syntax checker setup (useful to debug 3rd party tools configuration) |
|
||||
| `SPC e .` | error transient state |
|
||||
|
||||
The next/previous error mappings and the error transient state can be used to browse errors from syntax checkers as well as errors from location list buffers, and indeed anything that supports vim's location list. This includes for example search results that have been saved to a location list buffer.
|
||||
The next/previous error mappings and the error transient state can be used to browse errors from syntax checkers as well as errors from location list buffers, and indeed anything that supports Vim's location list. This includes for example search results that have been saved to a location list buffer.
|
||||
|
||||
Custom sign symbol:
|
||||
|
||||
| Symbol | Description | Custom option |
|
||||
| Symbol | Descriptions | Custom options |
|
||||
| ------ | ----------- | --------------------------- |
|
||||
| `✖` | Error | `g:spacevim_error_symbol` |
|
||||
| `➤` | warning | `g:spacevim_warning_symbol` |
|
||||
| `🛈` | Info | `g:spacevim_info_symbol` |
|
||||
| `✖` | Error | `error_symbol` |
|
||||
| `➤` | warning | `warning_symbol` |
|
||||
| `🛈` | Info | `info_symbol` |
|
||||
|
||||
### Managing projects
|
||||
|
||||
SpaceVim will find the root of the project when a `.git` directory or a `.project_alt.json` file is encountered in the file tree.
|
||||
|
||||
project manager commands start with `p`:
|
||||
Project manager commands start with `p`:
|
||||
|
||||
| Key Binding | Description |
|
||||
| ----------- | ----------------------------------------------------- |
|
||||
| `SPC p '` | open a shell in project’s root (with the shell layer) |
|
||||
| Key Bindings | Descriptions |
|
||||
| ------------ | ----------------------------------------------------- |
|
||||
| `SPC p '` | open a shell in project’s root (need the shell layer) |
|
||||
|
||||
#### Searching files in project
|
||||
|
||||
| Key Binding | Description |
|
||||
| ----------- | ---------------------------------------- |
|
||||
| Key Bindings | Descriptions |
|
||||
| ------------ | ---------------------------------------- |
|
||||
| `SPC p f` | find files in current project |
|
||||
| `SPC p /` | fuzzy search for text in current project |
|
||||
| `SPC p k` | kill all buffers of current project |
|
||||
@ -1810,7 +1805,7 @@ project manager commands start with `p`:
|
||||
|
||||
## EditorConfig
|
||||
|
||||
SpaceVim has support for [EditorConfig](http://editorconfig.org/), a configuration file to “define and maintain consistent coding styles between different editors and IDEs.”
|
||||
SpaceVim has support [EditorConfig](http://editorconfig.org/), a configuration file to “define and maintain consistent coding styles between different editors and IDEs.”
|
||||
|
||||
To customize your editorconfig experience, read the [editorconfig-vim package’s documentation](https://github.com/editorconfig/editorconfig-vim/blob/master/README.md).
|
||||
|
||||
@ -1820,11 +1815,13 @@ SpaceVim starts a server at launch. This server is killed whenever you close you
|
||||
|
||||
**Connecting to the Vim server**
|
||||
|
||||
If you are using neovim, you need to install [neovim-remote](https://github.com/mhinz/neovim-remote), then add this to your bashrc.
|
||||
If you are using Neovim, you need to install [neovim-remote](https://github.com/mhinz/neovim-remote), then add this to your bashrc.
|
||||
|
||||
```sh
|
||||
export PATH=$PATH:$HOME/.SpaceVim/bin
|
||||
```
|
||||
|
||||
Use `svc` to open a file in the existing Vim server, or using `nsvc` to open a file in the existing neovim server.
|
||||
Use `svc` to open a file in the existing Vim server, or use `nsvc` to open a file in the existing Neovim server.
|
||||
|
||||
![server-and-client](https://user-images.githubusercontent.com/13142418/32554968-7164fe9c-c4d6-11e7-95f7-f6a6ea75e05b.gif)
|
||||
|
||||
|
24
docs/faq.md
24
docs/faq.md
@ -5,7 +5,7 @@ description: "A list of questions and answers relating to SpaceVim, especially t
|
||||
|
||||
# SpaceVim FAQ
|
||||
|
||||
This is a list of the most asked questions about SpaceVim.
|
||||
This is a list of the frequently asked questions about SpaceVim.
|
||||
|
||||
<!-- vim-markdown-toc GFM -->
|
||||
|
||||
@ -15,31 +15,31 @@ This is a list of the most asked questions about SpaceVim.
|
||||
- [E492: Not an editor command: ^M](#e492-not-an-editor-command-m)
|
||||
- [Why SpaceVim can not display default colorscheme?](#why-spacevim-can-not-display-default-colorscheme)
|
||||
- [Why can't I update plugins?](#why-cant-i-update-plugins)
|
||||
- [how to enable +py and +py3 in neovim?](#how-to-enable-py-and-py3-in-neovim)
|
||||
- [Why does vim freeze after pressing Ctrl-s?](#why-does-vim-freeze-after-pressing-ctrl-s)
|
||||
- [How to enable +py and +py3 in Neovim?](#how-to-enable-py-and-py3-in-neovim)
|
||||
- [Why does Vim freeze after pressing Ctrl-s?](#why-does-vim-freeze-after-pressing-ctrl-s)
|
||||
|
||||
<!-- vim-markdown-toc -->
|
||||
|
||||
### Can I try SpaceVim without overwriting my vimrc?
|
||||
|
||||
The SpaceVim install script will move your `~/.vimrc` to `~/.vimrc_back`. If you want to have a try SpaceVim without
|
||||
overwriting your own vim configuration you can:
|
||||
overwriting your own Vim configuration you can:
|
||||
|
||||
clone SpaceVim manually.
|
||||
Clone SpaceVim manually.
|
||||
|
||||
```sh
|
||||
git clone https://github.com/SpaceVim/SpaceVim.git ~/.SpaceVim
|
||||
```
|
||||
|
||||
then, start vim via `vim -u ~/.SpaceVim/vimrc`. You can also put this alias into your bashrc.
|
||||
Then, start Vim via `vim -u ~/.SpaceVim/vimrc`. You can also put this alias into your bashrc.
|
||||
|
||||
```sh
|
||||
alias svim='vim -u ~/.SpaceVim/vimrc'
|
||||
```
|
||||
### Why use toml as the default configuration file format?
|
||||
|
||||
In the old version of SpaceVim, we used a vim file (`init.vim`) for configuration. This introduced a lot of problems.
|
||||
When loading a vim file the file content is executed line by line. This means that when there was an error the content
|
||||
In the old version of SpaceVim, we used a Vim file (`init.vim`) for configuration. This introduced a lot of problems.
|
||||
When loading a Vim file the file content is executed line by line. This means that when there was an error the content
|
||||
before the error was still executed. This led to unforeseen problems.
|
||||
|
||||
We decided going forward to use a more robust configuration mechanism in SpaceVim. SpaceVim must be able to load the
|
||||
@ -78,9 +78,9 @@ directory is dirty (has changes that haven't been committed to git) you can not
|
||||
issue, just move your cursor to the error line, and press `gf`, then run `git reset --hard HEAD` or `git checkout .`. For
|
||||
more info please read git documentation.
|
||||
|
||||
### How to enable +py and +py3 in neovim?
|
||||
### How to enable +py and +py3 in Neovim?
|
||||
|
||||
In neovim we can use `g:python_host_prog` and `g:python3_host_prog` to config python prog. In SpaceVim
|
||||
In Neovim we can use `g:python_host_prog` and `g:python3_host_prog` to config python prog. In SpaceVim
|
||||
the custom configuration file is loaded after SpaceVim core code. So in SpaceVim itself, if we using `:py` command, it may cause errors.
|
||||
So we introduce two new environment variables: `PYTHON_HOST_PROG` and `PYTHON3_HOST_PROG`.
|
||||
|
||||
@ -91,9 +91,9 @@ export PYTHON_HOST_PROG='/home/q/envs/neovim2/bin/python'
|
||||
export PYTHON3_HOST_PROG='/home/q/envs/neovim3/bin/python'
|
||||
```
|
||||
|
||||
### Why does vim freeze after pressing Ctrl-s?
|
||||
### Why does Vim freeze after pressing Ctrl-s?
|
||||
|
||||
This is a [feature of terminal emulators](https://unix.stackexchange.com/a/137846). You can use `Ctrl-q` to unfreeze vim. To disable
|
||||
This is a [feature of terminal emulators](https://unix.stackexchange.com/a/137846). You can use `Ctrl-q` to unfreeze Vim. To disable
|
||||
this feature you need the following in either `~/.bash_profile` or `~/.bashrc`:
|
||||
|
||||
```sh
|
||||
|
@ -12,17 +12,17 @@ description: "SpaceVim is a community-driven vim distribution that seeks to prov
|
||||
|
||||
![welcome-page](https://user-images.githubusercontent.com/13142418/50423286-5b33a400-088e-11e9-830c-792ce1c7c126.png)
|
||||
|
||||
# SpaceVim - Modern vim distribution
|
||||
# SpaceVim - Modern Vim distribution
|
||||
|
||||
SpaceVim is a distribution of the vim editor that's inspired by spacemacs.
|
||||
It manages collections of plugins in layers, which help collect related
|
||||
SpaceVim is a distribution of the Vim editor that's inspired by spacemacs.
|
||||
It manages collections of plugins in layers, which help collecting related
|
||||
packages together to provide features. For example, the python layer collects
|
||||
deoplete.nvim, neomake and jedi-vim together to provide autocompletion,
|
||||
syntax checking, and documentation lookup. This approach helps keep
|
||||
syntax checking, and documentation lookup. This approach helps keeping
|
||||
configuration organized and reduces overhead for the user by keeping them
|
||||
from having to think about what packages to install.
|
||||
|
||||
If you like SpaceVim, feel free to star the project on github. It is a great way to show your
|
||||
If you like SpaceVim, please feel free to star the project on github. It is a great way to show your
|
||||
appreciation while providing us motivation to continue working on this project.
|
||||
|
||||
|
||||
@ -64,12 +64,12 @@ for development progress and the [roadmap](roadmap/) for high-level plans.
|
||||
|
||||
- Is SpaceVim trying to turn Vim/Neovim into an IDE?
|
||||
|
||||
With layers feature, this version of vim distribution try to turn vim/neovim into an IDE for many languages.
|
||||
With layers feature, this version of Vim distribution try to turn Vim/Neovim into an IDE for many languages.
|
||||
|
||||
- Which version of vim/neovim is needed?
|
||||
- Which version of Vim/Neovim is needed?
|
||||
|
||||
vim 7.4/neovim v0.1.7, and `+lua` or `+python3` is needed.
|
||||
Vim 7.4/Neovim v0.1.7, and `+lua` or `+python3` is needed.
|
||||
|
||||
For more general questions, please read [SpaceVim FAQ](faq/)
|
||||
For more general questions, please read [SpaceVim FAQ](faq/).
|
||||
|
||||
<!-- vim:set nowrap: -->
|
||||
|
@ -16,8 +16,8 @@ description: "A guide for managing SpaceVim with layers, tell you how to enable
|
||||
|
||||
## Introduction
|
||||
|
||||
SpaceVim is a community-driven vim distribution that seeks to provide layer feature.
|
||||
Layers help collect related packages together to provide features.
|
||||
SpaceVim is a community-driven Vim distribution that seeks to provide layer feature.
|
||||
Layers help collecting related packages together to provide features.
|
||||
This approach helps keep configuration organized and reduces overhead for the user by
|
||||
keeping them from having to think about what packages to install.
|
||||
|
||||
@ -38,7 +38,7 @@ By default SpaceVim enable these layers:
|
||||
To enable a specific layer you need to edit SpaceVim configuration file.
|
||||
The key binding for opening SpaceVim configuration file is `SPC f v d`.
|
||||
|
||||
here is an example for loading `shell` layer with some specified options:
|
||||
The following example shows how to load `shell` layer with some specified options:
|
||||
|
||||
```toml
|
||||
[[layers]]
|
||||
@ -49,7 +49,7 @@ default_height = 30
|
||||
|
||||
### Disable layers
|
||||
|
||||
Some layers are enabled by default, here is an example for disable `shell` layer:
|
||||
Some layers are enabled by default. The following example shows how to disable `shell` layer:
|
||||
|
||||
```toml
|
||||
[[layers]]
|
||||
@ -62,8 +62,7 @@ enable = false
|
||||
## Available layers
|
||||
|
||||
| Name | Description |
|
||||
| ---------- | ------------ |
|
||||
| [VersionControl](VersionControl/) | This layers provides general version control feature for vim. It should work with all VC backends such as Git, Mercurial, Bazaar, SVN, etc… |
|
||||
| ------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| [autocomplete](autocomplete/) | Autocomplete code within SpaceVim, fuzzy find the candidates from multiple completion sources, expand snippet before cursor automatically |
|
||||
| [chat](chat/) | SpaceVim chatting layer provide chatting with qq and weixin in vim. |
|
||||
| [checkers](checkers/) | Syntax checking automatically within SpaceVim, display error on the sign column and statusline. |
|
||||
@ -85,7 +84,6 @@ enable = false
|
||||
| [git](git/) | This layers adds extensive support for git |
|
||||
| [github](github/) | This layer provides GitHub integration for SpaceVim |
|
||||
| [japanese](japanese/) | Layer for japanese users, include japanese docs and runtime messages |
|
||||
| [lang#WebAssembly](lang/WebAssembly/) | This layer adds WebAssembly support to SpaceVim |
|
||||
| [lang#agda](lang/agda/) | This layer adds agda language support to SpaceVim |
|
||||
| [lang#asciidoc](lang/asciidoc/) | Edit asciidoc within vim, autopreview asciidoc in the default browser, with this layer you can also format asciidoc file. |
|
||||
| [lang#autohotkey](lang/autohotkey/) | This layer adds autohotkey language support to SpaceVim |
|
||||
@ -127,8 +125,9 @@ enable = false
|
||||
| [lang#typescript](lang/typescript/) | This layer is for TypeScript development |
|
||||
| [lang#vim](lang/vim/) | This layer is for writting vim script, including code completion, syntax checking and buffer formatting |
|
||||
| [lang#vue](lang/vue/) | This layer adds vue language support to SpaceVim |
|
||||
| [lsp](language-server-protocol/) | This layers provides language server protocol for vim and neovim |
|
||||
| [lang#WebAssembly](lang/WebAssembly/) | This layer adds WebAssembly support to SpaceVim |
|
||||
| [leaderf](leaderf/) | This layers provide a heavily customized LeaderF centric work-flow |
|
||||
| [lsp](language-server-protocol/) | This layers provides language server protocol for vim and neovim |
|
||||
| [shell](shell/) | This layer provide shell support in SpaceVim |
|
||||
| [sudo](sudo/) | sudo layer provides ability to read and write file elevated privileges in SpaceVim |
|
||||
| [tags](tags/) | This layer provide tags manager for project |
|
||||
@ -137,6 +136,7 @@ enable = false
|
||||
| [tools#dash](tools/dash/) | This layer provides Dash integration for SpaceVim |
|
||||
| [tools](tools/) | This layer provides some tools for vim |
|
||||
| [ui](ui/) | Awesome UI layer for SpaceVim, provide IDE-like UI for neovim and vim in both TUI and GUI |
|
||||
| [VersionControl](VersionControl/) | This layers provides general version control feature for vim. It should work with all VC backends such as Git, Mercurial, Bazaar, SVN, etc… |
|
||||
|
||||
<!-- SpaceVim layer list end -->
|
||||
|
||||
|
@ -23,10 +23,10 @@ show you how to install it, how to config it, and explain its features.
|
||||
|
||||
## Install
|
||||
|
||||
At a minimum, SpaceVim requires `git` and `curl` to be installed. These tools
|
||||
At a minimum, SpaceVim requires `git` and `curl` to be installed. Both tools
|
||||
are needed for downloading plugins and fonts.
|
||||
|
||||
If you are using vim/neovim in terminal, you also need to set the font of your terminal.
|
||||
If you are using Vim/Neovim in terminal, you also need to set the font of your terminal.
|
||||
|
||||
### Linux and macOS
|
||||
|
||||
@ -34,7 +34,7 @@ If you are using vim/neovim in terminal, you also need to set the font of your t
|
||||
curl -sLf https://spacevim.org/install.sh | bash
|
||||
```
|
||||
|
||||
After SpaceVim is installed, launch `vim` and SpaceVim will **automatically** install plugins.
|
||||
After SpaceVim being installed, launch `vim` and SpaceVim will **automatically** install plugins.
|
||||
|
||||
For more info about the install script, please check:
|
||||
|
||||
@ -53,7 +53,7 @@ docker pull spacevim/spacevim
|
||||
docker run -it --rm spacevim/spacevim nvim
|
||||
```
|
||||
|
||||
you can also load local config:
|
||||
You can also load local config:
|
||||
|
||||
```sh
|
||||
docker run -it -v ~/.SpaceVim.d:/home/spacevim/.SpaceVim.d --rm spacevim/spacevim nvim
|
||||
@ -66,9 +66,9 @@ an example for basic usage of SpaceVim. For more info, please checkout SpaceVim
|
||||
documentation.
|
||||
|
||||
```toml
|
||||
# This is basic configuration example for SpaceVim
|
||||
# This is a basic configuration example for SpaceVim
|
||||
|
||||
# All SpaceVim options are below [options] section
|
||||
# All SpaceVim options are below [options] snippet
|
||||
[options]
|
||||
# set spacevim theme. by default colorscheme layer is not loaded,
|
||||
# if you want to use more colorscheme, please load the colorscheme
|
||||
@ -104,7 +104,7 @@ default_height = 30
|
||||
# This is an example for adding custom plugins lilydjwg/colorizer
|
||||
[[custom_plugins]]
|
||||
name = "lilydjwg/colorizer"
|
||||
merged = 0
|
||||
merged = false
|
||||
```
|
||||
|
||||
## Online tutor
|
||||
@ -113,7 +113,7 @@ This is a list of online tutor for using SpaceVim as general IDE and programming
|
||||
|
||||
- [use vim as general IDE](../use-vim-as-ide/): a general guide for using SpaceVim as IDE
|
||||
|
||||
a list of guide for programming language support:
|
||||
A list of guide for programming language support:
|
||||
|
||||
|
||||
<ul>
|
||||
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
title: "Sponsors"
|
||||
description: "the companies or individuals contributing a monthly amount to help sustain SpaceVim's development."
|
||||
description: "The companies or individuals contributing a monthly amount to help sustain SpaceVim's development."
|
||||
---
|
||||
|
||||
# Sponsors
|
||||
@ -25,8 +25,8 @@ Bitcoin: 1DtuVeg81c2L9NEhDaVTAAbrCR3pN5xPFv
|
||||
These are the companies or individuals contributing a monthly amount to help sustain SpaceVim's development.
|
||||
See the [Bountysource campaign](https://www.bountysource.com/teams/spacevim) for more details.
|
||||
|
||||
| date | Amount | Description |
|
||||
| ------------ | ------- | --------------------------------------------- |
|
||||
| Date | Amount | Description |
|
||||
| ------------ | ------- | ----------------- |
|
||||
| 2016-09-26 | ¥ 100 | *好 |
|
||||
| 2016-09-26 | ¥ 300 | *好 |
|
||||
| 2016-11-22 | ¥ 20 | *续 |
|
||||
@ -93,9 +93,9 @@ See the [Bountysource campaign](https://www.bountysource.com/teams/spacevim) for
|
||||
| 2018-12-17 | ¥ 100 | 涛 |
|
||||
| 2018-12-20 | ¥ 20.19 | *尘 |
|
||||
|
||||
## Historical spending
|
||||
## Historical Spending
|
||||
|
||||
| date | Amount | Description |
|
||||
| ---------- | ------- | --------------------------------------------- |
|
||||
| Date | Amount | Description |
|
||||
| ---------- | ------- | ----------- |
|
||||
| 2017-06-10 | - $ 5 | Host |
|
||||
| 2017-01-03 | - ¥ 225 | Domain |
|
||||
|
Loading…
Reference in New Issue
Block a user