mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-01-23 17:30:04 +08:00
Add SpaceVim.vim
This commit is contained in:
parent
d91315da8a
commit
0e037c561b
30
README.md
30
README.md
@ -33,6 +33,36 @@ Like spacemacs, but for vim.
|
|||||||
- [init.vim](./init.vim) - Sources `config/main.vim`
|
- [init.vim](./init.vim) - Sources `config/main.vim`
|
||||||
- [vimrc](./vimrc) - Sources `config/main.vim`
|
- [vimrc](./vimrc) - Sources `config/main.vim`
|
||||||
|
|
||||||
|
## Modular configuration
|
||||||
|
|
||||||
|
SpaceVim will load custom configuration from `./.local.vim`, here is an example:
|
||||||
|
```viml
|
||||||
|
" here are some basic customizations, please refer to the top of the vimrc file for all possible options
|
||||||
|
let g:settings.default_indent = 3
|
||||||
|
let g:settings.max_column = 80
|
||||||
|
let g:settings.colorscheme = 'my_awesome_colorscheme'
|
||||||
|
let g:settings.plugin_manager = 'dein' " neobundle or dein or vim-plug
|
||||||
|
|
||||||
|
" change the default directory where all miscellaneous persistent files go
|
||||||
|
let g:settings.cache_dir = "/some/place/else"
|
||||||
|
|
||||||
|
" by default, language specific plugins are not loaded. this can be changed with the following:
|
||||||
|
let g:settings.plugin_groups_exclude = ['ruby', 'python']
|
||||||
|
|
||||||
|
" if there are groups you want always loaded, you can use this:
|
||||||
|
let g:settings.plugin_groups_include = ['go']
|
||||||
|
|
||||||
|
" alternatively, you can set this variable to load exactly what you want
|
||||||
|
let g:settings.plugin_groups = ['core', 'web']
|
||||||
|
|
||||||
|
" if there is a particular plugin you don't like, you can define this variable to disable them entirely
|
||||||
|
let g:settings.disabled_plugins=['vim-foo', 'vim-bar']
|
||||||
|
|
||||||
|
" anything defined here are simply overrides
|
||||||
|
set wildignore+=\*/node_modules/\*
|
||||||
|
set guifont=Wingdings:h10
|
||||||
|
```
|
||||||
|
|
||||||
## Plugin Highlights
|
## Plugin Highlights
|
||||||
|
|
||||||
- Package management with caching enabled and lazy loading
|
- Package management with caching enabled and lazy loading
|
||||||
|
18
autoload/SpaceVim.vim
Normal file
18
autoload/SpaceVim.vim
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
function! SpaceVim#init() abort
|
||||||
|
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
function! SpaceVim#loadCustomConfig() abort
|
||||||
|
let custom_confs = globpath(getcwd(), '.local.vim', 1,1)
|
||||||
|
if !empty(custom_confs)
|
||||||
|
exe 'source ' . custom_confs[0]
|
||||||
|
endif
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
function! SpaceVim#Layer(layer, opt) abort
|
||||||
|
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
function! SpaceVim#end() abort
|
||||||
|
|
||||||
|
endfunction
|
@ -2,15 +2,18 @@ let g:Config_Main_Home = fnamemodify(expand('<sfile>'), ':p:h:gs?\\?'.((has('win
|
|||||||
try
|
try
|
||||||
call zvim#util#source_rc('functions.vim')
|
call zvim#util#source_rc('functions.vim')
|
||||||
catch
|
catch
|
||||||
execute "set rtp +=" . fnamemodify(g:Config_Main_Home, ':p:h:h')
|
execute 'set rtp +=' . fnamemodify(g:Config_Main_Home, ':p:h:h')
|
||||||
call zvim#util#source_rc('functions.vim')
|
call zvim#util#source_rc('functions.vim')
|
||||||
endtry
|
endtry
|
||||||
|
|
||||||
|
call SpaceVim#init()
|
||||||
|
|
||||||
call zvim#util#source_rc('init.vim')
|
call zvim#util#source_rc('init.vim')
|
||||||
|
|
||||||
scriptencoding utf-8
|
|
||||||
|
|
||||||
call zvim#util#source_rc('local.vim')
|
call SpaceVim#loadCustomConfig()
|
||||||
|
|
||||||
|
call SpaceVim#end()
|
||||||
|
|
||||||
call zvim#util#source_rc('plugins.vim')
|
call zvim#util#source_rc('plugins.vim')
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user