mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-01-23 13:10:04 +08:00
parent
ca735648ba
commit
8c3d1d8281
@ -972,7 +972,7 @@ let g:spacevim_disabled_plugins = []
|
|||||||
" Add custom plugins.
|
" Add custom plugins.
|
||||||
" >
|
" >
|
||||||
" [[custom_plugins]]
|
" [[custom_plugins]]
|
||||||
" name = 'vimwiki/vimwiki'
|
" repo = 'vimwiki/vimwiki'
|
||||||
" merged = false
|
" merged = false
|
||||||
" <
|
" <
|
||||||
|
|
||||||
|
@ -114,7 +114,19 @@ function! SpaceVim#custom#apply(config, type) abort
|
|||||||
endfor
|
endfor
|
||||||
let custom_plugins = get(a:config, 'custom_plugins', [])
|
let custom_plugins = get(a:config, 'custom_plugins', [])
|
||||||
for plugin in custom_plugins
|
for plugin in custom_plugins
|
||||||
call add(g:spacevim_custom_plugins, [plugin.name, plugin])
|
" name is an option for dein, we need to use repo instead
|
||||||
|
" but we also need to keep backward compatible!
|
||||||
|
" this the first argv should be get(plugin, 'repo', get(plugin, 'name',
|
||||||
|
" ''))
|
||||||
|
" BTW, we also need to check if the plugin has name or repo key
|
||||||
|
if has_key(plugin, 'name')
|
||||||
|
call add(g:spacevim_custom_plugins, [plugin.name, plugin])
|
||||||
|
elseif has_key(plugin, 'repo')
|
||||||
|
call add(g:spacevim_custom_plugins, [plugin.repo, plugin])
|
||||||
|
else
|
||||||
|
call SpaceVim#logger#warn('custom_plugins should contains repo key!')
|
||||||
|
call SpaceVim#logger#info(string(plugin))
|
||||||
|
endif
|
||||||
endfor
|
endfor
|
||||||
let bootstrap_before = get(options, 'bootstrap_before', '')
|
let bootstrap_before = get(options, 'bootstrap_before', '')
|
||||||
let g:_spacevim_bootstrap_after = get(options, 'bootstrap_after', '')
|
let g:_spacevim_bootstrap_after = get(options, 'bootstrap_after', '')
|
||||||
|
@ -3181,7 +3181,7 @@ CUSTOM_PLUGINS *SpaceVim-usage-custom_plugins*
|
|||||||
Add custom plugins.
|
Add custom plugins.
|
||||||
>
|
>
|
||||||
[[custom_plugins]]
|
[[custom_plugins]]
|
||||||
name = 'vimwiki/vimwiki'
|
repo = 'vimwiki/vimwiki'
|
||||||
merged = false
|
merged = false
|
||||||
<
|
<
|
||||||
|
|
||||||
|
@ -235,7 +235,7 @@ SpaceVim 根据需要定义了很多临时快捷键,这可以避免需要重
|
|||||||
|
|
||||||
```toml
|
```toml
|
||||||
[[custom_plugins]]
|
[[custom_plugins]]
|
||||||
name = "lilydjwg/colorizer"
|
repo = "lilydjwg/colorizer"
|
||||||
on_cmd = ["ColorHighlight", "ColorToggle"]
|
on_cmd = ["ColorHighlight", "ColorToggle"]
|
||||||
merged = false
|
merged = false
|
||||||
```
|
```
|
||||||
@ -368,7 +368,7 @@ SpaceVim 的[模块首页](../layers/)。
|
|||||||
|
|
||||||
```toml
|
```toml
|
||||||
[[custom_plugins]]
|
[[custom_plugins]]
|
||||||
name = 'wsdjeg/neomake.vim'
|
repo = 'wsdjeg/neomake.vim'
|
||||||
# note: you need to disable merged feature
|
# note: you need to disable merged feature
|
||||||
merged = false
|
merged = false
|
||||||
```
|
```
|
||||||
|
@ -64,7 +64,7 @@ colorscheme 模块为 SpaceVim 提供了一系列常用的颜色主题,默认
|
|||||||
|
|
||||||
# 添加自定义主题:https://github.com/mhartington/oceanic-next
|
# 添加自定义主题:https://github.com/mhartington/oceanic-next
|
||||||
[[custom_plugins]]
|
[[custom_plugins]]
|
||||||
name = "mhartington/oceanic-next"
|
repo = "mhartington/oceanic-next"
|
||||||
merged = 0
|
merged = 0
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -120,7 +120,7 @@ SpaceVim 的默认配置文件为 `~/.SpaceVim.d/init.toml`。下面为一简单
|
|||||||
|
|
||||||
# 添加自定义插件
|
# 添加自定义插件
|
||||||
[[custom_plugins]]
|
[[custom_plugins]]
|
||||||
name = "lilydjwg/colorizer"
|
repo = "lilydjwg/colorizer"
|
||||||
merged = false
|
merged = false
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -244,9 +244,9 @@ If you want to add plugins from github, just add the repo name to the `custom_pl
|
|||||||
|
|
||||||
```toml
|
```toml
|
||||||
[[custom_plugins]]
|
[[custom_plugins]]
|
||||||
name = "lilydjwg/colorizer"
|
repo = "lilydjwg/colorizer"
|
||||||
on_cmd = ["ColorHighlight", "ColorToggle"]
|
on_cmd = ["ColorHighlight", "ColorToggle"]
|
||||||
merged = false
|
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`.
|
||||||
@ -258,7 +258,7 @@ If you want to disable plugins which are added by SpaceVim, you can use SpaceVim
|
|||||||
```toml
|
```toml
|
||||||
[options]
|
[options]
|
||||||
# NOTE: the value should be a list, and each item is the name of the plugin.
|
# NOTE: the value should be a list, and each item is the name of the plugin.
|
||||||
disabled_plugins = ["clighter", "clighter8"]
|
disabled_plugins = ["clighter", "clighter8"]
|
||||||
```
|
```
|
||||||
|
|
||||||
### Bootstrap Functions
|
### Bootstrap Functions
|
||||||
@ -326,6 +326,7 @@ The different key bindings between SpaceVim and origin vim are shown as below.
|
|||||||
```
|
```
|
||||||
|
|
||||||
- The `jk` key has been mapped to `<Esc>` in insert mode. To disable this key binding, set `escape_key_binding` to empty string.
|
- The `jk` key has been mapped to `<Esc>` in insert mode. To disable this key binding, set `escape_key_binding` to empty string.
|
||||||
|
|
||||||
```toml
|
```toml
|
||||||
[options]
|
[options]
|
||||||
escape_key_binding = ''
|
escape_key_binding = ''
|
||||||
@ -381,9 +382,9 @@ disabled_plugins = ["neomake.vim"]
|
|||||||
|
|
||||||
```toml
|
```toml
|
||||||
[[custom_plugins]]
|
[[custom_plugins]]
|
||||||
name = "wsdjeg/neomake.vim"
|
repo = "wsdjeg/neomake.vim"
|
||||||
# note: you need to disable merged feature
|
# note: you need to disable merged feature
|
||||||
merged = false
|
merged = false
|
||||||
```
|
```
|
||||||
|
|
||||||
Use the `bootstrap_before` function to add local plugin:
|
Use the `bootstrap_before` function to add local plugin:
|
||||||
|
@ -64,7 +64,7 @@ are available on Github, use the `custom_plugins` section in configuration file.
|
|||||||
|
|
||||||
# add custom_plugins: https://github.com/mhartington/oceanic-next
|
# add custom_plugins: https://github.com/mhartington/oceanic-next
|
||||||
[[custom_plugins]]
|
[[custom_plugins]]
|
||||||
name = "mhartington/oceanic-next"
|
repo = "mhartington/oceanic-next"
|
||||||
merged = 0
|
merged = 0
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -107,7 +107,7 @@ documentation.
|
|||||||
|
|
||||||
# This is an example for adding custom plugins lilydjwg/colorizer
|
# This is an example for adding custom plugins lilydjwg/colorizer
|
||||||
[[custom_plugins]]
|
[[custom_plugins]]
|
||||||
name = "lilydjwg/colorizer"
|
repo = "lilydjwg/colorizer"
|
||||||
merged = false
|
merged = false
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user