2017-03-02 22:20:46 +08:00
|
|
|
|
"=============================================================================
|
|
|
|
|
" SpaceVim.vim --- Initialization and core files for SpaceVim
|
2022-02-03 17:24:51 +08:00
|
|
|
|
" Copyright (c) 2016-2022 Wang Shidong & Contributors
|
2022-03-27 13:38:54 +08:00
|
|
|
|
" Author: Shidong Wang < wsdjeg@outlook.com >
|
2017-03-06 23:39:03 +08:00
|
|
|
|
" URL: https://spacevim.org
|
2018-02-15 22:25:03 +08:00
|
|
|
|
" License: GPLv3
|
2017-03-02 22:20:46 +08:00
|
|
|
|
"=============================================================================
|
2021-01-02 17:58:45 +08:00
|
|
|
|
scriptencoding utf-8
|
2017-03-02 22:20:46 +08:00
|
|
|
|
|
2017-01-02 10:38:23 +08:00
|
|
|
|
""
|
|
|
|
|
" @section Introduction, intro
|
2017-02-10 00:02:00 +08:00
|
|
|
|
" @stylized spacevim
|
2017-01-10 21:00:14 +08:00
|
|
|
|
" @library
|
2022-03-23 18:57:21 +08:00
|
|
|
|
" @order intro options config functions layers usage plugins api dev faq changelog
|
2017-02-17 13:56:55 +08:00
|
|
|
|
" SpaceVim is a bundle of custom settings and plugins with a modular
|
|
|
|
|
" configuration for Vim. It was inspired by Spacemacs.
|
2017-01-27 21:49:05 +08:00
|
|
|
|
"
|
|
|
|
|
|
|
|
|
|
""
|
2018-05-27 13:05:57 +08:00
|
|
|
|
" @section Options, options
|
|
|
|
|
" SpaceVim uses `~/.SpaceVim.d/init.toml` as its default global config file.
|
2017-03-19 22:00:27 +08:00
|
|
|
|
" You can set all the SpaceVim options and layers in it. `~/.SpaceVim.d/` will
|
2017-02-17 13:56:55 +08:00
|
|
|
|
" also be added to runtimepath, so you can write your own scripts in it.
|
2018-12-19 23:59:41 +08:00
|
|
|
|
" SpaceVim also supports local config for each project. Place local config
|
2018-05-27 13:05:57 +08:00
|
|
|
|
" settings in `.SpaceVim.d/init.toml` in the root directory of your project.
|
2017-01-27 21:49:05 +08:00
|
|
|
|
" `.SpaceVim.d/` will also be added to runtimepath.
|
2018-12-19 23:59:41 +08:00
|
|
|
|
"
|
2018-06-10 23:30:02 +08:00
|
|
|
|
" here is an example setting SpaceVim options:
|
|
|
|
|
" >
|
|
|
|
|
" [options]
|
|
|
|
|
" enable-guicolors = true
|
|
|
|
|
" max-column = 120
|
|
|
|
|
" <
|
2017-01-02 10:38:23 +08:00
|
|
|
|
|
2018-05-27 13:05:57 +08:00
|
|
|
|
|
|
|
|
|
""
|
|
|
|
|
" @section Configuration, config
|
2018-06-15 20:41:11 +08:00
|
|
|
|
" If you still want to use `~/.SpaceVim.d/init.vim` as configuration file,
|
2022-01-02 22:06:01 +08:00
|
|
|
|
" please take a look at the following options add @section(functions)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
""
|
|
|
|
|
" @section Public functions, functions
|
|
|
|
|
" All of these functions can be used in `~/.SpaceVim.d/init.vim` and bootstrap
|
|
|
|
|
" functions.
|
|
|
|
|
|
2018-05-27 13:05:57 +08:00
|
|
|
|
|
2021-01-02 17:58:45 +08:00
|
|
|
|
let s:SYSTEM = SpaceVim#api#import('system')
|
|
|
|
|
|
2018-02-22 21:15:46 +08:00
|
|
|
|
" Public SpaceVim Options {{{
|
|
|
|
|
|
2017-01-04 23:53:49 +08:00
|
|
|
|
""
|
|
|
|
|
" Version of SpaceVim , this value can not be changed.
|
2022-07-02 13:56:15 +08:00
|
|
|
|
let g:spacevim_version = '2.1.0-dev'
|
2017-01-04 23:53:49 +08:00
|
|
|
|
lockvar g:spacevim_version
|
2018-02-22 21:15:46 +08:00
|
|
|
|
|
2018-06-15 20:41:11 +08:00
|
|
|
|
""
|
|
|
|
|
" @section default_indent, options-default_indent
|
|
|
|
|
" @parentsection options
|
|
|
|
|
" Change the default indentation of SpaceVim. Default is 2.
|
|
|
|
|
" >
|
|
|
|
|
" default_indent = 2
|
|
|
|
|
" <
|
|
|
|
|
|
2017-01-02 10:38:23 +08:00
|
|
|
|
""
|
2017-02-17 13:56:55 +08:00
|
|
|
|
" Change the default indentation of SpaceVim. Default is 2.
|
2017-01-03 00:27:11 +08:00
|
|
|
|
" >
|
|
|
|
|
" let g:spacevim_default_indent = 2
|
|
|
|
|
" <
|
2017-01-02 10:38:23 +08:00
|
|
|
|
let g:spacevim_default_indent = 2
|
2022-03-20 15:42:03 +08:00
|
|
|
|
""
|
|
|
|
|
" @section expand_tab, options-expand_tab
|
|
|
|
|
" @parentsection options
|
|
|
|
|
" In Insert mode: Use the appropriate number of spaces to insert a <Tab>
|
|
|
|
|
|
2017-01-02 10:38:23 +08:00
|
|
|
|
""
|
2018-04-01 21:13:49 +08:00
|
|
|
|
" In Insert mode: Use the appropriate number of spaces to insert a <Tab>
|
|
|
|
|
let g:spacevim_expand_tab = 1
|
2018-06-10 23:30:02 +08:00
|
|
|
|
|
|
|
|
|
""
|
|
|
|
|
" @section relativenumber, options-relativenumber
|
|
|
|
|
" @parentsection options
|
|
|
|
|
" Enable/Disable relativenumber, by default it is enabled.
|
|
|
|
|
" >
|
|
|
|
|
" relativenumber = true
|
|
|
|
|
" <
|
|
|
|
|
|
2018-04-01 21:13:49 +08:00
|
|
|
|
""
|
2019-04-26 21:43:46 +08:00
|
|
|
|
" Enable/Disable relativenumber in current windows, by default it is enabled.
|
2017-06-27 15:31:34 +08:00
|
|
|
|
let g:spacevim_relativenumber = 1
|
2018-06-10 23:30:02 +08:00
|
|
|
|
|
2021-06-21 22:49:20 +08:00
|
|
|
|
""
|
|
|
|
|
" Enable/Disable line wrap of vim
|
|
|
|
|
let g:spacevim_wrap_line = 0
|
2019-04-13 22:12:33 +08:00
|
|
|
|
|
|
|
|
|
""
|
|
|
|
|
" @section enable_bepo_layout, options-enable_bepo_layout
|
|
|
|
|
" @parentsection options
|
|
|
|
|
" Enable/Disable bepo layout, by default it is disabled.
|
|
|
|
|
" >
|
|
|
|
|
" enable_bepo_layout = true
|
|
|
|
|
" <
|
|
|
|
|
|
|
|
|
|
""
|
|
|
|
|
" Enable/Disable bepo layout, by default it is disabled.
|
|
|
|
|
let g:spacevim_enable_bepo_layout = 0
|
|
|
|
|
|
|
|
|
|
|
2018-06-10 23:30:02 +08:00
|
|
|
|
""
|
|
|
|
|
" @section max_column, options-max_column
|
|
|
|
|
" @parentsection options
|
|
|
|
|
" Change the max number of columns for SpaceVim. Default is 120.
|
|
|
|
|
" >
|
|
|
|
|
" max_column = 120
|
|
|
|
|
" <
|
|
|
|
|
|
2017-06-27 15:31:34 +08:00
|
|
|
|
""
|
2017-02-17 13:56:55 +08:00
|
|
|
|
" Change the max number of columns for SpaceVim. Default is 120.
|
2017-01-03 00:27:11 +08:00
|
|
|
|
" >
|
|
|
|
|
" let g:spacevim_max_column = 120
|
|
|
|
|
" <
|
2017-01-02 10:38:23 +08:00
|
|
|
|
let g:spacevim_max_column = 120
|
2018-06-10 23:30:02 +08:00
|
|
|
|
|
2021-11-12 10:36:47 +08:00
|
|
|
|
""
|
|
|
|
|
" @section windisk_encoding, options-windisk_encoding
|
|
|
|
|
" @parentsection options
|
|
|
|
|
" Setting the encoding of windisk info. by default it is `cp936`.
|
|
|
|
|
" >
|
|
|
|
|
" windisk_encoding = 'cp936'
|
|
|
|
|
" <
|
|
|
|
|
|
|
|
|
|
let g:spacevim_windisk_encoding = 'cp936'
|
2020-12-20 20:32:21 +08:00
|
|
|
|
|
|
|
|
|
""
|
|
|
|
|
" @section default_custom_leader, options-default_custom_leader
|
|
|
|
|
" @parentsection options
|
|
|
|
|
" Change the default custom leader of SpaceVim. Default is <Space>.
|
|
|
|
|
" >
|
|
|
|
|
" default_custom_leader = "<Space>"
|
|
|
|
|
" <
|
|
|
|
|
|
|
|
|
|
""
|
|
|
|
|
" Change the default custom leader of SpaceVim. Default is <Space>.
|
|
|
|
|
" >
|
|
|
|
|
" let g:spacevim_default_custom_leader = '<Space>'
|
|
|
|
|
" <
|
|
|
|
|
let g:spacevim_default_custom_leader = '<Space>'
|
|
|
|
|
|
2019-04-02 21:08:08 +08:00
|
|
|
|
""
|
2019-05-09 23:19:29 +08:00
|
|
|
|
" @section home_files_number, options-home_files_number
|
2019-04-02 21:08:08 +08:00
|
|
|
|
" @parentsection options
|
|
|
|
|
" Change the list number of files for SpaceVim home. Default is 6.
|
|
|
|
|
" >
|
|
|
|
|
" home_files_number = 6
|
|
|
|
|
" <
|
|
|
|
|
|
|
|
|
|
""
|
|
|
|
|
" Change the list number of files for SpaceVim home. Default is 6.
|
|
|
|
|
" >
|
|
|
|
|
" let g:spacevim_home_files_number = 6
|
|
|
|
|
" <
|
|
|
|
|
let g:spacevim_home_files_number = 6
|
2021-10-01 15:25:42 +08:00
|
|
|
|
""
|
|
|
|
|
" @section code_runner_focus, options-code_runner_focus
|
|
|
|
|
" @parentsection options
|
|
|
|
|
" enable/disable code runner window focus mode, by default this option is
|
|
|
|
|
" `false`, to enable this mode, set this option to `true`.
|
|
|
|
|
" >
|
|
|
|
|
" code_runner_focus = true
|
|
|
|
|
" <
|
2019-04-02 21:08:08 +08:00
|
|
|
|
|
2021-10-01 15:25:42 +08:00
|
|
|
|
""
|
|
|
|
|
" enable/disable code runner window focus mode, by default this option is 0,
|
|
|
|
|
" to enable this mode, set this option to 1.
|
|
|
|
|
let g:spacevim_code_runner_focus = 0
|
2019-04-02 21:08:08 +08:00
|
|
|
|
|
2018-06-10 23:30:02 +08:00
|
|
|
|
""
|
|
|
|
|
" @section enable_guicolors, options-enable_guicolors
|
|
|
|
|
" @parentsection options
|
2019-06-02 11:59:43 +08:00
|
|
|
|
" Enable true color support in terminal. Default is false.
|
2018-06-10 23:30:02 +08:00
|
|
|
|
" >
|
|
|
|
|
" enable_guicolors = true
|
|
|
|
|
" <
|
|
|
|
|
|
2017-01-03 00:27:11 +08:00
|
|
|
|
""
|
2019-06-02 11:59:43 +08:00
|
|
|
|
" Enable true color support in terminal. Default is 0.
|
2017-01-06 19:13:33 +08:00
|
|
|
|
" >
|
|
|
|
|
" let g:spacevim_enable_guicolors = 1
|
|
|
|
|
" <
|
2019-06-02 11:59:43 +08:00
|
|
|
|
let g:spacevim_enable_guicolors = 0
|
2018-06-10 23:30:02 +08:00
|
|
|
|
|
2020-06-30 22:25:15 +08:00
|
|
|
|
""
|
|
|
|
|
" @section escape_key_binding, options-escape_key_binding
|
|
|
|
|
" @parentsection options
|
|
|
|
|
" Set the key binding for switch to normal mode in insert mode.
|
|
|
|
|
" Default is `jk`, to disable this key binding, set this option to empty
|
|
|
|
|
" string.
|
|
|
|
|
" >
|
|
|
|
|
" escape_key_binding = 'jk'
|
|
|
|
|
" <
|
|
|
|
|
|
|
|
|
|
""
|
|
|
|
|
" Set the key binding for switch to normal mode in insert mode.
|
|
|
|
|
" Default is `jk`, to disable this key binding, set this option to empty
|
|
|
|
|
" string.
|
|
|
|
|
" >
|
|
|
|
|
" let g:spacevim_escape_key_binding = 'jk'
|
|
|
|
|
" <
|
|
|
|
|
let g:spacevim_escape_key_binding = 'jk'
|
|
|
|
|
|
2021-05-01 22:47:19 +08:00
|
|
|
|
""
|
|
|
|
|
" @section file_searching_tools, options-file_searching_tools
|
|
|
|
|
" @parentsection options
|
|
|
|
|
" Set the default file searching tool used by `SPC f /`, by default it is `[]`.
|
|
|
|
|
" The first item in this list is the name of the tool, the second one is the
|
|
|
|
|
" default command. for example:
|
|
|
|
|
" >
|
|
|
|
|
" file_searching_tools = ['find', 'find -not -iwholename "*.git*" ']
|
|
|
|
|
" <
|
|
|
|
|
|
|
|
|
|
let g:spacevim_file_searching_tools = []
|
|
|
|
|
|
2018-06-10 23:30:02 +08:00
|
|
|
|
""
|
|
|
|
|
" @section enable_googlesuggest, options-enable_googlesuggest
|
|
|
|
|
" @parentsection options
|
|
|
|
|
" Enable/Disable Google suggestions for neocomplete. Default is false.
|
|
|
|
|
" >
|
|
|
|
|
" enable_googlesuggest = false
|
|
|
|
|
" <
|
|
|
|
|
|
2017-01-06 19:13:33 +08:00
|
|
|
|
""
|
2017-02-17 13:56:55 +08:00
|
|
|
|
" Enable/Disable Google suggestions for neocomplete. Default is 0.
|
2017-01-03 00:27:11 +08:00
|
|
|
|
" >
|
|
|
|
|
" let g:spacevim_enable_googlesuggest = 1
|
|
|
|
|
" <
|
2017-01-02 10:38:23 +08:00
|
|
|
|
let g:spacevim_enable_googlesuggest = 0
|
2018-06-10 23:30:02 +08:00
|
|
|
|
|
|
|
|
|
""
|
|
|
|
|
" @section windows_leader, options-windows_leader
|
|
|
|
|
" @parentsection options
|
2018-12-19 23:59:41 +08:00
|
|
|
|
" Window functions leader for SpaceVim. Default is `s`.
|
2018-06-10 23:30:02 +08:00
|
|
|
|
" Set to empty to disable this feature, or you can set to another char.
|
|
|
|
|
" >
|
|
|
|
|
" windows_leader = ""
|
|
|
|
|
" <
|
|
|
|
|
|
|
|
|
|
|
2017-01-11 23:00:28 +08:00
|
|
|
|
""
|
2018-12-19 23:59:41 +08:00
|
|
|
|
" Window functions leader for SpaceVim. Default is `s`.
|
2017-02-17 13:56:55 +08:00
|
|
|
|
" Set to empty to disable this feature, or you can set to another char.
|
2017-01-11 23:00:28 +08:00
|
|
|
|
" >
|
|
|
|
|
" let g:spacevim_windows_leader = ''
|
|
|
|
|
" <
|
|
|
|
|
let g:spacevim_windows_leader = 's'
|
2018-06-10 23:30:02 +08:00
|
|
|
|
|
2020-03-29 08:34:31 +08:00
|
|
|
|
""
|
|
|
|
|
" @section data_dir, options-data_dir
|
|
|
|
|
" @parentsection options
|
|
|
|
|
" Set the cache directory of SpaceVim. Default is `$XDG_CACHE_HOME`
|
|
|
|
|
" or if not set `~/.cache¸.
|
|
|
|
|
" >
|
|
|
|
|
" data_dir = "~/.cache"
|
|
|
|
|
" <
|
|
|
|
|
|
|
|
|
|
""
|
|
|
|
|
" Set the cache directory of SpaceVim. Default is `$XDG_CACHE_HOME`
|
|
|
|
|
" or if not set `~/.cache¸.
|
|
|
|
|
" >
|
|
|
|
|
" let g:spacevim_data_dir = '~/.cache'
|
|
|
|
|
" <
|
|
|
|
|
let g:spacevim_data_dir
|
|
|
|
|
\ = $XDG_CACHE_HOME != ''
|
|
|
|
|
\ ? $XDG_CACHE_HOME . SpaceVim#api#import('file').separator
|
|
|
|
|
\ : expand($HOME. join(['', '.cache', ''],
|
|
|
|
|
\ SpaceVim#api#import('file').separator))
|
|
|
|
|
|
2020-08-29 16:46:57 +08:00
|
|
|
|
if !isdirectory(g:spacevim_data_dir)
|
|
|
|
|
call mkdir(g:spacevim_data_dir, 'p')
|
|
|
|
|
endif
|
|
|
|
|
|
2018-06-10 23:30:02 +08:00
|
|
|
|
""
|
|
|
|
|
" @section plugin_bundle_dir, options-plugin_bundle_dir
|
|
|
|
|
" @parentsection options
|
2020-03-29 08:34:31 +08:00
|
|
|
|
" Set the cache directory of plugins. Default is `$data_dir/vimfiles`.
|
2018-06-10 23:30:02 +08:00
|
|
|
|
" >
|
|
|
|
|
" plugin_bundle_dir = "~/.cache/vimplugs"
|
|
|
|
|
" <
|
|
|
|
|
|
2017-01-03 22:56:34 +08:00
|
|
|
|
""
|
2020-03-29 08:34:31 +08:00
|
|
|
|
" Set the cache directory of plugins. Default is `$data_dir/vimfiles`.
|
2017-01-03 22:56:34 +08:00
|
|
|
|
" >
|
2021-08-18 20:54:54 +08:00
|
|
|
|
" let g:spacevim_plugin_bundle_dir = g:spacevim_data_dir.'vimplugs'
|
2017-01-03 22:56:34 +08:00
|
|
|
|
" <
|
2017-03-07 22:11:41 +08:00
|
|
|
|
let g:spacevim_plugin_bundle_dir
|
2020-03-29 08:34:31 +08:00
|
|
|
|
\ = g:spacevim_data_dir . join(['vimfiles', ''],
|
2017-03-07 22:11:41 +08:00
|
|
|
|
\ SpaceVim#api#import('file').separator)
|
2018-06-10 23:30:02 +08:00
|
|
|
|
|
|
|
|
|
""
|
|
|
|
|
" @section realtime_leader_guide, options-realtime_leader_guide
|
|
|
|
|
" @parentsection options
|
|
|
|
|
" Enable/Disable realtime leader guide. Default is true. to disable it:
|
|
|
|
|
" >
|
|
|
|
|
" realtime_leader_guide = false
|
|
|
|
|
" <
|
|
|
|
|
|
2017-01-15 19:50:56 +08:00
|
|
|
|
""
|
2017-05-14 23:30:12 +08:00
|
|
|
|
" Enable/Disable realtime leader guide. Default is 1. to disable it:
|
2017-01-15 19:50:56 +08:00
|
|
|
|
" >
|
2017-05-14 23:30:12 +08:00
|
|
|
|
" let g:spacevim_realtime_leader_guide = 0
|
2017-01-15 19:50:56 +08:00
|
|
|
|
" <
|
2017-05-14 23:30:12 +08:00
|
|
|
|
let g:spacevim_realtime_leader_guide = 1
|
2019-05-30 21:14:39 +08:00
|
|
|
|
|
|
|
|
|
""
|
|
|
|
|
" @section enable_key_frequency, options-enable_key_frequency
|
|
|
|
|
" @parentsection options
|
|
|
|
|
" Enable/Disable key frequency catching of SpaceVim. default value is 0. to
|
|
|
|
|
" enable it:
|
|
|
|
|
" >
|
|
|
|
|
" enable_key_frequency = true
|
|
|
|
|
" <
|
|
|
|
|
|
2017-04-03 12:52:09 +08:00
|
|
|
|
""
|
2017-04-03 13:12:35 +08:00
|
|
|
|
" Enable/Disable key frequency catching of SpaceVim. default value is 0. to
|
|
|
|
|
" enable it:
|
|
|
|
|
" >
|
|
|
|
|
" let g:spacevim_enable_key_frequency = 1
|
|
|
|
|
" <
|
|
|
|
|
let g:spacevim_enable_key_frequency = 0
|
2022-01-01 22:39:42 +08:00
|
|
|
|
if (has('python3')
|
2021-04-02 23:32:59 +08:00
|
|
|
|
\ && (SpaceVim#util#haspy3lib('neovim')
|
|
|
|
|
\ || SpaceVim#util#haspy3lib('pynvim'))) &&
|
2018-04-09 20:07:27 +08:00
|
|
|
|
\ (has('nvim') || (has('patch-8.0.0027')))
|
2019-05-30 21:14:39 +08:00
|
|
|
|
|
|
|
|
|
""
|
|
|
|
|
" @section autocomplete_method, options-autocomplete_method
|
|
|
|
|
" @parentsection options
|
|
|
|
|
" Set the autocomplete engine of spacevim, the default logic is:
|
|
|
|
|
" >
|
|
|
|
|
" if has('python3')
|
|
|
|
|
" let g:spacevim_autocomplete_method = 'deoplete'
|
|
|
|
|
" elseif has('lua')
|
|
|
|
|
" let g:spacevim_autocomplete_method = 'neocomplete'
|
|
|
|
|
" elseif has('python')
|
|
|
|
|
" let g:spacevim_autocomplete_method = 'completor'
|
|
|
|
|
" elseif has('timers')
|
|
|
|
|
" let g:spacevim_autocomplete_method = 'asyncomplete'
|
|
|
|
|
" else
|
|
|
|
|
" let g:spacevim_autocomplete_method = 'neocomplcache'
|
|
|
|
|
" endif
|
|
|
|
|
" <
|
|
|
|
|
"
|
|
|
|
|
" and you can alse set this option to coc, then coc.nvim will be used.
|
2022-04-13 13:24:05 +08:00
|
|
|
|
" If you are using neovim, you can also set this option to `nvim-cmp`, then
|
|
|
|
|
" nvim-cmp will be used.
|
2019-05-30 21:14:39 +08:00
|
|
|
|
|
2017-11-23 10:39:06 +08:00
|
|
|
|
""
|
|
|
|
|
" Set the autocomplete engine of spacevim, the default logic is:
|
|
|
|
|
" >
|
|
|
|
|
" if has('python3')
|
|
|
|
|
" let g:spacevim_autocomplete_method = 'deoplete'
|
|
|
|
|
" elseif has('lua')
|
|
|
|
|
" let g:spacevim_autocomplete_method = 'neocomplete'
|
|
|
|
|
" elseif has('python')
|
|
|
|
|
" let g:spacevim_autocomplete_method = 'completor'
|
|
|
|
|
" elseif has('timers')
|
|
|
|
|
" let g:spacevim_autocomplete_method = 'asyncomplete'
|
|
|
|
|
" else
|
|
|
|
|
" let g:spacevim_autocomplete_method = 'neocomplcache'
|
|
|
|
|
" endif
|
|
|
|
|
" <
|
2018-12-13 23:07:55 +08:00
|
|
|
|
"
|
2019-05-08 13:34:49 +08:00
|
|
|
|
" and you can alse set this option to coc, then coc.nvim will be used.
|
2017-11-23 10:39:06 +08:00
|
|
|
|
let g:spacevim_autocomplete_method = 'deoplete'
|
2021-04-02 23:32:59 +08:00
|
|
|
|
|
|
|
|
|
" neocomplete does not work with Vim 8.2.1066
|
|
|
|
|
elseif has('lua') && !has('patch-8.2.1066')
|
2017-11-23 10:39:06 +08:00
|
|
|
|
let g:spacevim_autocomplete_method = 'neocomplete'
|
2018-04-09 22:05:21 +08:00
|
|
|
|
elseif has('python') && ((has('job') && has('timers') && has('lambda')) || has('nvim'))
|
2017-11-23 10:39:06 +08:00
|
|
|
|
let g:spacevim_autocomplete_method = 'completor'
|
|
|
|
|
elseif has('timers')
|
|
|
|
|
let g:spacevim_autocomplete_method = 'asyncomplete'
|
|
|
|
|
else
|
|
|
|
|
let g:spacevim_autocomplete_method = 'neocomplcache'
|
|
|
|
|
endif
|
2018-06-10 23:30:02 +08:00
|
|
|
|
|
|
|
|
|
""
|
2021-02-10 10:31:34 +08:00
|
|
|
|
" @section lint_engine, options-lint_engine
|
2018-06-10 23:30:02 +08:00
|
|
|
|
" @parentsection options
|
2021-02-10 10:31:34 +08:00
|
|
|
|
" Set the lint engine used in checkers layer, the default engine is neomake,
|
|
|
|
|
" if you want to use ale, use:
|
2018-06-10 23:30:02 +08:00
|
|
|
|
" >
|
2021-02-10 10:31:34 +08:00
|
|
|
|
" lint_engine = 'ale'
|
2018-06-10 23:30:02 +08:00
|
|
|
|
" <
|
2021-02-10 10:31:34 +08:00
|
|
|
|
" NOTE: the `enable_neomake` and `enable_ale` option has been deprecated.
|
|
|
|
|
" *spacevim-options-enable_naomake*
|
|
|
|
|
" *spacevim-options-enable_ale*
|
2018-06-10 23:30:02 +08:00
|
|
|
|
|
2017-02-16 20:01:33 +08:00
|
|
|
|
""
|
2021-02-10 10:31:34 +08:00
|
|
|
|
" Set the lint engine used in checkers layer, the default engine is neomake,
|
|
|
|
|
" if you want to use ale, use:
|
2017-02-16 20:01:33 +08:00
|
|
|
|
" >
|
2021-02-10 10:31:34 +08:00
|
|
|
|
" let g:spacevim_lint_engine = 'ale'
|
2017-02-16 20:01:33 +08:00
|
|
|
|
" <
|
2021-02-10 10:31:34 +08:00
|
|
|
|
let g:spacevim_lint_engine = 'neomake'
|
2018-06-10 23:30:02 +08:00
|
|
|
|
|
|
|
|
|
""
|
|
|
|
|
" @section guifont, options-guifont
|
|
|
|
|
" @parentsection options
|
|
|
|
|
" Set the guifont of SpaceVim. Default is empty.
|
|
|
|
|
" >
|
2018-12-23 21:55:41 +08:00
|
|
|
|
" guifont = "SauceCodePro Nerd Font Mono:h11"
|
2018-06-10 23:30:02 +08:00
|
|
|
|
" <
|
|
|
|
|
|
2017-10-25 09:41:04 +08:00
|
|
|
|
""
|
2017-02-17 13:56:55 +08:00
|
|
|
|
" Set the guifont of SpaceVim. Default is empty.
|
2017-01-11 01:03:52 +08:00
|
|
|
|
" >
|
2018-12-23 21:55:41 +08:00
|
|
|
|
" let g:spacevim_guifont = "SauceCodePro Nerd Font Mono:h11"
|
2017-01-11 01:03:52 +08:00
|
|
|
|
" <
|
2017-01-02 10:38:23 +08:00
|
|
|
|
let g:spacevim_guifont = ''
|
2018-06-10 23:30:02 +08:00
|
|
|
|
|
|
|
|
|
""
|
|
|
|
|
" @section enable_ycm, options-enable_ycm
|
|
|
|
|
" @parentsection options
|
|
|
|
|
" Enable/Disable YouCompleteMe. Default is false.
|
|
|
|
|
" >
|
|
|
|
|
" enable_ycm = true
|
|
|
|
|
" <
|
|
|
|
|
|
2017-01-02 10:38:23 +08:00
|
|
|
|
""
|
2017-02-17 13:56:55 +08:00
|
|
|
|
" Enable/Disable YouCompleteMe. Default is 0.
|
2017-01-11 01:03:52 +08:00
|
|
|
|
" >
|
|
|
|
|
" let g:spacevim_enable_ycm = 1
|
|
|
|
|
" <
|
2017-01-02 10:38:23 +08:00
|
|
|
|
let g:spacevim_enable_ycm = 0
|
2018-06-10 23:30:02 +08:00
|
|
|
|
|
|
|
|
|
""
|
|
|
|
|
" @section sidebar_width, options-sidebar_width
|
|
|
|
|
" @parentsection options
|
|
|
|
|
" Set the width of the SpaceVim sidebar. Default is 30.
|
2021-09-19 17:32:31 +08:00
|
|
|
|
" This value will be used by tagbar and filetree.
|
2018-06-10 23:30:02 +08:00
|
|
|
|
|
2017-02-16 21:27:49 +08:00
|
|
|
|
""
|
2017-02-17 13:56:55 +08:00
|
|
|
|
" Set the width of the SpaceVim sidebar. Default is 30.
|
2021-09-19 17:32:31 +08:00
|
|
|
|
" This value will be used by tagbar and filetree.
|
2017-02-16 21:27:49 +08:00
|
|
|
|
let g:spacevim_sidebar_width = 30
|
2018-06-10 23:30:02 +08:00
|
|
|
|
|
|
|
|
|
""
|
|
|
|
|
" @section snippet_engine, options-snippet_engine
|
|
|
|
|
" @parentsection options
|
|
|
|
|
" Set the snippet engine of SpaceVim, default is neosnippet. to enable
|
|
|
|
|
" ultisnips:
|
|
|
|
|
" >
|
|
|
|
|
" snippet_engine = "ultisnips"
|
|
|
|
|
" <
|
|
|
|
|
|
2017-04-02 19:39:42 +08:00
|
|
|
|
""
|
|
|
|
|
" Set the snippet engine of SpaceVim, default is neosnippet. to enable
|
|
|
|
|
" ultisnips:
|
|
|
|
|
" >
|
2018-06-10 23:30:02 +08:00
|
|
|
|
" let g:spacevim_snippet_engine = "ultisnips"
|
2017-04-02 19:39:42 +08:00
|
|
|
|
" <
|
|
|
|
|
let g:spacevim_snippet_engine = 'neosnippet'
|
2017-01-02 10:38:23 +08:00
|
|
|
|
let g:spacevim_enable_neocomplcache = 0
|
2019-05-30 21:14:39 +08:00
|
|
|
|
|
|
|
|
|
""
|
|
|
|
|
" @section enable_cursorline, options-enable_cursorline
|
|
|
|
|
" @parentsection options
|
|
|
|
|
" Enable/Disable cursorline. Default is true, cursorline will be
|
|
|
|
|
" highlighted in normal mode.To disable this feature:
|
|
|
|
|
" >
|
|
|
|
|
" enable_cursorline = false
|
|
|
|
|
" <
|
|
|
|
|
|
2017-01-11 01:03:52 +08:00
|
|
|
|
""
|
2017-05-06 20:33:50 +08:00
|
|
|
|
" Enable/Disable cursorline. Default is 1, cursorline will be
|
|
|
|
|
" highlighted in normal mode.To disable this feature:
|
2017-01-11 01:03:52 +08:00
|
|
|
|
" >
|
2017-05-06 20:33:50 +08:00
|
|
|
|
" let g:spacevim_enable_cursorline = 0
|
2017-01-11 01:03:52 +08:00
|
|
|
|
" <
|
2017-05-06 20:33:50 +08:00
|
|
|
|
let g:spacevim_enable_cursorline = 1
|
2019-05-30 21:14:39 +08:00
|
|
|
|
""
|
|
|
|
|
" @section statusline_separator, options-statusline_separator
|
|
|
|
|
" @parentsection options
|
2019-06-02 11:59:43 +08:00
|
|
|
|
" Set the statusline separators of statusline, default is 'nil'
|
2019-05-30 21:14:39 +08:00
|
|
|
|
" >
|
|
|
|
|
" Separators options:
|
|
|
|
|
" 1. arrow
|
|
|
|
|
" 2. curve
|
|
|
|
|
" 3. slant
|
|
|
|
|
" 4. nil
|
|
|
|
|
" 5. fire
|
|
|
|
|
" <
|
|
|
|
|
"
|
|
|
|
|
" See more details in: http://spacevim.org/documentation/#statusline
|
|
|
|
|
"
|
|
|
|
|
|
2017-05-06 20:33:50 +08:00
|
|
|
|
""
|
2019-06-02 11:59:43 +08:00
|
|
|
|
" Set the statusline separators of statusline, default is 'nil'
|
2017-06-21 21:14:30 +08:00
|
|
|
|
" >
|
2018-03-23 22:08:37 +08:00
|
|
|
|
" Separators options:
|
2017-06-21 21:14:30 +08:00
|
|
|
|
" 1. arrow
|
|
|
|
|
" 2. curve
|
|
|
|
|
" 3. slant
|
|
|
|
|
" 4. nil
|
|
|
|
|
" 5. fire
|
|
|
|
|
" <
|
|
|
|
|
"
|
|
|
|
|
" See more details in: http://spacevim.org/documentation/#statusline
|
|
|
|
|
"
|
2019-06-02 11:59:43 +08:00
|
|
|
|
let g:spacevim_statusline_separator = 'nil'
|
2019-05-30 21:14:39 +08:00
|
|
|
|
""
|
|
|
|
|
" @section statusline_iseparator, options-statusline_iseparator
|
|
|
|
|
" @parentsection options
|
|
|
|
|
" Set the statusline separators of statusline in inactive windows, default is
|
2019-06-02 11:59:43 +08:00
|
|
|
|
" 'nil'
|
2019-05-30 21:14:39 +08:00
|
|
|
|
" >
|
|
|
|
|
" Separators options:
|
|
|
|
|
" 1. arrow
|
|
|
|
|
" 2. curve
|
|
|
|
|
" 3. slant
|
|
|
|
|
" 4. nil
|
|
|
|
|
" 5. fire
|
|
|
|
|
" <
|
|
|
|
|
"
|
|
|
|
|
" See more details in: http://spacevim.org/documentation/#statusline
|
|
|
|
|
"
|
2017-11-19 09:29:34 +08:00
|
|
|
|
|
2018-12-30 14:03:47 +08:00
|
|
|
|
""
|
2019-05-30 21:14:39 +08:00
|
|
|
|
" Set the statusline separators of statusline in inactive windows, default is
|
2019-06-02 11:59:43 +08:00
|
|
|
|
" 'nil'
|
2019-05-30 21:14:39 +08:00
|
|
|
|
" >
|
|
|
|
|
" Separators options:
|
|
|
|
|
" 1. arrow
|
|
|
|
|
" 2. curve
|
|
|
|
|
" 3. slant
|
|
|
|
|
" 4. nil
|
|
|
|
|
" 5. fire
|
|
|
|
|
" <
|
|
|
|
|
"
|
|
|
|
|
" See more details in: http://spacevim.org/documentation/#statusline
|
|
|
|
|
"
|
2019-06-02 11:59:43 +08:00
|
|
|
|
let g:spacevim_statusline_iseparator = 'nil'
|
2019-05-30 21:14:39 +08:00
|
|
|
|
|
|
|
|
|
""
|
|
|
|
|
" @section enable_statusline_bfpath, options-enable_statusline_bfpath
|
|
|
|
|
" @parentsection options
|
|
|
|
|
" Enable/Disable showing full path of current buffer on statusline, disabled
|
|
|
|
|
" by default, to enable this feature:
|
|
|
|
|
" >
|
|
|
|
|
" enable_statusline_bfpath = true
|
|
|
|
|
" <
|
|
|
|
|
|
|
|
|
|
""
|
|
|
|
|
" Enable/Disable showing full path of current buffer on statusline, disabled
|
|
|
|
|
" by default, to enable this feature:
|
|
|
|
|
" >
|
|
|
|
|
" enable_statusline_bfpath = true
|
|
|
|
|
" <
|
2018-12-30 14:03:47 +08:00
|
|
|
|
let g:spacevim_enable_statusline_bfpath = 0
|
|
|
|
|
|
2018-12-31 23:09:35 +08:00
|
|
|
|
""
|
|
|
|
|
" @section enable_statusline_tag, options-enable_statusline_tag
|
|
|
|
|
" @parentsection options
|
|
|
|
|
" Enable/Disable showing current tag on statusline
|
|
|
|
|
" >
|
|
|
|
|
" enable_statusline_tag = false
|
|
|
|
|
" <
|
|
|
|
|
|
|
|
|
|
""
|
|
|
|
|
" Enable/Disable showing current tag on statusline
|
|
|
|
|
let g:spacevim_enable_statusline_tag = 1
|
2019-05-30 21:14:39 +08:00
|
|
|
|
""
|
2022-04-14 17:33:50 +08:00
|
|
|
|
" @section statusline_left, options-statusline_left
|
2019-05-30 21:14:39 +08:00
|
|
|
|
" @parentsection options
|
|
|
|
|
" Define the left section of statusline in active windows. By default:
|
|
|
|
|
" >
|
2022-04-14 17:33:50 +08:00
|
|
|
|
" statusline_left = [
|
2019-05-30 21:14:39 +08:00
|
|
|
|
" 'winnr',
|
|
|
|
|
" 'filename',
|
|
|
|
|
" 'major mode',
|
|
|
|
|
" 'minor mode lighters',
|
|
|
|
|
" 'version control info'
|
|
|
|
|
" ]
|
|
|
|
|
" <
|
2022-04-14 17:27:22 +08:00
|
|
|
|
" `statusline_left_sections` is deprecated, use `statusline_left` instead.
|
2018-12-31 23:09:35 +08:00
|
|
|
|
|
2017-11-19 10:18:32 +08:00
|
|
|
|
""
|
|
|
|
|
" Define the left section of statusline in active windows. By default:
|
|
|
|
|
" >
|
2022-04-14 17:27:22 +08:00
|
|
|
|
" let g:spacevim_statusline_left =
|
2017-11-19 10:18:32 +08:00
|
|
|
|
" \ [
|
|
|
|
|
" \ 'winnr',
|
|
|
|
|
" \ 'filename',
|
|
|
|
|
" \ 'major mode',
|
|
|
|
|
" \ 'minor mode lighters',
|
|
|
|
|
" \ 'version control info'
|
|
|
|
|
" \ ]
|
|
|
|
|
" <
|
2022-04-14 17:27:22 +08:00
|
|
|
|
" `g:spacevim_statusline_left_sections` is deprecated,
|
|
|
|
|
" use `g:spacevim_statusline_left` instead.
|
|
|
|
|
let g:spacevim_statusline_left = ['winnr', 'filename', 'major mode',
|
2019-09-19 22:43:59 +08:00
|
|
|
|
\ 'search count',
|
2018-01-18 20:34:43 +08:00
|
|
|
|
\ 'syntax checking', 'minor mode lighters',
|
2018-03-12 21:00:24 +08:00
|
|
|
|
\ ]
|
2022-03-20 10:13:18 +08:00
|
|
|
|
""
|
2022-04-14 17:33:50 +08:00
|
|
|
|
" @section statusline_right, options-statusline_right
|
2022-03-20 10:13:18 +08:00
|
|
|
|
" @parentsection options
|
|
|
|
|
" Define the right section of statusline in active windows. By default:
|
|
|
|
|
" >
|
2022-04-14 17:33:50 +08:00
|
|
|
|
" statusline_right = [
|
2022-03-20 10:13:18 +08:00
|
|
|
|
" 'fileformat',
|
|
|
|
|
" 'cursorpos',
|
|
|
|
|
" 'percentage'
|
|
|
|
|
" ]
|
|
|
|
|
" <
|
|
|
|
|
"
|
|
|
|
|
" The following sections can be used in this option:
|
|
|
|
|
" - fileformat: the format of current file
|
|
|
|
|
" - cursorpos: the corsur position
|
|
|
|
|
" - percentage: the percent of current page
|
|
|
|
|
" - totallines: the total lines of current buffer
|
2022-04-14 17:27:22 +08:00
|
|
|
|
"
|
|
|
|
|
" `statusline_right_sections` is deprecated, use `statusline_right` instead.
|
2022-03-20 10:13:18 +08:00
|
|
|
|
|
2017-11-19 10:18:32 +08:00
|
|
|
|
""
|
|
|
|
|
" Define the right section of statusline in active windows. By default:
|
|
|
|
|
" >
|
2022-04-14 17:27:22 +08:00
|
|
|
|
" g:spacevim_statusline_right =
|
2018-01-18 20:34:43 +08:00
|
|
|
|
" \ [
|
|
|
|
|
" \ 'fileformat',
|
|
|
|
|
" \ 'cursorpos',
|
|
|
|
|
" \ 'percentage'
|
|
|
|
|
" \ ]
|
2017-11-19 10:18:32 +08:00
|
|
|
|
" <
|
2022-04-14 17:27:22 +08:00
|
|
|
|
"
|
|
|
|
|
" `g:spacevim_statusline_right_sections` is deprecated,
|
|
|
|
|
" use `g:spacevim_statusline_right` instead.
|
|
|
|
|
let g:spacevim_statusline_right = ['fileformat', 'cursorpos', 'percentage']
|
2017-11-19 09:29:34 +08:00
|
|
|
|
|
2017-05-19 20:45:03 +08:00
|
|
|
|
""
|
2021-09-25 21:09:11 +08:00
|
|
|
|
" @section statusline_unicode, options-statusline_unicode
|
2020-09-26 11:14:25 +08:00
|
|
|
|
" @parentsection options
|
|
|
|
|
" Enable/Disable unicode symbols in statusline, includes the mode icons and
|
|
|
|
|
" fileformat icons. This option is enabled by default, to disable it:
|
|
|
|
|
" >
|
2021-09-25 21:09:11 +08:00
|
|
|
|
" statusline_unicode = false
|
2020-09-26 11:14:25 +08:00
|
|
|
|
" <
|
|
|
|
|
|
|
|
|
|
""
|
|
|
|
|
" Enable/Disable unicode symbols in statusline, includes the mode icons and
|
|
|
|
|
" fileformat icons. This option is enabled by default, to disable it:
|
|
|
|
|
" >
|
2021-09-25 21:09:11 +08:00
|
|
|
|
" let g:spacevim_statusline_unicode = 0
|
2020-09-26 11:14:25 +08:00
|
|
|
|
" <
|
2021-09-25 21:09:11 +08:00
|
|
|
|
let g:spacevim_statusline_unicode = 1
|
2017-09-20 21:03:01 +08:00
|
|
|
|
""
|
2018-01-07 12:12:34 +08:00
|
|
|
|
" Enable/Disable language specific leader, by default you can use `,` ket
|
|
|
|
|
" instead of `SPC` `l`.
|
|
|
|
|
let g:spacevim_enable_language_specific_leader = 1
|
2018-06-10 23:30:02 +08:00
|
|
|
|
|
|
|
|
|
""
|
2018-06-18 16:12:31 +08:00
|
|
|
|
" @section enable_statusline_mode, options-enable_statusline_mode
|
2018-06-10 23:30:02 +08:00
|
|
|
|
" @parentsection options
|
|
|
|
|
" Enable/Disable display mode. Default is 0, mode will be
|
|
|
|
|
" displayed in statusline. To enable this feature:
|
|
|
|
|
" >
|
2018-06-18 16:12:31 +08:00
|
|
|
|
" enable_statusline_mode = true
|
2018-06-10 23:30:02 +08:00
|
|
|
|
" <
|
|
|
|
|
|
2018-01-07 12:12:34 +08:00
|
|
|
|
""
|
2017-10-19 19:04:43 +08:00
|
|
|
|
" Enable/Disable display mode. Default is 0, mode will be
|
|
|
|
|
" displayed in statusline. To enable this feature:
|
|
|
|
|
" >
|
2018-06-18 16:12:31 +08:00
|
|
|
|
" let g:spacevim_enable_statusline_mode = 1
|
2017-10-19 19:04:43 +08:00
|
|
|
|
" <
|
2018-06-18 16:12:31 +08:00
|
|
|
|
let g:spacevim_enable_statusline_mode = 0
|
2017-10-19 19:04:43 +08:00
|
|
|
|
""
|
2017-10-23 03:13:42 +08:00
|
|
|
|
" Set the statusline/tabline palette of color, default values depends on the theme
|
|
|
|
|
" >
|
|
|
|
|
" let g:spacevim_custom_color_palette = [
|
|
|
|
|
" \ ['#282828', '#b8bb26', 246, 235],
|
|
|
|
|
" \ ['#a89984', '#504945', 239, 246],
|
|
|
|
|
" \ ['#a89984', '#3c3836', 237, 246],
|
|
|
|
|
" \ ['#665c54', 241],
|
|
|
|
|
" \ ['#282828', '#83a598', 235, 109],
|
|
|
|
|
" \ ['#282828', '#fe8019', 235, 208],
|
|
|
|
|
" \ ['#282828', '#8ec07c', 235, 108],
|
2018-03-24 21:15:45 +08:00
|
|
|
|
" \ ['#282828', '#689d6a', 235, 72],
|
|
|
|
|
" \ ['#282828', '#8f3f71', 235, 132],
|
2017-10-23 03:13:42 +08:00
|
|
|
|
" \ ]
|
|
|
|
|
" <
|
|
|
|
|
"
|
|
|
|
|
let g:spacevim_custom_color_palette = []
|
2019-10-03 22:00:09 +08:00
|
|
|
|
|
|
|
|
|
""
|
|
|
|
|
" @section enable_cursorcolumn, options-enable_cursorcolumn
|
|
|
|
|
" @parentsection options
|
|
|
|
|
" Enable/Disable cursorcolumn. Default is 0, cursorcolumn will be
|
|
|
|
|
" highlighted in normal mode. To enable this feature:
|
|
|
|
|
" >
|
|
|
|
|
" enable_cursorcolumn = true
|
|
|
|
|
" <
|
|
|
|
|
|
2017-10-23 03:13:42 +08:00
|
|
|
|
""
|
2017-05-06 20:36:39 +08:00
|
|
|
|
" Enable/Disable cursorcolumn. Default is 0, cursorcolumn will be
|
|
|
|
|
" highlighted in normal mode. To enable this feature:
|
2017-05-06 20:33:50 +08:00
|
|
|
|
" >
|
2017-05-06 20:36:39 +08:00
|
|
|
|
" let g:spacevim_enable_cursorcolumn = 1
|
2017-05-06 20:33:50 +08:00
|
|
|
|
" <
|
2017-05-06 20:36:39 +08:00
|
|
|
|
let g:spacevim_enable_cursorcolumn = 0
|
2018-06-10 23:30:02 +08:00
|
|
|
|
|
|
|
|
|
""
|
|
|
|
|
" @section error_symbol, options-error_symbol
|
|
|
|
|
" @parentsection options
|
|
|
|
|
" Set the error symbol for SpaceVim's syntax maker. Default is '✖'.
|
|
|
|
|
" >
|
|
|
|
|
" error_symbol = "+"
|
|
|
|
|
" <
|
|
|
|
|
|
2017-01-02 10:38:23 +08:00
|
|
|
|
""
|
2017-02-17 13:56:55 +08:00
|
|
|
|
" Set the error symbol for SpaceVim's syntax maker. Default is '✖'.
|
|
|
|
|
" >
|
2017-01-19 20:41:06 +08:00
|
|
|
|
" let g:spacevim_error_symbol = '+'
|
|
|
|
|
" <
|
2017-01-02 10:38:23 +08:00
|
|
|
|
let g:spacevim_error_symbol = '✖'
|
2019-05-30 21:14:39 +08:00
|
|
|
|
|
|
|
|
|
""
|
|
|
|
|
" @section warning_symbol, options-warning_symbol
|
|
|
|
|
" @parentsection options
|
|
|
|
|
" Set the warning symbol for SpaceVim's syntax maker. Default is '⚠'.
|
|
|
|
|
" >
|
|
|
|
|
" warning_symbol = '!'
|
|
|
|
|
" <
|
|
|
|
|
|
2017-01-19 20:41:06 +08:00
|
|
|
|
""
|
2017-02-17 13:56:55 +08:00
|
|
|
|
" Set the warning symbol for SpaceVim's syntax maker. Default is '⚠'.
|
|
|
|
|
" >
|
2017-01-19 20:41:06 +08:00
|
|
|
|
" let g:spacevim_warning_symbol = '!'
|
|
|
|
|
" <
|
2017-01-02 10:38:23 +08:00
|
|
|
|
let g:spacevim_warning_symbol = '⚠'
|
2019-05-30 21:14:39 +08:00
|
|
|
|
|
|
|
|
|
""
|
|
|
|
|
" @section info_symbol, options-info_symbol
|
|
|
|
|
" @parentsection options
|
|
|
|
|
" Set the information symbol for SpaceVim's syntax maker. Default is '🛈'.
|
|
|
|
|
" >
|
|
|
|
|
" info_symbol = 'i'
|
|
|
|
|
" <
|
|
|
|
|
|
2017-03-26 16:37:49 +08:00
|
|
|
|
""
|
2017-11-19 10:32:59 +08:00
|
|
|
|
" Set the information symbol for SpaceVim's syntax maker. Default is '🛈'.
|
|
|
|
|
" >
|
|
|
|
|
" let g:spacevim_info_symbol = 'i'
|
|
|
|
|
" <
|
2018-01-07 11:01:04 +08:00
|
|
|
|
let g:spacevim_info_symbol = SpaceVim#api#import('messletters').circled_letter('i')
|
2019-05-30 21:14:39 +08:00
|
|
|
|
|
|
|
|
|
""
|
|
|
|
|
" @section terminal_cursor_shape, options-terminal_cursor_shape
|
|
|
|
|
" @parentsection options
|
|
|
|
|
" Set the SpaceVim cursor shape in the terminal.
|
|
|
|
|
" >
|
|
|
|
|
" 0 : to prevent Nvim from changing the cursor shape.
|
|
|
|
|
" 1 : to enable non-blinking mode-sensitive cursor.
|
|
|
|
|
" 2 : to enable blinking mode-sensitive cursor (default).
|
|
|
|
|
" >
|
|
|
|
|
" Host terminal must support the DECSCUSR CSI escape sequence.
|
|
|
|
|
" Depending on the terminal emulator, using this option with nvim under
|
|
|
|
|
" tmux might require adding the following to ~/.tmux.conf:
|
|
|
|
|
" >
|
|
|
|
|
" set -ga terminal-overrides ',*:Ss=\E[%p1%d q:Se=\E[2 q'
|
|
|
|
|
" <
|
|
|
|
|
|
2017-11-19 10:32:59 +08:00
|
|
|
|
""
|
2018-12-19 23:59:41 +08:00
|
|
|
|
" Set the SpaceVim cursor shape in the terminal.
|
2017-12-10 00:23:18 +08:00
|
|
|
|
" >
|
|
|
|
|
" 0 : to prevent Nvim from changing the cursor shape.
|
|
|
|
|
" 1 : to enable non-blinking mode-sensitive cursor.
|
|
|
|
|
" 2 : to enable blinking mode-sensitive cursor (default).
|
|
|
|
|
" >
|
|
|
|
|
" Host terminal must support the DECSCUSR CSI escape sequence.
|
2017-03-26 16:37:49 +08:00
|
|
|
|
" Depending on the terminal emulator, using this option with nvim under
|
|
|
|
|
" tmux might require adding the following to ~/.tmux.conf:
|
|
|
|
|
" >
|
|
|
|
|
" set -ga terminal-overrides ',*:Ss=\E[%p1%d q:Se=\E[2 q'
|
|
|
|
|
" <
|
|
|
|
|
let g:spacevim_terminal_cursor_shape = 2
|
2019-10-03 22:00:09 +08:00
|
|
|
|
""
|
|
|
|
|
" @section vim_help_language, options-vim_help_language
|
|
|
|
|
" @parentsection options
|
|
|
|
|
" Set the help language of vim. Default is 'en'.
|
|
|
|
|
" You can change it to Chinese.
|
|
|
|
|
" >
|
|
|
|
|
" vim_help_language = "cn"
|
|
|
|
|
" <
|
|
|
|
|
|
2017-01-19 20:41:06 +08:00
|
|
|
|
""
|
2018-12-19 23:59:41 +08:00
|
|
|
|
" Set the help language of vim. Default is 'en'.
|
2017-02-17 13:56:55 +08:00
|
|
|
|
" You can change it to Chinese.
|
2017-01-19 20:41:06 +08:00
|
|
|
|
" >
|
2017-10-23 21:25:59 +08:00
|
|
|
|
" let g:spacevim_vim_help_language = 'cn'
|
2017-01-19 20:41:06 +08:00
|
|
|
|
" <
|
2017-01-02 10:38:23 +08:00
|
|
|
|
let g:spacevim_vim_help_language = 'en'
|
2019-05-30 21:14:39 +08:00
|
|
|
|
""
|
|
|
|
|
" @section language, options-language
|
|
|
|
|
" @parentsection options
|
|
|
|
|
" Set the message language of vim. Default is 'en_US.UTF-8'.
|
|
|
|
|
" >
|
|
|
|
|
" language = 'en_CA.utf8'
|
|
|
|
|
" <
|
|
|
|
|
|
2017-01-02 10:38:23 +08:00
|
|
|
|
""
|
2017-02-17 13:56:55 +08:00
|
|
|
|
" Set the message language of vim. Default is 'en_US.UTF-8'.
|
2017-01-30 20:36:03 +08:00
|
|
|
|
" >
|
|
|
|
|
" let g:spacevim_language = 'en_CA.utf8'
|
|
|
|
|
" <
|
|
|
|
|
let g:spacevim_language = ''
|
2019-05-30 21:14:39 +08:00
|
|
|
|
""
|
|
|
|
|
" @section keep_server_alive, options-keep_server_alive
|
|
|
|
|
" @parentsection options
|
|
|
|
|
" Option for keep the spacevim server ailive
|
|
|
|
|
|
2017-01-30 20:36:03 +08:00
|
|
|
|
""
|
2017-10-04 13:49:14 +08:00
|
|
|
|
" Option for keep the spacevim server ailive
|
|
|
|
|
let g:spacevim_keep_server_alive = 1
|
2019-05-30 21:14:39 +08:00
|
|
|
|
""
|
|
|
|
|
" @section colorscheme, options-colorscheme
|
|
|
|
|
" @parentsection options
|
|
|
|
|
" The colorscheme of SpaceVim. Default is 'gruvbox'.
|
|
|
|
|
|
2017-10-04 13:49:14 +08:00
|
|
|
|
""
|
2017-02-17 13:56:55 +08:00
|
|
|
|
" The colorscheme of SpaceVim. Default is 'gruvbox'.
|
2017-01-02 10:38:23 +08:00
|
|
|
|
let g:spacevim_colorscheme = 'gruvbox'
|
2019-05-30 21:14:39 +08:00
|
|
|
|
""
|
|
|
|
|
" @section colorscheme_bg, options-colorscheme_bg
|
|
|
|
|
" @parentsection options
|
|
|
|
|
" The background of colorscheme. Default is 'dark'.
|
|
|
|
|
|
2017-01-02 10:38:23 +08:00
|
|
|
|
""
|
2017-04-30 15:34:09 +08:00
|
|
|
|
" The background of colorscheme. Default is 'dark'.
|
|
|
|
|
let g:spacevim_colorscheme_bg = 'dark'
|
|
|
|
|
""
|
2018-12-19 23:59:41 +08:00
|
|
|
|
" The default colorscheme of SpaceVim. Default is 'desert'.
|
|
|
|
|
" This colorscheme will be used if the colorscheme set by
|
2017-02-17 13:56:55 +08:00
|
|
|
|
" `g:spacevim_colorscheme` is not installed.
|
2017-01-11 15:40:19 +08:00
|
|
|
|
" >
|
|
|
|
|
" let g:spacevim_colorscheme_default = 'other_color'
|
|
|
|
|
" <
|
2017-01-02 10:38:23 +08:00
|
|
|
|
let g:spacevim_colorscheme_default = 'desert'
|
2019-05-30 21:14:39 +08:00
|
|
|
|
""
|
|
|
|
|
" @section filemanager, options-filemanager
|
|
|
|
|
" @parentsection options
|
2021-09-12 23:06:37 +08:00
|
|
|
|
" The default file manager of SpaceVim. Default is 'nerdtree'.
|
|
|
|
|
" you can also use defx or vimfiler
|
2019-05-30 21:14:39 +08:00
|
|
|
|
|
2017-01-11 15:40:19 +08:00
|
|
|
|
""
|
2021-09-12 23:06:37 +08:00
|
|
|
|
" The default file manager of SpaceVim. Default is 'nerdtree'.
|
|
|
|
|
" you can also use defx or vimfiler
|
|
|
|
|
let g:spacevim_filemanager = 'nerdtree'
|
2019-05-30 21:14:39 +08:00
|
|
|
|
""
|
|
|
|
|
" @section filetree_direction, options-filetree_direction
|
|
|
|
|
" @parentsection options
|
|
|
|
|
" Config the direction of file tree. Default is 'right'. you can also set to
|
2020-12-20 19:36:17 +08:00
|
|
|
|
" 'left'.
|
2019-05-30 21:14:39 +08:00
|
|
|
|
"
|
|
|
|
|
" NOTE: if it is 'left', the tagbar will be move to right.
|
2018-09-15 09:21:38 +08:00
|
|
|
|
|
2019-03-14 00:03:35 +08:00
|
|
|
|
""
|
|
|
|
|
" Config the direction of file tree. Default is 'right'. you can also set to
|
2020-12-20 19:36:17 +08:00
|
|
|
|
" 'left'.
|
2019-03-14 00:03:35 +08:00
|
|
|
|
"
|
|
|
|
|
" NOTE: if it is 'left', the tagbar will be move to right.
|
|
|
|
|
let g:spacevim_filetree_direction = 'right'
|
|
|
|
|
|
2018-09-15 09:21:38 +08:00
|
|
|
|
let g:spacevim_sidebar_direction = ''
|
2017-01-02 10:38:23 +08:00
|
|
|
|
""
|
2018-07-21 15:34:13 +08:00
|
|
|
|
" The default plugin manager of SpaceVim.
|
|
|
|
|
" if has patch 7.4.2071, the default value is dein. Otherwise it is neobundle.
|
2017-02-17 13:56:55 +08:00
|
|
|
|
" Options are dein, neobundle, or vim-plug.
|
2021-02-21 15:56:37 +08:00
|
|
|
|
if has('patch-7.4.2071')
|
2018-07-21 15:34:13 +08:00
|
|
|
|
let g:spacevim_plugin_manager = 'dein'
|
|
|
|
|
else
|
|
|
|
|
let g:spacevim_plugin_manager = 'neobundle'
|
|
|
|
|
endif
|
2018-06-10 23:30:02 +08:00
|
|
|
|
|
|
|
|
|
""
|
|
|
|
|
" @section plugin_manager_processes, options-plugin_manager_processes
|
|
|
|
|
" @parentsection options
|
|
|
|
|
" Set the max process of SpaceVim plugin manager
|
|
|
|
|
|
2017-01-06 21:42:33 +08:00
|
|
|
|
""
|
2017-04-04 23:01:41 +08:00
|
|
|
|
" Set the max process of SpaceVim plugin manager
|
2018-06-10 23:30:02 +08:00
|
|
|
|
let g:spacevim_plugin_manager_processes = 16
|
|
|
|
|
|
|
|
|
|
""
|
|
|
|
|
" @section checkinstall, options-checkinstall
|
|
|
|
|
" @parentsection options
|
|
|
|
|
" Enable/Disable checkinstall on SpaceVim startup. Default is true.
|
|
|
|
|
" >
|
|
|
|
|
" checkinstall = true
|
|
|
|
|
" <
|
|
|
|
|
|
2017-04-04 23:01:41 +08:00
|
|
|
|
""
|
2017-03-29 22:35:02 +08:00
|
|
|
|
" Enable/Disable checkinstall on SpaceVim startup. Default is 1.
|
2017-02-17 13:56:55 +08:00
|
|
|
|
" >
|
2017-03-27 21:19:24 +08:00
|
|
|
|
" let g:spacevim_checkinstall = 1
|
2017-01-06 21:42:33 +08:00
|
|
|
|
" <
|
2017-03-29 22:35:02 +08:00
|
|
|
|
let g:spacevim_checkinstall = 1
|
2017-01-08 16:27:18 +08:00
|
|
|
|
""
|
2019-10-03 22:00:09 +08:00
|
|
|
|
" @section vimcompatible, options-vimcompatible
|
|
|
|
|
" @parentsection options
|
2020-12-20 19:36:17 +08:00
|
|
|
|
" Enable/Disable vimcompatible mode, by default it is false.
|
2019-10-03 22:00:09 +08:00
|
|
|
|
" to enable vimcompatible mode, just add:
|
|
|
|
|
" >
|
|
|
|
|
" vimcompatible = true
|
|
|
|
|
" <
|
|
|
|
|
" In vimcompatible mode all vim origin key bindings will not be changed.
|
|
|
|
|
"
|
|
|
|
|
" Includes:
|
|
|
|
|
" >
|
|
|
|
|
" q smart quit windows
|
|
|
|
|
" s windows key bindings leader
|
2020-04-17 22:23:43 +08:00
|
|
|
|
" , language specific leader
|
|
|
|
|
" <C-a> move cursor to beginning in command line mode
|
|
|
|
|
" <C-b> move cursor to left in command line mode
|
|
|
|
|
" <C-f> move cursor to right in command line mode
|
2019-10-03 22:00:09 +08:00
|
|
|
|
" <C-x> switch buffer
|
|
|
|
|
" <
|
|
|
|
|
|
|
|
|
|
""
|
2020-12-20 19:36:17 +08:00
|
|
|
|
" Enable/Disable vimcompatible mode, by default it is false.
|
2019-10-03 22:00:09 +08:00
|
|
|
|
" to enable vimcompatible mode, just add:
|
|
|
|
|
" >
|
|
|
|
|
" let g:spacevim_vimcompatible = 1
|
|
|
|
|
" <
|
|
|
|
|
" In vimcompatible mode all vim origin key bindings will not be changed.
|
2018-04-29 09:19:12 +08:00
|
|
|
|
"
|
|
|
|
|
" Includes:
|
|
|
|
|
" >
|
|
|
|
|
" q smart quit windows
|
|
|
|
|
" s windows key bindings leader
|
2020-04-17 22:23:43 +08:00
|
|
|
|
" , language specific leader
|
|
|
|
|
" <C-a> move cursor to beginning in command line mode
|
|
|
|
|
" <C-b> move cursor to left in command line mode
|
|
|
|
|
" <C-f> move cursor to right in command line mode
|
2018-04-29 09:19:12 +08:00
|
|
|
|
" <C-x> switch buffer
|
|
|
|
|
" <
|
2018-04-12 20:47:22 +08:00
|
|
|
|
let g:spacevim_vimcompatible = 0
|
2019-05-30 21:14:39 +08:00
|
|
|
|
""
|
|
|
|
|
" @section enable_debug, options-enable_debug
|
|
|
|
|
" @parentsection options
|
|
|
|
|
" Enable/Disable debug mode for SpaceVim. Default is false.
|
|
|
|
|
" >
|
|
|
|
|
" enable_debug = true
|
|
|
|
|
" <
|
|
|
|
|
|
2018-04-12 20:47:22 +08:00
|
|
|
|
""
|
2017-02-17 13:56:55 +08:00
|
|
|
|
" Enable/Disable debug mode for SpaceVim. Default is 0.
|
|
|
|
|
" >
|
2017-01-08 16:27:18 +08:00
|
|
|
|
" let g:spacevim_enable_debug = 1
|
|
|
|
|
" <
|
|
|
|
|
let g:spacevim_enable_debug = 0
|
2017-01-08 23:02:49 +08:00
|
|
|
|
""
|
2017-05-31 22:00:17 +08:00
|
|
|
|
" Auto disable touchpad when switch to insert mode or focuslost in neovim.
|
|
|
|
|
let g:spacevim_auto_disable_touchpad = 1
|
|
|
|
|
""
|
2017-04-07 23:17:01 +08:00
|
|
|
|
" Set the debug level of SpaceVim. Default is 1. see
|
|
|
|
|
" |SpaceVim#logger#setLevel()|
|
2017-01-08 23:02:49 +08:00
|
|
|
|
let g:spacevim_debug_level = 1
|
2017-01-02 10:38:23 +08:00
|
|
|
|
let g:spacevim_hiddenfileinfo = 1
|
2017-11-14 23:08:36 +08:00
|
|
|
|
let g:spacevim_gitcommit_pr_icon = ''
|
2017-11-14 23:16:24 +08:00
|
|
|
|
let g:spacevim_gitcommit_issue_icon = ''
|
2017-02-26 00:46:44 +08:00
|
|
|
|
""
|
2019-06-02 11:59:43 +08:00
|
|
|
|
" @section buffer_index_type, options-buffer_index_type
|
|
|
|
|
" @parentsection options
|
|
|
|
|
" Set SpaceVim buffer index type, default is 4.
|
|
|
|
|
" >
|
|
|
|
|
" # types:
|
|
|
|
|
" # 0: 1 ➛ ➊
|
|
|
|
|
" # 1: 1 ➛ ➀
|
|
|
|
|
" # 2: 1 ➛ ⓵
|
|
|
|
|
" # 3: 1 ➛ ¹
|
|
|
|
|
" # 4: 1 ➛ 1
|
|
|
|
|
" buffer_index_type = 1
|
|
|
|
|
" <
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
""
|
|
|
|
|
" Set SpaceVim buffer index type, default is 4.
|
2017-02-26 00:46:44 +08:00
|
|
|
|
" >
|
|
|
|
|
" " types:
|
2018-12-19 23:59:41 +08:00
|
|
|
|
" " 0: 1 ➛ ➊
|
2017-02-26 00:46:44 +08:00
|
|
|
|
" " 1: 1 ➛ ➀
|
|
|
|
|
" " 2: 1 ➛ ⓵
|
2017-02-26 01:24:03 +08:00
|
|
|
|
" " 3: 1 ➛ ¹
|
|
|
|
|
" " 4: 1 ➛ 1
|
2017-02-26 00:46:44 +08:00
|
|
|
|
" let g:spacevim_buffer_index_type = 1
|
|
|
|
|
" <
|
2019-06-02 11:59:43 +08:00
|
|
|
|
let g:spacevim_buffer_index_type = 4
|
|
|
|
|
|
|
|
|
|
""
|
|
|
|
|
" @section windows_index_type, options-windows_index_type
|
|
|
|
|
" @parentsection options
|
|
|
|
|
" Set SpaceVim windows index type, default is 3.
|
|
|
|
|
" >
|
|
|
|
|
" # types:
|
|
|
|
|
" # 0: 1 ➛ ➊
|
|
|
|
|
" # 1: 1 ➛ ➀
|
|
|
|
|
" # 2: 1 ➛ ⓵
|
|
|
|
|
" # 3: 1 ➛ 1
|
|
|
|
|
" windows_index_type = 1
|
|
|
|
|
" <
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-01-02 10:38:23 +08:00
|
|
|
|
""
|
2019-06-02 11:59:43 +08:00
|
|
|
|
" Set SpaceVim windows index type, default is 3.
|
2017-06-01 00:18:32 +08:00
|
|
|
|
" >
|
|
|
|
|
" " types:
|
2018-12-19 23:59:41 +08:00
|
|
|
|
" " 0: 1 ➛ ➊
|
2017-06-01 00:18:32 +08:00
|
|
|
|
" " 1: 1 ➛ ➀
|
|
|
|
|
" " 2: 1 ➛ ⓵
|
2017-09-20 21:24:57 +08:00
|
|
|
|
" " 3: 1 ➛ 1
|
2017-06-01 00:18:32 +08:00
|
|
|
|
" let g:spacevim_windows_index_type = 1
|
|
|
|
|
" <
|
2019-06-02 11:59:43 +08:00
|
|
|
|
let g:spacevim_windows_index_type = 3
|
|
|
|
|
""
|
|
|
|
|
" @section enable_tabline_ft_icon, options-enable_tabline_ft_icon
|
|
|
|
|
" @parentsection options
|
|
|
|
|
" Enable/Disable tabline filetype icon. default is false. To enable this
|
|
|
|
|
" feature:
|
|
|
|
|
" >
|
|
|
|
|
" enable_tabline_ft_icon = true
|
|
|
|
|
" <
|
|
|
|
|
|
|
|
|
|
|
2017-06-01 00:18:32 +08:00
|
|
|
|
""
|
2017-02-26 12:46:31 +08:00
|
|
|
|
" Enable/Disable tabline filetype icon. default is 0.
|
2019-06-02 11:59:43 +08:00
|
|
|
|
let g:spacevim_enable_tabline_ft_icon = 0
|
2017-02-26 12:46:31 +08:00
|
|
|
|
""
|
2017-03-01 21:14:03 +08:00
|
|
|
|
" Enable/Disable os fileformat icon. default is 0.
|
|
|
|
|
let g:spacevim_enable_os_fileformat_icon = 0
|
|
|
|
|
""
|
2017-06-01 20:59:59 +08:00
|
|
|
|
" Set the github username, It will be used for getting your starred repos, and
|
|
|
|
|
" fuzzy find the repo you want.
|
|
|
|
|
let g:spacevim_github_username = ''
|
2019-10-03 22:00:09 +08:00
|
|
|
|
""
|
|
|
|
|
" @section windows_smartclose, options-windows_smartclose
|
|
|
|
|
" @parentsection options
|
|
|
|
|
" Set the default key for smart close windows, default is `q`.
|
|
|
|
|
" to disable this feature, just set it to empty string:
|
|
|
|
|
" >
|
|
|
|
|
" windows_smartclose = ""
|
|
|
|
|
" <
|
|
|
|
|
|
2017-06-01 20:59:59 +08:00
|
|
|
|
""
|
2018-01-14 23:48:44 +08:00
|
|
|
|
" Set the default key for smart close windows, default is `q`.
|
|
|
|
|
let g:spacevim_windows_smartclose = 'q'
|
2022-10-10 02:08:14 +08:00
|
|
|
|
""
|
|
|
|
|
" @section disabled_plugins, options-disabled_plugins
|
|
|
|
|
" @parentsection options
|
|
|
|
|
" >
|
|
|
|
|
" disabled_plugins = ['vim-foo', 'vim-bar']
|
|
|
|
|
" <
|
|
|
|
|
|
2018-01-14 23:48:44 +08:00
|
|
|
|
""
|
2017-02-17 13:56:55 +08:00
|
|
|
|
" Disable plugins by name.
|
|
|
|
|
" >
|
2017-01-05 21:16:45 +08:00
|
|
|
|
" let g:spacevim_disabled_plugins = ['vim-foo', 'vim-bar']
|
|
|
|
|
" <
|
|
|
|
|
let g:spacevim_disabled_plugins = []
|
2020-05-06 20:59:34 +08:00
|
|
|
|
""
|
|
|
|
|
" @section custom_plugins, usage-custom_plugins
|
|
|
|
|
" @parentsection usage
|
2021-10-28 13:46:17 +08:00
|
|
|
|
" If you want to add custom plugin, use `custom_plugins` section. For example:
|
|
|
|
|
" if you want to add https://github.com/vimwiki/vimwiki, add following code
|
|
|
|
|
" into your configuration file.
|
2020-05-06 20:59:34 +08:00
|
|
|
|
" >
|
|
|
|
|
" [[custom_plugins]]
|
2020-07-19 10:47:58 +08:00
|
|
|
|
" repo = 'vimwiki/vimwiki'
|
2020-05-06 20:59:34 +08:00
|
|
|
|
" merged = false
|
|
|
|
|
" <
|
2021-10-28 13:46:17 +08:00
|
|
|
|
" Use one custom_plugins for each plugin, example:
|
|
|
|
|
" >
|
|
|
|
|
" [[custom_plugins]]
|
|
|
|
|
" repo = 'vimwiki/vimwiki'
|
|
|
|
|
" merged = false
|
|
|
|
|
" [[custom_plugins]]
|
|
|
|
|
" repo = 'wsdjeg/vim-j'
|
|
|
|
|
" merged = false
|
|
|
|
|
" <
|
2020-05-06 20:59:34 +08:00
|
|
|
|
|
2017-01-05 21:16:45 +08:00
|
|
|
|
""
|
2017-02-17 13:56:55 +08:00
|
|
|
|
" Add custom plugins.
|
2017-01-09 22:50:06 +08:00
|
|
|
|
" >
|
|
|
|
|
" let g:spacevim_custom_plugins = [
|
|
|
|
|
" \ ['plasticboy/vim-markdown', 'on_ft' : 'markdown'],
|
|
|
|
|
" \ ['wsdjeg/GitHub.vim'],
|
|
|
|
|
" \ ]
|
|
|
|
|
" <
|
|
|
|
|
let g:spacevim_custom_plugins = []
|
|
|
|
|
""
|
2018-01-17 21:34:44 +08:00
|
|
|
|
" change the default filetype icon for a specific filtype.
|
|
|
|
|
" >
|
|
|
|
|
" let g:spacevim_filetype_icons['md'] = ''
|
|
|
|
|
" <
|
|
|
|
|
let g:spacevim_filetype_icons = {}
|
|
|
|
|
""
|
2017-02-17 13:56:55 +08:00
|
|
|
|
" SpaceVim will load the global config after local config if set to 1. Default
|
2018-12-19 23:59:41 +08:00
|
|
|
|
" is 0. If you have a local config, the global config will not be loaded.
|
2017-01-10 00:27:52 +08:00
|
|
|
|
" >
|
|
|
|
|
" let g:spacevim_force_global_config = 1
|
|
|
|
|
" <
|
|
|
|
|
let g:spacevim_force_global_config = 0
|
|
|
|
|
""
|
2017-02-17 13:56:55 +08:00
|
|
|
|
" Enable/Disable powerline symbols. Default is 1.
|
2017-01-02 10:38:23 +08:00
|
|
|
|
let g:spacevim_enable_powerline_fonts = 1
|
2017-01-07 23:01:13 +08:00
|
|
|
|
""
|
2017-02-17 13:56:55 +08:00
|
|
|
|
" Enable/Disable lint on save feature of SpaceVim's maker. Default is 1.
|
2017-01-07 23:01:13 +08:00
|
|
|
|
" >
|
|
|
|
|
" let g:spacevim_lint_on_save = 0
|
|
|
|
|
" <
|
2022-05-22 17:10:34 +08:00
|
|
|
|
" NOTE: the `lint_on_save` option has been deprecated. Please use layer option
|
|
|
|
|
" of @section(layers-checkers) layer.
|
2017-01-07 23:01:13 +08:00
|
|
|
|
let g:spacevim_lint_on_save = 1
|
2020-08-21 22:36:25 +08:00
|
|
|
|
""
|
|
|
|
|
" @section search_tools, options-search_tools
|
|
|
|
|
" @parentsection options
|
|
|
|
|
" Default search tools supported by flygrep. The default order is ['rg', 'ag',
|
|
|
|
|
" 'pt', 'ack', 'grep', 'findstr', 'git']
|
|
|
|
|
" The `git` command means using `git-grep`. If you prefer to use `git-grep` by
|
|
|
|
|
" default. You can change this option to:
|
|
|
|
|
" >
|
|
|
|
|
" [options]
|
|
|
|
|
" search_tools = ['git', 'rg', 'ag']
|
|
|
|
|
" <
|
|
|
|
|
|
2018-12-15 14:16:11 +08:00
|
|
|
|
""
|
|
|
|
|
" Default search tools supported by flygrep. The default order is ['rg', 'ag',
|
2020-08-21 22:36:25 +08:00
|
|
|
|
" 'pt', 'ack', 'grep', 'findstr', 'git']
|
|
|
|
|
let g:spacevim_search_tools = ['rg', 'ag', 'pt', 'ack', 'grep', 'findstr', 'git']
|
2017-02-04 00:47:16 +08:00
|
|
|
|
""
|
2020-09-27 22:49:44 +08:00
|
|
|
|
" @section project_rooter_patterns, options-project_rooter_patterns
|
|
|
|
|
" @parentsection options
|
|
|
|
|
" Set the project root patterns, SpaceVim determines the root directory of the
|
|
|
|
|
" project based on this option. By default it is:
|
|
|
|
|
" >
|
|
|
|
|
" ['.git/', '_darcs/', '.hg/', '.bzr/', '.svn/']
|
|
|
|
|
" <
|
|
|
|
|
|
|
|
|
|
""
|
|
|
|
|
" Set the project root patterns, SpaceVim determines the root directory of the
|
|
|
|
|
" project based on this option. By default it is:
|
|
|
|
|
" >
|
|
|
|
|
" ['.git/', '_darcs/', '.hg/', '.bzr/', '.svn/']
|
|
|
|
|
" <
|
2018-01-14 23:08:56 +08:00
|
|
|
|
let g:spacevim_project_rooter_patterns = ['.git/', '_darcs/', '.hg/', '.bzr/', '.svn/']
|
2022-04-16 20:41:01 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
""
|
|
|
|
|
" @section project_non_root, options-project_non_root
|
|
|
|
|
" @parentsection options
|
|
|
|
|
" This option set the default behavior for non-project files.
|
|
|
|
|
" - `current`: change to file's dir, like `autochdir`
|
|
|
|
|
" - `''`: do not change directory
|
|
|
|
|
" - `home`: change to home directory
|
|
|
|
|
|
|
|
|
|
let g:spacevim_project_non_root = ''
|
|
|
|
|
|
|
|
|
|
|
2020-09-27 22:49:44 +08:00
|
|
|
|
""
|
2020-10-08 12:05:34 +08:00
|
|
|
|
" @section enable_projects_cache, options-enable_projects_cache
|
|
|
|
|
" @parentsection options
|
|
|
|
|
" Enable/Disable cross session projects cache. Enabled by default.
|
|
|
|
|
|
|
|
|
|
""
|
|
|
|
|
" Enable/Disable cross session projects cache. Enabled by default.
|
|
|
|
|
let g:spacevim_enable_projects_cache = 1
|
|
|
|
|
""
|
|
|
|
|
" @section projects_cache_num, options-projects_cache_num
|
|
|
|
|
" @parentsection options
|
|
|
|
|
" Setting the numbers of cached projects, by default it is 20.
|
|
|
|
|
|
|
|
|
|
""
|
|
|
|
|
" Setting the numbers of cached projects, by default it is 20.
|
|
|
|
|
let g:spacevim_projects_cache_num = 20
|
|
|
|
|
""
|
2021-09-25 21:00:22 +08:00
|
|
|
|
" @section project_auto_root, options-project_auto_root
|
2020-09-27 22:49:44 +08:00
|
|
|
|
" @parentsection options
|
|
|
|
|
" Enable/Disable project root detection. By default, SpaceVim will change the
|
|
|
|
|
" directory to the project root directory based on `project_rooter_patterns`
|
|
|
|
|
" option. To disable this feature:
|
|
|
|
|
" >
|
|
|
|
|
" [options]
|
2021-09-25 21:00:22 +08:00
|
|
|
|
" project_auto_root = false
|
2020-09-27 22:49:44 +08:00
|
|
|
|
" <
|
2021-09-25 21:00:22 +08:00
|
|
|
|
" NOTE: *g:spacevim_project_rooter_automatically* and
|
|
|
|
|
" *SpaceVim-options-project_rooter_automatically* are deprecated.
|
2020-09-27 22:49:44 +08:00
|
|
|
|
|
2018-01-14 23:08:56 +08:00
|
|
|
|
""
|
|
|
|
|
" Enable/Disable changing directory automatically. Enabled by default.
|
2021-09-25 21:00:22 +08:00
|
|
|
|
let g:spacevim_project_auto_root = 1
|
2020-07-05 22:09:46 +08:00
|
|
|
|
""
|
2020-09-27 22:49:44 +08:00
|
|
|
|
" @section project_rooter_outermost, options-project_rooter_outermost
|
|
|
|
|
" @parentsection options
|
2020-07-05 22:09:46 +08:00
|
|
|
|
" Enable/Disable finding outermost directory for project root detection.
|
2020-09-27 22:49:44 +08:00
|
|
|
|
" By default SpaceVim will find the outermost directory based on
|
|
|
|
|
" `project_rooter_patterns`. To find nearest directory, you need to disable
|
|
|
|
|
" this option:
|
|
|
|
|
" >
|
|
|
|
|
" [options]
|
|
|
|
|
" project_rooter_outermost = false
|
|
|
|
|
" <
|
|
|
|
|
|
|
|
|
|
""
|
|
|
|
|
" Enable/Disable finding outermost directory for project root detection.
|
|
|
|
|
" By default SpaceVim will find the outermost directory based on
|
|
|
|
|
" `project_rooter_patterns`. To find nearest directory, you need to disable
|
|
|
|
|
" this option:
|
|
|
|
|
" >
|
|
|
|
|
" let g:spacevim_project_rooter_outermost = 0
|
|
|
|
|
" <
|
2020-07-05 22:09:46 +08:00
|
|
|
|
let g:spacevim_project_rooter_outermost = 1
|
2022-04-06 23:48:01 +08:00
|
|
|
|
""
|
|
|
|
|
" @section commandline_prompt, options-commandline_prompt
|
|
|
|
|
" @parentsection options
|
|
|
|
|
" Config the command line prompt for flygrep and denite etc.
|
|
|
|
|
" Default is `>`, for example:
|
|
|
|
|
" >
|
|
|
|
|
" commandline_prompt = '➭'
|
|
|
|
|
" <
|
2018-06-10 23:30:02 +08:00
|
|
|
|
|
2018-12-22 22:18:19 +08:00
|
|
|
|
""
|
|
|
|
|
" Config the command line prompt for flygrep and denite etc.
|
2022-04-06 23:48:01 +08:00
|
|
|
|
let g:spacevim_commandline_prompt = '>'
|
2018-12-22 22:18:19 +08:00
|
|
|
|
|
2022-04-05 20:17:35 +08:00
|
|
|
|
""
|
|
|
|
|
" @section todo_labels, options-todo_labels
|
|
|
|
|
" @parentsection options
|
|
|
|
|
" Option for setting todo labels in current project.
|
|
|
|
|
|
2020-02-19 18:47:38 +08:00
|
|
|
|
""
|
|
|
|
|
" Option for setting todo labels in current project.
|
2022-04-10 21:37:27 +08:00
|
|
|
|
let g:spacevim_todo_labels = ['fixme', 'question', 'todo', 'idea']
|
|
|
|
|
|
|
|
|
|
""
|
|
|
|
|
" @section todo_prefix, options-todo_prefix
|
|
|
|
|
" @parentsection options
|
|
|
|
|
" Option for setting todo prefix in current project.
|
|
|
|
|
" The default is `@`
|
|
|
|
|
|
|
|
|
|
let g:spacevim_todo_prefix = '@'
|
2020-02-19 18:47:38 +08:00
|
|
|
|
|
2018-06-10 23:30:02 +08:00
|
|
|
|
""
|
|
|
|
|
" @section lint_on_the_fly, options-lint_on_the_fly
|
|
|
|
|
" @parentsection options
|
|
|
|
|
" Enable/Disable lint on the fly feature of SpaceVim's maker. Default is true.
|
|
|
|
|
" >
|
|
|
|
|
" lint_on_the_fly = false
|
|
|
|
|
" <
|
2022-05-22 17:10:34 +08:00
|
|
|
|
" NOTE: the `lint_on_the_fly` option has been deprecated. Please use layer option
|
|
|
|
|
" of @section(layers-checkers) layer.
|
2018-06-10 23:30:02 +08:00
|
|
|
|
|
2018-01-14 23:08:56 +08:00
|
|
|
|
""
|
2017-04-08 23:54:44 +08:00
|
|
|
|
" Enable/Disable lint on the fly feature of SpaceVim's maker. Default is 0.
|
|
|
|
|
" >
|
|
|
|
|
" let g:spacevim_lint_on_the_fly = 0
|
|
|
|
|
" <
|
|
|
|
|
let g:spacevim_lint_on_the_fly = 0
|
2019-05-06 10:34:02 +08:00
|
|
|
|
|
|
|
|
|
""
|
|
|
|
|
" @section retry_cnt, options-retry_cnt
|
|
|
|
|
" @parentsection options
|
|
|
|
|
" Set the number of retries for SpaceVim Update when failed. Default is 3.
|
|
|
|
|
" Set to 0 to disable this feature, or you can set to another number.
|
|
|
|
|
" >
|
|
|
|
|
" update_retry_cnt = 3
|
|
|
|
|
" <
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
""
|
|
|
|
|
" Set the number of retries for SpaceVim Update when failed. Default is 3.
|
|
|
|
|
" Set to 0 to disable this feature, or you can set to another number.
|
|
|
|
|
" >
|
|
|
|
|
" let g:spacevim_update_retry_cnt = 3
|
|
|
|
|
" <
|
|
|
|
|
let g:spacevim_update_retry_cnt = 3
|
2019-06-08 21:14:13 +08:00
|
|
|
|
""
|
|
|
|
|
" @section enable_vimfiler_welcome, options-enable_vimfiler_welcome
|
|
|
|
|
" @parentsection options
|
|
|
|
|
" Enable/Disable vimfiler in the welcome windows. Default is true.
|
|
|
|
|
" This will cause vim to start up slowly if there are too many files in the
|
|
|
|
|
" current directory.
|
|
|
|
|
" >
|
|
|
|
|
" enable_vimfiler_welcome = false
|
|
|
|
|
" <
|
2019-05-06 10:34:02 +08:00
|
|
|
|
|
2017-04-08 23:54:44 +08:00
|
|
|
|
""
|
2018-12-19 23:59:41 +08:00
|
|
|
|
" Enable/Disable vimfiler in the welcome windows. Default is 1.
|
2017-02-17 13:56:55 +08:00
|
|
|
|
" This will cause vim to start up slowly if there are too many files in the
|
2018-12-19 23:59:41 +08:00
|
|
|
|
" current directory.
|
2017-02-04 00:47:16 +08:00
|
|
|
|
" >
|
|
|
|
|
" let g:spacevim_enable_vimfiler_welcome = 0
|
|
|
|
|
" <
|
|
|
|
|
let g:spacevim_enable_vimfiler_welcome = 1
|
2017-04-03 19:32:19 +08:00
|
|
|
|
""
|
2019-10-01 11:34:24 +08:00
|
|
|
|
" @section autocomplete_parens, options-autocomplete_parens
|
|
|
|
|
" @parentsection options
|
|
|
|
|
" Enable/Disable autocompletion of parentheses, default is true (enabled).
|
|
|
|
|
" >
|
|
|
|
|
" autocomplete_parens = false
|
|
|
|
|
" <
|
|
|
|
|
|
|
|
|
|
""
|
|
|
|
|
" Enable/Disable autocompletion of parentheses, default is 1 (enabled).
|
|
|
|
|
let g:spacevim_autocomplete_parens = 1
|
2017-01-02 10:38:23 +08:00
|
|
|
|
let g:spacevim_smartcloseignorewin = ['__Tagbar__' , 'vimfiler:default']
|
2017-12-13 22:28:26 +08:00
|
|
|
|
let g:spacevim_smartcloseignoreft = [
|
|
|
|
|
\ 'tagbar',
|
|
|
|
|
\ 'vimfiler',
|
2019-03-10 20:49:12 +08:00
|
|
|
|
\ 'defx',
|
2022-05-19 09:03:59 +08:00
|
|
|
|
\ 'NvimTree',
|
2017-12-13 22:28:26 +08:00
|
|
|
|
\ 'SpaceVimRunner',
|
|
|
|
|
\ 'SpaceVimREPL',
|
|
|
|
|
\ 'SpaceVimQuickFix',
|
|
|
|
|
\ 'HelpDescribe',
|
|
|
|
|
\ 'VebuggerShell',
|
|
|
|
|
\ 'VebuggerTerminal',
|
2018-07-02 14:08:47 +08:00
|
|
|
|
\ 'SpaceVimTabsManager'
|
2017-12-13 22:28:26 +08:00
|
|
|
|
\ ]
|
2018-07-28 15:25:12 +08:00
|
|
|
|
let g:_spacevim_altmoveignoreft = ['Tagbar' , 'vimfiler']
|
2017-01-02 10:38:23 +08:00
|
|
|
|
let g:spacevim_enable_javacomplete2_py = 0
|
|
|
|
|
let g:spacevim_src_root = 'E:\sources\'
|
|
|
|
|
""
|
2017-02-17 13:56:55 +08:00
|
|
|
|
" The host file url. This option is for Chinese users who can not use
|
|
|
|
|
" Google and Twitter.
|
2017-03-07 22:11:41 +08:00
|
|
|
|
let g:spacevim_hosts_url
|
|
|
|
|
\ = 'https://raw.githubusercontent.com/racaljk/hosts/master/hosts'
|
2022-04-06 00:38:39 +08:00
|
|
|
|
""
|
|
|
|
|
" @section wildignore, options-wildignore
|
|
|
|
|
" @parentsection options
|
|
|
|
|
" A list of file patterns when file match it will be ignored.
|
|
|
|
|
" >
|
|
|
|
|
" wildignore = '*/tmp/*,*.so,*.swp,*.zip,*.class,tags,*.jpg,*.ttf,*.TTF,*.png,*/target/*,.git,.svn,.hg,.DS_Store,*.svg'
|
|
|
|
|
" <
|
|
|
|
|
|
2017-03-07 22:11:41 +08:00
|
|
|
|
let g:spacevim_wildignore
|
2022-04-06 00:38:39 +08:00
|
|
|
|
\ = '*/tmp/*,*.so,*.swp,*.zip,*.class,tags,*.jpg,*.ttf,*.TTF,*.png,*/target/*,.git,.svn,.hg,.DS_Store,*.svg'
|
2018-02-22 21:15:46 +08:00
|
|
|
|
|
|
|
|
|
" }}}
|
|
|
|
|
|
|
|
|
|
|
2018-08-01 06:44:34 +08:00
|
|
|
|
" Private SpaceVim options
|
2017-03-14 00:57:16 +08:00
|
|
|
|
let g:_spacevim_mappings = {}
|
2017-05-14 22:14:38 +08:00
|
|
|
|
let g:_spacevim_mappings_space_custom = []
|
2017-12-01 20:16:24 +08:00
|
|
|
|
let g:_spacevim_mappings_space_custom_group_name = []
|
2022-10-24 22:24:51 +08:00
|
|
|
|
let g:_spacevim_mappings_leader_custom = []
|
|
|
|
|
let g:_spacevim_mappings_leader_custom_group_name = []
|
2020-12-20 19:36:17 +08:00
|
|
|
|
let g:_spacevim_mappings_language_specified_space_custom = {}
|
2021-11-04 14:37:30 +08:00
|
|
|
|
let g:_spacevim_mappings_lang_group_name = {}
|
2018-06-15 20:41:11 +08:00
|
|
|
|
let g:_spacevim_neobundle_installed = 0
|
|
|
|
|
let g:_spacevim_dein_installed = 0
|
|
|
|
|
let g:_spacevim_vim_plug_installed = 0
|
2017-03-14 00:57:16 +08:00
|
|
|
|
|
|
|
|
|
if !exists('g:leaderGuide_vertical')
|
2017-03-14 06:56:03 +08:00
|
|
|
|
let g:leaderGuide_vertical = 0
|
2017-03-14 00:57:16 +08:00
|
|
|
|
endif
|
|
|
|
|
|
2017-03-16 23:48:50 +08:00
|
|
|
|
let g:spacevim_leader_guide_vertical = 0
|
|
|
|
|
|
2017-03-14 00:57:16 +08:00
|
|
|
|
if !exists('g:leaderGuide_sort_horizontal')
|
2017-03-14 06:56:03 +08:00
|
|
|
|
let g:leaderGuide_sort_horizontal = 0
|
2017-03-14 00:57:16 +08:00
|
|
|
|
endif
|
|
|
|
|
|
2017-03-16 23:48:50 +08:00
|
|
|
|
let g:spacevim_leader_guide_sort_horizontal = 0
|
|
|
|
|
|
2017-03-14 00:57:16 +08:00
|
|
|
|
if !exists('g:leaderGuide_position')
|
2017-03-14 06:56:03 +08:00
|
|
|
|
let g:leaderGuide_position = 'botright'
|
2017-03-14 00:57:16 +08:00
|
|
|
|
endif
|
|
|
|
|
|
2017-03-16 23:48:50 +08:00
|
|
|
|
let g:spacevim_leader_guide_position = 'botright'
|
|
|
|
|
|
2017-03-14 00:57:16 +08:00
|
|
|
|
if !exists('g:leaderGuide_run_map_on_popup')
|
2017-03-14 06:56:03 +08:00
|
|
|
|
let g:leaderGuide_run_map_on_popup = 1
|
2017-03-14 00:57:16 +08:00
|
|
|
|
endif
|
|
|
|
|
|
2017-03-16 23:48:50 +08:00
|
|
|
|
let g:spacevim_leader_guide_run_map_on_popup = 1
|
|
|
|
|
|
2018-02-03 21:13:00 +08:00
|
|
|
|
if !exists('g:leaderGuide_hspace')
|
2017-03-14 06:56:03 +08:00
|
|
|
|
let g:leaderGuide_hspace = 5
|
2017-03-14 00:57:16 +08:00
|
|
|
|
endif
|
|
|
|
|
|
2017-03-16 23:48:50 +08:00
|
|
|
|
let g:spacevim_leader_guide_hspace = 5
|
|
|
|
|
|
2018-02-03 21:13:00 +08:00
|
|
|
|
if !exists('g:leaderGuide_flatten')
|
2017-03-14 06:56:03 +08:00
|
|
|
|
let g:leaderGuide_flatten = 1
|
2017-03-14 00:57:16 +08:00
|
|
|
|
endif
|
|
|
|
|
|
2017-03-16 23:48:50 +08:00
|
|
|
|
let g:spacevim_leader_guide_flatten = 1
|
|
|
|
|
|
2018-02-03 21:13:00 +08:00
|
|
|
|
if !exists('g:leaderGuide_default_group_name')
|
|
|
|
|
let g:leaderGuide_default_group_name = ''
|
2017-03-14 00:57:16 +08:00
|
|
|
|
endif
|
|
|
|
|
|
2018-02-03 21:13:00 +08:00
|
|
|
|
let g:spacevim_leader_guide_default_group_name = ''
|
2017-03-16 23:48:50 +08:00
|
|
|
|
|
2018-02-03 21:13:00 +08:00
|
|
|
|
if !exists('g:leaderGuide_max_size')
|
2017-03-14 06:56:03 +08:00
|
|
|
|
let g:leaderGuide_max_size = 0
|
2017-03-14 00:57:16 +08:00
|
|
|
|
endif
|
|
|
|
|
|
2017-03-16 23:48:50 +08:00
|
|
|
|
let g:spacevim_leader_guide_max_size = 0
|
|
|
|
|
|
2018-02-03 21:13:00 +08:00
|
|
|
|
if !exists('g:leaderGuide_submode_mappings')
|
2018-12-19 23:59:41 +08:00
|
|
|
|
let g:leaderGuide_submode_mappings =
|
2017-04-22 08:21:27 +08:00
|
|
|
|
\ { '<C-C>': 'win_close', 'n': 'page_down', 'p': 'page_up', 'u' : 'undo'}
|
2017-03-14 00:57:16 +08:00
|
|
|
|
endif
|
|
|
|
|
|
2018-02-03 21:13:00 +08:00
|
|
|
|
let g:spacevim_leader_guide_submode_mappings = {'<C-C>': 'win_close'}
|
2017-03-14 00:57:16 +08:00
|
|
|
|
|
2017-11-19 22:35:28 +08:00
|
|
|
|
" SpaceVim/LanguageClient-neovim {{{
|
|
|
|
|
if !exists('g:LanguageClient_serverCommands')
|
|
|
|
|
let g:LanguageClient_serverCommands = {}
|
|
|
|
|
endif
|
|
|
|
|
" }}}
|
2017-03-14 00:57:16 +08:00
|
|
|
|
|
|
|
|
|
|
2022-04-11 22:03:48 +08:00
|
|
|
|
command! -nargs=1 LeaderGuide call SpaceVim#mapping#guide#start_by_prefix('0', <args>)
|
|
|
|
|
command! -range -nargs=1 LeaderGuideVisual call SpaceVim#mapping#guide#start_by_prefix('1', <args>)
|
2016-12-29 18:53:29 +08:00
|
|
|
|
|
2016-12-28 21:36:11 +08:00
|
|
|
|
function! SpaceVim#end() abort
|
2019-10-03 22:00:09 +08:00
|
|
|
|
if g:spacevim_vimcompatible
|
2018-04-12 20:47:22 +08:00
|
|
|
|
let g:spacevim_windows_leader = ''
|
2019-10-03 22:00:09 +08:00
|
|
|
|
let g:spacevim_windows_smartclose = ''
|
2018-04-12 20:47:22 +08:00
|
|
|
|
endif
|
2018-09-17 21:09:15 +08:00
|
|
|
|
|
|
|
|
|
if !g:spacevim_vimcompatible
|
|
|
|
|
cnoremap <C-f> <Right>
|
|
|
|
|
" Navigation in command line
|
|
|
|
|
cnoremap <C-a> <Home>
|
|
|
|
|
cnoremap <C-b> <Left>
|
2020-02-14 21:39:42 +08:00
|
|
|
|
" @bug_vim with <silent> command line can not be cleared
|
|
|
|
|
cnoremap <expr> <C-k> repeat('<Delete>', strchars(getcmdline()) - getcmdpos() + 1)
|
2020-06-30 22:25:15 +08:00
|
|
|
|
|
|
|
|
|
"Use escape_key_binding switch to normal mode
|
|
|
|
|
if !empty(g:spacevim_escape_key_binding)
|
|
|
|
|
exe printf('inoremap %s <esc>', g:spacevim_escape_key_binding)
|
|
|
|
|
endif
|
2018-09-17 21:09:15 +08:00
|
|
|
|
endif
|
2021-01-02 17:58:45 +08:00
|
|
|
|
|
2018-02-22 21:15:46 +08:00
|
|
|
|
call SpaceVim#server#connect()
|
|
|
|
|
|
2017-11-23 09:44:40 +08:00
|
|
|
|
if g:spacevim_enable_neocomplcache
|
|
|
|
|
let g:spacevim_autocomplete_method = 'neocomplcache'
|
|
|
|
|
endif
|
|
|
|
|
if g:spacevim_enable_ycm
|
|
|
|
|
if has('python') || has('python3')
|
|
|
|
|
let g:spacevim_autocomplete_method = 'ycm'
|
|
|
|
|
else
|
|
|
|
|
call SpaceVim#logger#warn('YCM need +python or +python3 support, force to using ' . g:spacevim_autocomplete_method)
|
|
|
|
|
endif
|
|
|
|
|
endif
|
2017-10-04 13:49:14 +08:00
|
|
|
|
if g:spacevim_keep_server_alive
|
|
|
|
|
call SpaceVim#server#export_server()
|
|
|
|
|
endif
|
2017-03-06 23:26:26 +08:00
|
|
|
|
if !empty(g:spacevim_windows_leader)
|
|
|
|
|
call SpaceVim#mapping#leader#defindWindowsLeader(g:spacevim_windows_leader)
|
|
|
|
|
endif
|
2018-01-05 01:36:27 +08:00
|
|
|
|
call SpaceVim#mapping#g#init()
|
|
|
|
|
call SpaceVim#mapping#z#init()
|
2017-05-07 23:33:03 +08:00
|
|
|
|
call SpaceVim#mapping#leader#defindKEYs()
|
|
|
|
|
call SpaceVim#mapping#space#init()
|
2017-04-04 10:35:38 +08:00
|
|
|
|
if !SpaceVim#mapping#guide#has_configuration()
|
|
|
|
|
let g:leaderGuide_map = {}
|
|
|
|
|
call SpaceVim#mapping#guide#register_prefix_descriptions('', 'g:leaderGuide_map')
|
|
|
|
|
endif
|
2018-03-03 21:52:08 +08:00
|
|
|
|
if g:spacevim_vim_help_language ==# 'cn'
|
2018-09-29 23:16:47 +08:00
|
|
|
|
let &helplang = 'cn'
|
2018-03-03 21:52:08 +08:00
|
|
|
|
elseif g:spacevim_vim_help_language ==# 'ja'
|
2018-09-29 23:16:47 +08:00
|
|
|
|
let &helplang = 'jp'
|
2017-03-06 23:26:26 +08:00
|
|
|
|
endif
|
|
|
|
|
" generate tags for SpaceVim
|
2019-02-03 00:07:31 +08:00
|
|
|
|
let help = fnamemodify(g:_spacevim_root_dir, ':p:h') . '/doc'
|
2018-02-22 21:15:46 +08:00
|
|
|
|
try
|
|
|
|
|
exe 'helptags ' . help
|
|
|
|
|
catch
|
|
|
|
|
call SpaceVim#logger#warn('Failed to generate helptags for SpaceVim')
|
|
|
|
|
endtry
|
2017-03-06 23:26:26 +08:00
|
|
|
|
" set language
|
|
|
|
|
if !empty(g:spacevim_language)
|
|
|
|
|
silent exec 'lan ' . g:spacevim_language
|
|
|
|
|
endif
|
2017-02-03 19:49:18 +08:00
|
|
|
|
|
2018-03-03 21:52:08 +08:00
|
|
|
|
if SpaceVim#layers#isLoaded('core#statusline')
|
2017-05-16 22:14:38 +08:00
|
|
|
|
call SpaceVim#layers#core#statusline#init()
|
|
|
|
|
endif
|
|
|
|
|
|
2018-04-01 21:13:49 +08:00
|
|
|
|
" tab options:
|
|
|
|
|
set smarttab
|
|
|
|
|
let &expandtab = g:spacevim_expand_tab
|
2021-06-21 22:49:20 +08:00
|
|
|
|
let &wrap = g:spacevim_wrap_line
|
2021-04-04 13:46:48 +08:00
|
|
|
|
|
2021-03-02 09:04:03 +08:00
|
|
|
|
if g:spacevim_default_indent > 0
|
|
|
|
|
let &tabstop = g:spacevim_default_indent
|
|
|
|
|
let &softtabstop = g:spacevim_default_indent
|
|
|
|
|
let &shiftwidth = g:spacevim_default_indent
|
|
|
|
|
endif
|
2017-12-15 21:12:35 +08:00
|
|
|
|
|
2019-06-09 13:04:26 +08:00
|
|
|
|
let g:unite_source_menu_menus =
|
|
|
|
|
\ get(g:,'unite_source_menu_menus',{})
|
|
|
|
|
let g:unite_source_menu_menus.CustomKeyMaps = {'description':
|
|
|
|
|
\ 'Custom mapped keyboard shortcuts [unite]<SPACE>'}
|
|
|
|
|
let g:unite_source_menu_menus.CustomKeyMaps.command_candidates =
|
|
|
|
|
\ get(g:unite_source_menu_menus.CustomKeyMaps,'command_candidates', [])
|
|
|
|
|
let g:unite_source_menu_menus.MyStarredrepos = {'description':
|
|
|
|
|
\ 'All github repos starred by me <leader>ls'}
|
|
|
|
|
let g:unite_source_menu_menus.MyStarredrepos.command_candidates =
|
|
|
|
|
\ get(g:unite_source_menu_menus.MyStarredrepos,'command_candidates', [])
|
|
|
|
|
let g:unite_source_menu_menus.MpvPlayer = {'description':
|
|
|
|
|
\ 'Musics list <leader>lm'}
|
|
|
|
|
let g:unite_source_menu_menus.MpvPlayer.command_candidates =
|
|
|
|
|
\ get(g:unite_source_menu_menus.MpvPlayer,'command_candidates', [])
|
2018-04-01 21:13:49 +08:00
|
|
|
|
|
2017-03-14 06:56:03 +08:00
|
|
|
|
if g:spacevim_realtime_leader_guide
|
|
|
|
|
nnoremap <silent><nowait> <leader> :<c-u>LeaderGuide get(g:, 'mapleader', '\')<CR>
|
|
|
|
|
vnoremap <silent> <leader> :<c-u>LeaderGuideVisual get(g:, 'mapleader', '\')<CR>
|
|
|
|
|
endif
|
|
|
|
|
let g:leaderGuide_max_size = 15
|
2017-03-06 23:26:26 +08:00
|
|
|
|
call SpaceVim#plugins#load()
|
2018-02-22 21:15:46 +08:00
|
|
|
|
|
2021-01-02 17:58:45 +08:00
|
|
|
|
exe 'set wildignore+=' . g:spacevim_wildignore
|
|
|
|
|
" shell
|
|
|
|
|
if has('filterpipe')
|
|
|
|
|
set noshelltemp
|
|
|
|
|
endif
|
|
|
|
|
if g:spacevim_enable_guicolors == 1
|
|
|
|
|
if !has('nvim') && has('patch-7.4.1770')
|
|
|
|
|
let &t_8f = "\<Esc>[38;2;%lu;%lu;%lum"
|
|
|
|
|
let &t_8b = "\<Esc>[48;2;%lu;%lu;%lum"
|
|
|
|
|
endif
|
|
|
|
|
if exists('+termguicolors')
|
|
|
|
|
set termguicolors
|
|
|
|
|
elseif exists('+guicolors')
|
|
|
|
|
set guicolors
|
|
|
|
|
endif
|
|
|
|
|
endif
|
2022-01-02 16:42:59 +08:00
|
|
|
|
|
|
|
|
|
call SpaceVim#autocmds#init()
|
|
|
|
|
|
2021-01-02 17:58:45 +08:00
|
|
|
|
if g:spacevim_colorscheme !=# '' "{{{
|
|
|
|
|
try
|
|
|
|
|
exec 'set background=' . g:spacevim_colorscheme_bg
|
|
|
|
|
exec 'colorscheme ' . g:spacevim_colorscheme
|
|
|
|
|
catch
|
|
|
|
|
exec 'colorscheme '. g:spacevim_colorscheme_default
|
|
|
|
|
endtry
|
|
|
|
|
else
|
|
|
|
|
exec 'colorscheme '. g:spacevim_colorscheme_default
|
|
|
|
|
endif
|
|
|
|
|
if g:spacevim_hiddenfileinfo == 1 && has('patch-7.4.1570')
|
|
|
|
|
set shortmess+=F
|
|
|
|
|
endif
|
2022-05-29 12:44:36 +08:00
|
|
|
|
if !empty(g:spacevim_guifont)
|
|
|
|
|
try
|
2021-01-02 17:58:45 +08:00
|
|
|
|
let &guifont = g:spacevim_guifont
|
2022-05-29 12:44:36 +08:00
|
|
|
|
catch
|
|
|
|
|
call SpaceVim#logger#error('failed to set guifont to: '
|
|
|
|
|
\ . g:spacevim_guifont)
|
|
|
|
|
call SpaceVim#logger#error(' exception: ' . v:exception)
|
|
|
|
|
call SpaceVim#logger#error(' throwpoint: ' . v:throwpoint)
|
|
|
|
|
endtry
|
2021-01-02 17:58:45 +08:00
|
|
|
|
endif
|
2018-02-22 21:15:46 +08:00
|
|
|
|
|
2021-04-04 13:46:48 +08:00
|
|
|
|
if !has('nvim-0.2.0') && !has('nvim')
|
|
|
|
|
" In old version of neovim, &guicursor do not support cursor shape
|
|
|
|
|
" setting.
|
|
|
|
|
let $NVIM_TUI_ENABLE_CURSOR_SHAPE = g:spacevim_terminal_cursor_shape
|
|
|
|
|
else
|
|
|
|
|
if g:spacevim_terminal_cursor_shape == 0
|
|
|
|
|
" prevent nvim from changing the cursor shape
|
|
|
|
|
set guicursor=
|
|
|
|
|
elseif g:spacevim_terminal_cursor_shape == 1
|
|
|
|
|
" enable non-blinking mode-sensitive cursor
|
|
|
|
|
set guicursor=n-v-c:block-blinkon0,i-ci-ve:ver25-blinkon0,r-cr:hor20,o:hor50
|
|
|
|
|
elseif g:spacevim_terminal_cursor_shape == 2
|
|
|
|
|
" enable blinking mode-sensitive cursor
|
|
|
|
|
set guicursor=n-v-c:block-blinkon10,i-ci-ve:ver25-blinkon10,r-cr:hor20,o:hor50
|
2021-01-02 17:58:45 +08:00
|
|
|
|
endif
|
2022-04-05 20:02:08 +08:00
|
|
|
|
set guicursor+=a:Cursor/lCursor
|
2021-01-02 17:58:45 +08:00
|
|
|
|
endif
|
2018-02-22 21:15:46 +08:00
|
|
|
|
filetype plugin indent on
|
|
|
|
|
syntax on
|
2016-12-29 18:53:29 +08:00
|
|
|
|
endfunction
|
|
|
|
|
|
|
|
|
|
|
2018-10-01 10:55:58 +08:00
|
|
|
|
" return [status, dir]
|
|
|
|
|
" status: 0 : no argv
|
|
|
|
|
" 1 : dir
|
2021-10-21 21:52:38 +08:00
|
|
|
|
" 2 : default arguments
|
2022-04-14 00:33:16 +08:00
|
|
|
|
"
|
|
|
|
|
" argc() return number of files
|
|
|
|
|
" argv() return a list of files/directories
|
2018-10-01 10:55:58 +08:00
|
|
|
|
function! s:parser_argv() abort
|
2022-04-20 22:16:18 +08:00
|
|
|
|
if exists('v:argv')
|
|
|
|
|
" if use embed nvim
|
|
|
|
|
" for exmaple: neovim-qt
|
2022-04-21 00:18:09 +08:00
|
|
|
|
" or only run vim/neovim without argvs
|
2022-04-20 22:20:25 +08:00
|
|
|
|
if index(v:argv, '--embed') !=# -1
|
2022-04-21 00:18:09 +08:00
|
|
|
|
\ || len(v:argv) == 1
|
2022-04-20 22:16:18 +08:00
|
|
|
|
return [0]
|
2022-09-25 17:50:08 +08:00
|
|
|
|
elseif index(v:argv, '-d') !=# -1
|
|
|
|
|
" this is diff mode
|
|
|
|
|
return [2]
|
|
|
|
|
elseif v:argv[-1] =~# '/$'
|
|
|
|
|
let f = fnamemodify(expand(v:argv[-1]), ':p')
|
2022-04-20 22:16:18 +08:00
|
|
|
|
if isdirectory(f)
|
|
|
|
|
return [1, f]
|
|
|
|
|
else
|
|
|
|
|
return [1, getcwd()]
|
|
|
|
|
endif
|
2022-09-25 17:50:08 +08:00
|
|
|
|
elseif v:argv[-1] ==# '.'
|
2018-10-01 10:55:58 +08:00
|
|
|
|
return [1, getcwd()]
|
2022-09-25 17:50:08 +08:00
|
|
|
|
elseif isdirectory(expand(v:argv[-1]))
|
2022-04-20 22:16:18 +08:00
|
|
|
|
return [1, fnamemodify(expand(v:argv[1]), ':p')]
|
|
|
|
|
else
|
|
|
|
|
return [2, get(v:, 'argv', ['failed to get v:argv'])]
|
2018-10-01 10:55:58 +08:00
|
|
|
|
endif
|
|
|
|
|
else
|
2022-04-20 22:16:18 +08:00
|
|
|
|
if !argc() && line2byte('$') == -1
|
|
|
|
|
return [0]
|
2022-04-25 10:38:14 +08:00
|
|
|
|
elseif argv()[0] =~# '/$'
|
|
|
|
|
let f = fnamemodify(expand(argv()[0]), ':p')
|
|
|
|
|
if isdirectory(f)
|
|
|
|
|
return [1, f]
|
|
|
|
|
else
|
|
|
|
|
return [1, getcwd()]
|
|
|
|
|
endif
|
|
|
|
|
elseif argv()[0] ==# '.'
|
|
|
|
|
return [1, getcwd()]
|
|
|
|
|
elseif isdirectory(expand(argv()[0]))
|
|
|
|
|
return [1, fnamemodify(expand(argv()[0]), ':p')]
|
|
|
|
|
else
|
|
|
|
|
return [2, string(argv())]
|
2022-04-20 22:16:18 +08:00
|
|
|
|
endif
|
2018-10-01 10:55:58 +08:00
|
|
|
|
endif
|
|
|
|
|
endfunction
|
|
|
|
|
|
2018-02-22 21:15:46 +08:00
|
|
|
|
function! SpaceVim#begin() abort
|
|
|
|
|
|
2021-01-02 17:58:45 +08:00
|
|
|
|
|
|
|
|
|
"Use English for anything in vim
|
|
|
|
|
try
|
|
|
|
|
if s:SYSTEM.isWindows
|
|
|
|
|
silent exec 'lan mes en_US.UTF-8'
|
|
|
|
|
elseif s:SYSTEM.isOSX
|
|
|
|
|
silent exec 'language en_US.UTF-8'
|
|
|
|
|
else
|
|
|
|
|
let s:uname = system('uname -s')
|
|
|
|
|
if s:uname ==# "Darwin\n"
|
|
|
|
|
" in mac-terminal
|
|
|
|
|
silent exec 'language en_US.UTF-8'
|
|
|
|
|
elseif s:uname ==# "SunOS\n"
|
|
|
|
|
" in Sun-OS terminal
|
|
|
|
|
silent exec 'lan en_US.UTF-8'
|
|
|
|
|
elseif s:uname ==# "FreeBSD\n"
|
|
|
|
|
" in FreeBSD terminal
|
|
|
|
|
silent exec 'lan en_US.UTF-8'
|
|
|
|
|
else
|
|
|
|
|
" in linux-terminal
|
|
|
|
|
silent exec 'lan en_US.UTF-8'
|
|
|
|
|
endif
|
|
|
|
|
endif
|
|
|
|
|
catch /^Vim\%((\a\+)\)\=:E197/
|
|
|
|
|
call SpaceVim#logger#error('Can not set language to en_US.utf8')
|
2021-11-16 01:07:20 +08:00
|
|
|
|
catch /^Vim\%((\a\+)\)\=:E319/
|
|
|
|
|
call SpaceVim#logger#error('Can not set language to en_US.utf8, language not implemented in this Vim build')
|
2021-01-02 17:58:45 +08:00
|
|
|
|
endtry
|
|
|
|
|
|
|
|
|
|
" try to set encoding to utf-8
|
|
|
|
|
if s:SYSTEM.isWindows
|
|
|
|
|
" Be nice and check for multi_byte even if the config requires
|
|
|
|
|
" multi_byte support most of the time
|
|
|
|
|
if has('multi_byte')
|
|
|
|
|
" Windows cmd.exe still uses cp850. If Windows ever moved to
|
|
|
|
|
" Powershell as the primary terminal, this would be utf-8
|
|
|
|
|
if exists('&termencoding') && !has('nvim')
|
|
|
|
|
set termencoding=cp850
|
|
|
|
|
endif
|
|
|
|
|
setglobal fileencoding=utf-8
|
|
|
|
|
" Windows has traditionally used cp1252, so it's probably wise to
|
|
|
|
|
" fallback into cp1252 instead of eg. iso-8859-15.
|
|
|
|
|
" Newer Windows files might contain utf-8 or utf-16 LE so we might
|
|
|
|
|
" want to try them first.
|
|
|
|
|
set fileencodings=ucs-bom,utf-8,gbk,utf-16le,cp1252,iso-8859-15,cp936
|
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
|
else
|
|
|
|
|
if exists('&termencoding') && !has('nvim')
|
|
|
|
|
set termencoding=utf-8
|
|
|
|
|
endif
|
|
|
|
|
set fileencoding=utf-8
|
|
|
|
|
set fileencodings=utf-8,ucs-bom,gb18030,gbk,gb2312,cp936
|
|
|
|
|
endif
|
2018-02-22 21:15:46 +08:00
|
|
|
|
|
|
|
|
|
" Before loading SpaceVim, We need to parser argvs.
|
|
|
|
|
let s:status = s:parser_argv()
|
|
|
|
|
" If do not start Vim with filename, Define autocmd for opening welcome page
|
2018-10-01 10:55:58 +08:00
|
|
|
|
if s:status[0] == 0
|
|
|
|
|
let g:_spacevim_enter_dir = fnamemodify(getcwd(), ':~')
|
|
|
|
|
call SpaceVim#logger#info('Startup with no argv, current dir is used: ' . g:_spacevim_enter_dir )
|
|
|
|
|
augroup SPwelcome
|
|
|
|
|
au!
|
|
|
|
|
autocmd VimEnter * call SpaceVim#welcome()
|
|
|
|
|
augroup END
|
|
|
|
|
elseif s:status[0] == 1
|
|
|
|
|
let g:_spacevim_enter_dir = fnamemodify(s:status[1], ':~')
|
|
|
|
|
call SpaceVim#logger#info('Startup with directory: ' . g:_spacevim_enter_dir )
|
2018-02-22 21:15:46 +08:00
|
|
|
|
augroup SPwelcome
|
|
|
|
|
au!
|
|
|
|
|
autocmd VimEnter * call SpaceVim#welcome()
|
|
|
|
|
augroup END
|
2018-10-01 10:55:58 +08:00
|
|
|
|
else
|
|
|
|
|
call SpaceVim#logger#info('Startup with argv: ' . string(s:status[1]) )
|
2018-02-22 21:15:46 +08:00
|
|
|
|
endif
|
2022-09-11 14:46:52 +08:00
|
|
|
|
if has('nvim-0.7')
|
|
|
|
|
lua require('spacevim.default').options()
|
|
|
|
|
else
|
|
|
|
|
call SpaceVim#default#options()
|
|
|
|
|
endif
|
2018-02-25 21:29:43 +08:00
|
|
|
|
call SpaceVim#default#layers()
|
2017-03-07 23:31:51 +08:00
|
|
|
|
call SpaceVim#commands#load()
|
2016-12-29 18:53:29 +08:00
|
|
|
|
endfunction
|
|
|
|
|
|
2017-01-07 10:50:28 +08:00
|
|
|
|
function! SpaceVim#welcome() abort
|
2018-09-06 21:19:59 +08:00
|
|
|
|
call SpaceVim#logger#info('try to open SpaceVim welcome page')
|
2017-12-27 23:32:32 +08:00
|
|
|
|
if get(g:, '_spacevim_session_loaded', 0) == 1
|
2018-09-06 21:19:59 +08:00
|
|
|
|
call SpaceVim#logger#info('start SpaceVim with session file, skip welcome page')
|
2017-12-27 23:32:32 +08:00
|
|
|
|
return
|
|
|
|
|
endif
|
2017-06-20 07:23:14 +08:00
|
|
|
|
exe 'cd' fnameescape(g:_spacevim_enter_dir)
|
2017-04-25 21:59:35 +08:00
|
|
|
|
if exists('g:_spacevim_checking_flag') && g:_spacevim_checking_flag
|
2017-04-25 21:54:20 +08:00
|
|
|
|
return
|
|
|
|
|
endif
|
2017-03-10 20:36:26 +08:00
|
|
|
|
if exists(':Startify') == 2
|
|
|
|
|
Startify
|
2017-05-12 20:06:20 +08:00
|
|
|
|
if isdirectory(bufname(1))
|
|
|
|
|
bwipeout! 1
|
|
|
|
|
endif
|
2017-03-10 20:36:26 +08:00
|
|
|
|
endif
|
2017-03-09 23:51:06 +08:00
|
|
|
|
if g:spacevim_enable_vimfiler_welcome
|
2017-04-08 13:45:45 +08:00
|
|
|
|
\ && get(g:, '_spacevim_checking_flag', 0) == 0
|
2018-12-19 23:59:41 +08:00
|
|
|
|
if exists(':VimFiler') == 2
|
2017-03-06 23:26:26 +08:00
|
|
|
|
VimFiler
|
2017-05-05 20:29:09 +08:00
|
|
|
|
wincmd p
|
2019-03-10 20:49:12 +08:00
|
|
|
|
elseif exists(':Defx') == 2
|
|
|
|
|
Defx
|
|
|
|
|
wincmd p
|
2020-06-21 08:00:52 +08:00
|
|
|
|
elseif exists(':NERDTree') == 2
|
|
|
|
|
NERDTree
|
|
|
|
|
wincmd p
|
2022-05-19 09:03:59 +08:00
|
|
|
|
elseif exists(':NvimTreeOpen') == 2
|
|
|
|
|
NvimTreeOpen
|
|
|
|
|
" the statusline of nvimtree is not udpated when open nvim tree in
|
|
|
|
|
" welcome function
|
|
|
|
|
doautocmd WinEnter
|
|
|
|
|
wincmd p
|
2017-02-02 00:55:16 +08:00
|
|
|
|
endif
|
2017-03-09 23:51:06 +08:00
|
|
|
|
endif
|
2017-01-07 10:50:28 +08:00
|
|
|
|
endfunction
|
2017-01-25 20:04:17 +08:00
|
|
|
|
|
2020-05-06 20:59:34 +08:00
|
|
|
|
""
|
|
|
|
|
" @section Usage, usage
|
2020-08-21 22:36:25 +08:00
|
|
|
|
" General guide for using SpaceVim. Including layer configuration, bootstrap
|
|
|
|
|
" function.
|
2020-05-06 20:59:34 +08:00
|
|
|
|
|
2022-02-02 15:51:40 +08:00
|
|
|
|
""
|
|
|
|
|
" @section undo-tree, usage-undotree
|
|
|
|
|
" @parentsection usage
|
|
|
|
|
" Undo tree visualizes the undo history and makes it easier to browse and
|
|
|
|
|
" switch between different undo branches.The default key binding is `F7`.
|
|
|
|
|
" If `+python` or `+python3` is enabled, `vim-mundo` will be used,
|
|
|
|
|
" otherwise `undotree` will be used.
|
|
|
|
|
"
|
|
|
|
|
" Key bindings within undo tree windows:
|
|
|
|
|
" >
|
|
|
|
|
" key bindings description
|
|
|
|
|
" `G` move bottom
|
|
|
|
|
" `J` move older write
|
|
|
|
|
" `K` move newer write
|
|
|
|
|
" `N` previous match
|
|
|
|
|
" `P` play to
|
|
|
|
|
" `<2-LeftMouse>` mouse click
|
|
|
|
|
" `/` search
|
|
|
|
|
" `<CR>` preview
|
|
|
|
|
" `d` diff
|
|
|
|
|
" `<down>` move older
|
|
|
|
|
" `<up>` move newer
|
|
|
|
|
" `i` toggle inline
|
|
|
|
|
" `j` move older
|
|
|
|
|
" `k` move newer
|
|
|
|
|
" `n` next match
|
|
|
|
|
" `o` preview
|
|
|
|
|
" `p` diff current buffer
|
|
|
|
|
" `q` quit
|
|
|
|
|
" `r` diff
|
|
|
|
|
" `gg` move top
|
|
|
|
|
" `?` toggle help
|
|
|
|
|
" <
|
|
|
|
|
|
2021-10-23 11:14:34 +08:00
|
|
|
|
""
|
|
|
|
|
" @section windows-and-tabs, usage-windows-and-tabs
|
|
|
|
|
" @parentsection usage
|
|
|
|
|
" @subsection Windows related key bindings
|
|
|
|
|
" 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:
|
|
|
|
|
" >
|
|
|
|
|
" [options]
|
|
|
|
|
" windows_leader = "s"
|
|
|
|
|
" <
|
|
|
|
|
" The following key bindings can be used to manager vim windows and tabs.
|
|
|
|
|
" >
|
|
|
|
|
" Key Bindings | Descriptions
|
|
|
|
|
" ------------ | --------------------------------------------------
|
|
|
|
|
" q | Smart buffer close
|
|
|
|
|
" WIN v | :split
|
|
|
|
|
" WIN V | Split with previous buffer
|
|
|
|
|
" WIN g | :vsplit
|
|
|
|
|
" WIN G | Vertically split with previous buffer
|
|
|
|
|
" WIN t | Open new tab (:tabnew)
|
|
|
|
|
" WIN o | Close other windows (:only)
|
|
|
|
|
" WIN x | Remove buffer, leave blank window
|
|
|
|
|
" WIN q | Remove current buffer
|
|
|
|
|
" WIN Q | Close current buffer (:close)
|
|
|
|
|
" Shift-Tab | Switch to alternate window (switch back and forth)
|
|
|
|
|
" <
|
2021-05-07 19:29:32 +08:00
|
|
|
|
|
2021-10-28 13:46:17 +08:00
|
|
|
|
""
|
|
|
|
|
" @section search-and-replace, usage-search-and-replace
|
|
|
|
|
" @parentsection usage
|
|
|
|
|
" This section document how to find and replace text in SpaceVim.
|
|
|
|
|
"
|
|
|
|
|
" @subsection Searching with an external tool
|
|
|
|
|
"
|
|
|
|
|
" SpaceVim can be interfaced with different searching tools like:
|
|
|
|
|
" 1. rg - ripgrep
|
|
|
|
|
" 2. ag - the silver searcher
|
|
|
|
|
" 3. pt - the platinum searcher
|
|
|
|
|
" 4. ack
|
|
|
|
|
" 5. grep
|
|
|
|
|
" The search commands in SpaceVim are organized under the `SPC s` prefix
|
|
|
|
|
" with the next key being the tool to use and the last key is the scope.
|
|
|
|
|
" For instance, `SPC s a b` will search in all opened buffers using `ag`.
|
|
|
|
|
"
|
|
|
|
|
" If 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 for the word under the 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 from the list `search_tools`, the default order is
|
|
|
|
|
" `['rg', 'ag', 'pt', 'ack', 'grep', 'findstr', 'git']`.
|
|
|
|
|
" 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:
|
|
|
|
|
" >
|
|
|
|
|
" Tool | Key
|
|
|
|
|
" ---------|-----
|
|
|
|
|
" ag | a
|
|
|
|
|
" grep | g
|
|
|
|
|
" git grep | G
|
|
|
|
|
" ack | k
|
|
|
|
|
" rg | r
|
|
|
|
|
" pt | t
|
|
|
|
|
" <
|
|
|
|
|
" The available scopes and corresponding keys are:
|
|
|
|
|
" >
|
|
|
|
|
" Scope | Key
|
|
|
|
|
" ---------------------------|-----
|
|
|
|
|
" opened buffers | b
|
|
|
|
|
" buffer directory | d
|
|
|
|
|
" files in a given directory | f
|
|
|
|
|
" current project | p
|
|
|
|
|
" <
|
2022-04-14 23:21:58 +08:00
|
|
|
|
" Instead of using flygrep to search text. SpaceVim also provides a general
|
|
|
|
|
" async searcher. The key binding is `SPC s j`, an input promote will be
|
|
|
|
|
" opened. After inserting text and press enter. searching results will be
|
|
|
|
|
" displayed in quickfix window.
|
2021-10-28 13:46:17 +08:00
|
|
|
|
|
2021-05-07 19:29:32 +08:00
|
|
|
|
""
|
|
|
|
|
" @section buffers-and-files, usage-buffers-and-files
|
|
|
|
|
" @parentsection usage
|
|
|
|
|
" @subsection Buffers manipulation key bindings
|
|
|
|
|
" All buffers key bindings are start with `b` prefix:
|
|
|
|
|
" >
|
|
|
|
|
" Key Bindings Descriptions
|
|
|
|
|
" SPC <Tab> switch to alternate buffer in the current window (switch back and forth)
|
|
|
|
|
" SPC b . buffer transient state
|
|
|
|
|
" SPC b b switch to a buffer (via denite/unite)
|
|
|
|
|
" SPC b d kill the current buffer (does not delete the visited file)
|
|
|
|
|
" SPC u SPC b d kill the current buffer and window (does not delete the visited file) (TODO)
|
|
|
|
|
" SPC b D kill a visible buffer using vim-choosewin
|
|
|
|
|
" <
|
|
|
|
|
|
2021-12-16 00:05:09 +08:00
|
|
|
|
|
|
|
|
|
""
|
|
|
|
|
" @section command-line-mode, usage-command-line-mode
|
|
|
|
|
" @parentsection usage
|
|
|
|
|
" After pressing `:`, you can switch to command line mode, here is a list
|
|
|
|
|
" of key bindings can be used in command line mode:
|
|
|
|
|
" >
|
|
|
|
|
" Key bindings Descriptions
|
|
|
|
|
" Ctrl-a move cursor to beginning
|
|
|
|
|
" Ctrl-b Move cursor backward in command line
|
|
|
|
|
" Ctrl-f Move cursor forward in command line
|
|
|
|
|
" Ctrl-w delete a whole word
|
|
|
|
|
" Ctrl-u remove all text before cursor
|
|
|
|
|
" Ctrl-k remove all text after cursor
|
|
|
|
|
" Ctrl-c/Esc cancel command line mode
|
|
|
|
|
" Tab next item in popup menu
|
|
|
|
|
" Shift-Tab previous item in popup menu
|
|
|
|
|
" <
|
|
|
|
|
|
2021-09-28 23:37:52 +08:00
|
|
|
|
""
|
|
|
|
|
" @section Development, dev
|
|
|
|
|
"
|
|
|
|
|
" SpaceVim is a joint effort of all contributors.
|
|
|
|
|
" We encourage you to participate in SpaceVim's development.
|
|
|
|
|
" We have some guidelines that we need all contributors to follow.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
""
|
|
|
|
|
" @section commit-style-guide, dev-commit-style-guide
|
|
|
|
|
" @parentsection dev
|
|
|
|
|
" A git commit message consists a three distinct parts separated by black line.
|
|
|
|
|
" >
|
|
|
|
|
" Type (scope): Subject
|
|
|
|
|
"
|
|
|
|
|
" body
|
|
|
|
|
"
|
|
|
|
|
" footer
|
|
|
|
|
" <
|
|
|
|
|
" types:
|
|
|
|
|
"
|
|
|
|
|
" - `feat`: a new feature
|
|
|
|
|
" - `fix`: a bug fix
|
|
|
|
|
" - `change`: no backward compatible changes
|
|
|
|
|
" - `docs`: changes to documentation
|
|
|
|
|
" - `style`: formatting, missing semi colons, etc; no code change
|
|
|
|
|
" - `refactor`: refactoring production code
|
|
|
|
|
" - `test`: adding tests, refactoring test; no production code change
|
|
|
|
|
" - `chore`: updating build tasks, package manager configs, etc; no production code change
|
|
|
|
|
"
|
|
|
|
|
" scopes:
|
|
|
|
|
"
|
|
|
|
|
" - `api`: files in `autoload/SpaceVim/api/` and `docs/api/` directory
|
|
|
|
|
" - `layer`: files in `autoload/SpaceVim/layers/` and `docs/layers/` directory
|
|
|
|
|
" - `plugin`: files in `autoload/SpaceVim/plugins/` directory
|
|
|
|
|
" - `bundle`: files in `bundle/` directory
|
|
|
|
|
" - `core`: other files in this repository
|
|
|
|
|
"
|
|
|
|
|
" subject:
|
|
|
|
|
"
|
|
|
|
|
" Subjects should be no greater than 50 characters,
|
|
|
|
|
" should begin with a capital letter and do not end with a period.
|
|
|
|
|
"
|
|
|
|
|
" Use an imperative tone to describe what a commit does,
|
|
|
|
|
" rather than what it did. For example, use change; not changed or changes.
|
|
|
|
|
"
|
|
|
|
|
" body:
|
|
|
|
|
"
|
|
|
|
|
" Not all commits are complex enough to warrant a body,
|
|
|
|
|
" therefore it is optional and only used when a commit requires a bit of explanation and context.
|
|
|
|
|
"
|
|
|
|
|
" footer:
|
|
|
|
|
"
|
|
|
|
|
" The footer is optional and is used to reference issue tracker IDs.
|
|
|
|
|
|
2022-04-12 14:45:23 +08:00
|
|
|
|
""
|
|
|
|
|
" @section alternate file, usage-alternate-file
|
|
|
|
|
" @parentsection usage
|
|
|
|
|
" SpaceVim provides a built-in alternate file manager, the command is `:A`.
|
|
|
|
|
"
|
|
|
|
|
" To use this feature, you can create a `.project_alt.json` file in the root
|
|
|
|
|
" of your project. for example:
|
|
|
|
|
" >
|
|
|
|
|
" {
|
|
|
|
|
" "autoload/SpaceVim/layers/lang/*.vim" :
|
|
|
|
|
" {
|
|
|
|
|
" "doc" : "docs/layers/lang/{}.md"
|
|
|
|
|
" },
|
|
|
|
|
" }
|
|
|
|
|
" <
|
|
|
|
|
" after adding this configuration, when edit the source file
|
|
|
|
|
" `autoload/SpaceVim/layers/lang/java.vim`,
|
|
|
|
|
" you can use `:A doc` switch to `docs/layers/lang/java.md`
|
2021-05-07 19:29:32 +08:00
|
|
|
|
|
2017-01-25 20:04:17 +08:00
|
|
|
|
""
|
|
|
|
|
" @section FAQ, faq
|
2020-05-06 20:59:34 +08:00
|
|
|
|
" This is a list of the frequently asked questions about SpaceVim.
|
|
|
|
|
"
|
|
|
|
|
" 1. How do I enable YouCompleteMe?
|
2017-01-25 20:44:05 +08:00
|
|
|
|
"
|
2020-05-06 20:59:34 +08:00
|
|
|
|
" Step 1: Add `enable_ycm = true` to custom_config. By default it should be
|
|
|
|
|
" `~/.SpaceVim.d/init.toml`.
|
2017-02-17 13:56:55 +08:00
|
|
|
|
"
|
|
|
|
|
" Step 2: Get into the directory of YouCompleteMe's author. By default it
|
|
|
|
|
" should be `~/.cache/vimfiles/repos/github.com/Valloric/`. If you find the
|
|
|
|
|
" directory `YouCompleteMe` in it, go into it. Otherwise clone
|
2017-01-25 20:44:05 +08:00
|
|
|
|
" YouCompleteMe repo by
|
2017-02-17 13:56:55 +08:00
|
|
|
|
" `git clone https://github.com/Valloric/YouCompleteMe.git`. After cloning,
|
|
|
|
|
" get into it and run `git submodule update --init --recursive`.
|
2017-01-25 20:44:05 +08:00
|
|
|
|
"
|
2017-02-17 13:56:55 +08:00
|
|
|
|
" Step 3: Compile YouCompleteMe with the features you want. If you just want
|
|
|
|
|
" C family support, run `./install.py --clang-completer`.
|
2020-05-06 20:59:34 +08:00
|
|
|
|
"
|
2017-02-08 20:27:27 +08:00
|
|
|
|
"
|
2017-02-17 13:56:55 +08:00
|
|
|
|
" 2. How to add custom snippet?
|
2020-05-06 20:59:34 +08:00
|
|
|
|
"
|
|
|
|
|
" SpaceVim uses neosnippet as the default snippet engine. This can be changed
|
|
|
|
|
" by @section(options-snippet_engine) option.
|
2017-02-17 13:56:55 +08:00
|
|
|
|
"
|
2020-05-06 20:59:34 +08:00
|
|
|
|
" If you want to add a snippet for a current filetype, run |:NeoSnippetEdit|
|
|
|
|
|
" command. A buffer will be opened and you can add your custom snippet.
|
|
|
|
|
" By default this buffer will be save in `~/.SpaceVim.d/snippets`.
|
|
|
|
|
"
|
|
|
|
|
" For more info about how to write snippet, please
|
|
|
|
|
" read |neosnippet-snippet-syntax|.
|
2018-12-19 23:59:41 +08:00
|
|
|
|
"
|
2017-02-08 21:01:16 +08:00
|
|
|
|
"
|
|
|
|
|
" 3. Where is `<c-f>` in cmdline-mode?
|
2020-05-06 20:59:34 +08:00
|
|
|
|
"
|
2017-02-17 13:56:55 +08:00
|
|
|
|
" `<c-f>` is the default value of |cedit| option, but in SpaceVim we use that
|
2020-05-06 20:59:34 +08:00
|
|
|
|
" binding as `<Right>`, so maybe you can change the `cedit` option or use
|
2017-02-17 13:56:55 +08:00
|
|
|
|
" `<leader>+<c-f>`.
|
2017-02-22 21:25:17 +08:00
|
|
|
|
"
|
2018-08-04 14:31:00 +08:00
|
|
|
|
" 4. How to use `<Space>` as `<Leader>`?
|
2020-05-06 20:59:34 +08:00
|
|
|
|
"
|
|
|
|
|
" Add `let g:mapleader = "\<Space>"` to bootstrap function.
|
|
|
|
|
"
|
|
|
|
|
" 5. Why does Vim freeze after pressing Ctrl-s?
|
|
|
|
|
"
|
|
|
|
|
" This is a feature of terminal emulators. You can use `Ctrl-q` to unfreeze Vim. To disable
|
|
|
|
|
" this feature you need the following in either `~/.bash_profile` or `~/.bashrc`:
|
|
|
|
|
">
|
|
|
|
|
" stty -ixon
|
|
|
|
|
"<
|
|
|
|
|
"
|
|
|
|
|
" 6. 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. But 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`.
|
|
|
|
|
"
|
|
|
|
|
" For example:
|
2017-02-22 21:25:17 +08:00
|
|
|
|
" >
|
2020-05-06 20:59:34 +08:00
|
|
|
|
" export PYTHON_HOST_PROG='/home/q/envs/neovim2/bin/python'
|
|
|
|
|
" export PYTHON3_HOST_PROG='/home/q/envs/neovim3/bin/python'
|
2017-02-22 21:25:17 +08:00
|
|
|
|
" <
|
2017-03-06 23:26:26 +08:00
|
|
|
|
|
2018-06-10 23:30:02 +08:00
|
|
|
|
""
|
|
|
|
|
" @section Changelog, changelog
|
2022-01-06 19:49:25 +08:00
|
|
|
|
" Following HEAD: changes in master branch since last release v1.9.0
|
2018-12-19 23:59:41 +08:00
|
|
|
|
"
|
2018-06-10 23:30:02 +08:00
|
|
|
|
" https://github.com/SpaceVim/SpaceVim/wiki/Following-HEAD
|
|
|
|
|
"
|
2022-01-06 19:49:25 +08:00
|
|
|
|
" 2021-06-16: v1.9.0
|
|
|
|
|
"
|
|
|
|
|
" https://spacevim.org/SpaceVim-release-v1.9.0/
|
|
|
|
|
"
|
|
|
|
|
" 2021-06-16: v1.8.0
|
|
|
|
|
"
|
|
|
|
|
" https://spacevim.org/SpaceVim-release-v1.8.0/
|
|
|
|
|
"
|
|
|
|
|
" 2021-06-16: v1.7.0
|
2021-09-19 22:06:14 +08:00
|
|
|
|
"
|
|
|
|
|
" https://spacevim.org/SpaceVim-release-v1.7.0/
|
|
|
|
|
"
|
|
|
|
|
" 2020-12-31: v1.6.0
|
|
|
|
|
"
|
|
|
|
|
" https://spacevim.org/SpaceVim-release-v1.6.0/
|
|
|
|
|
"
|
|
|
|
|
" 2020-08-01: v1.5.0
|
|
|
|
|
"
|
|
|
|
|
" https://spacevim.org/SpaceVim-release-v1.5.0/
|
|
|
|
|
"
|
2020-05-06 20:59:34 +08:00
|
|
|
|
" 2020-04-05: v1.4.0
|
|
|
|
|
"
|
|
|
|
|
" https://spacevim.org/SpaceVim-release-v1.4.0/
|
|
|
|
|
"
|
2019-12-02 23:18:11 +08:00
|
|
|
|
" 2019-11-04: v1.3.0
|
|
|
|
|
"
|
|
|
|
|
" https://spacevim.org/SpaceVim-release-v1.3.0/
|
|
|
|
|
"
|
|
|
|
|
" 2019-07-17: v1.2.0
|
|
|
|
|
"
|
|
|
|
|
" https://spacevim.org/SpaceVim-release-v1.2.0/
|
|
|
|
|
"
|
2019-06-09 10:42:59 +08:00
|
|
|
|
" 2019-04-08: v1.1.0
|
|
|
|
|
"
|
|
|
|
|
" https://spacevim.org/SpaceVim-release-v1.1.0/
|
|
|
|
|
"
|
|
|
|
|
" 2018-12-25: v1.0.0
|
|
|
|
|
"
|
|
|
|
|
" https://spacevim.org/SpaceVim-release-v1.0.0/
|
|
|
|
|
"
|
|
|
|
|
" 2018-09-26: v0.9.0
|
|
|
|
|
"
|
|
|
|
|
" https://spacevim.org/SpaceVim-release-v0.9.0/
|
|
|
|
|
"
|
|
|
|
|
" 2018-06-18: v0.8.0
|
|
|
|
|
"
|
|
|
|
|
" https://spacevim.org/SpaceVim-release-v0.8.0/
|
|
|
|
|
"
|
|
|
|
|
" 2018-03-18: v0.7.0
|
2018-06-10 23:30:02 +08:00
|
|
|
|
"
|
|
|
|
|
" https://spacevim.org/SpaceVim-release-v0.7.0/
|
2019-06-09 10:42:59 +08:00
|
|
|
|
"
|
|
|
|
|
" 2017-12-30: v0.6.0
|
|
|
|
|
"
|
|
|
|
|
" https://spacevim.org/SpaceVim-release-v0.6.0/
|
|
|
|
|
"
|
|
|
|
|
" 2017-11-06: v0.5.0
|
|
|
|
|
"
|
|
|
|
|
" https://spacevim.org/SpaceVim-release-v0.5.0/
|
|
|
|
|
"
|
|
|
|
|
" 2017-08-05: v0.4.0
|
|
|
|
|
"
|
|
|
|
|
" https://spacevim.org/SpaceVim-release-v0.4.0/
|
|
|
|
|
"
|
|
|
|
|
" 2017-06-27: v0.3.1
|
|
|
|
|
"
|
|
|
|
|
" https://spacevim.org/SpaceVim-release-v0.3.1/
|
|
|
|
|
"
|
|
|
|
|
" 2017-05-31: v0.3.0
|
|
|
|
|
"
|
|
|
|
|
" https://spacevim.org/SpaceVim-release-v0.3.0/
|
|
|
|
|
"
|
|
|
|
|
" 2017-03-30: v0.2.0
|
|
|
|
|
"
|
|
|
|
|
" https://spacevim.org/SpaceVim-release-v0.2.0/
|
|
|
|
|
"
|
|
|
|
|
" 2017-01-26: v0.1.0
|
|
|
|
|
"
|
|
|
|
|
" https://spacevim.org/SpaceVim-release-v0.1.0/
|
|
|
|
|
"
|
2017-03-06 23:26:26 +08:00
|
|
|
|
|
2017-03-07 22:11:41 +08:00
|
|
|
|
" vim:set et sw=2 cc=80:
|