Skip to content

Commit e6ed666

Browse files
Use dein instead of vim-plug
1 parent ad92c42 commit e6ed666

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

77 files changed

+838
-427
lines changed

README.md

Lines changed: 21 additions & 87 deletions
Original file line numberDiff line numberDiff line change
@@ -85,38 +85,19 @@ If you have been a vimmer for quite a while, just pick out the part you are inte
8585

8686
### Prerequisites
8787

88-
The most recent Vim(NeoVim) version is recommended, for space-vim has been specifically optimized for Vim8 and NeoVim with respect to the startup time.
88+
The most recent Vim(NeoVim) version is recommended.
8989

90-
[chocolatey](https://chocolatey.org/) is an easy way to install software on Windows, tools like `fzf`, `rg`, `ag` are necessary to get you a full-featured space-vim.
90+
space-vim aspires to adhere to the zero-install philosophy, just clone and use. Optional dependencies not installed on the system are downloaded and built from source where possible, and are used embedded within the application.
9191

92-
:exclamation: ~~When layers enabled at the first time, you need to run `:PlugInstall` to install relevant plugins~~.
92+
> In order to make a project zero-install, you must be able to use it as soon as you clone it.
9393
94-
### Linux and macOS
94+
At present there is a lack of the above dependency build feature on Windows. [chocolatey](https://chocolatey.org/) is an easy way to install software on Windows, tools like `fzf`, `rg`, `ag`, `rustc`, `cargo`, `npm` are necessary to get you a full-featured space-vim.
9595

96-
`/path/to/space-vim` may be `~/.vim` (Vim), `~/.config/nvіm` (Neovim), or elsewhere. Installing space-vim to the conventional Vim/Neovim install location mitigates the need for an extra symlink to where space-vim is installed.
96+
### Install location
9797

98-
#### one-line installer
98+
Installing space-vim to the conventional Vim/Neovim install location mitigates the need for an extra symlink to where space-vim is installed. `/path/to/space-vim` may be `~/.vim` (Vim), `~/.config/nvіm` (Neovim), or elsewhere.
9999

100-
```bash
101-
$ bash <(curl -fsSL https://raw.githubusercontent.com/liuchengxu/space-vim/master/install.sh)
102-
```
103-
104-
#### Makefile
105-
106-
```bash
107-
$ git clone https://github.com/liuchengxu/space-vim.git /path/to/space-vim
108-
$ cd /path/to/space-vim
109-
$ make vim # install space-vim for Vim
110-
$ make neovim # install space-vim for NeoVim
111-
```
112-
113-
### Windows
114-
115-
The easist way is to download [`install.cmd`](https://raw.githubusercontent.com/liuchengxu/space-vim/master/install.cmd) and **run it as administrator**, or [install space-vim manually](https://github.com/liuchengxu/space-vim/wiki/install#windows).
116-
117-
![windows](https://raw.githubusercontent.com/liuchengxu/img/master/space-vim/win-gvim.png)
118-
119-
### Manual
100+
### Clone
120101

121102
1. Clone [space-vim](https://github.com/liuchengxu/space-vim):
122103

@@ -125,93 +106,55 @@ The easist way is to download [`install.cmd`](https://raw.githubusercontent.com/
125106
$ git clone https://github.com/liuchengxu/space-vim.git --single-branch /path/to/space-vim
126107
```
127108

128-
2. Install [vim-plug](https://github.com/junegunn/vim-plug#installation), refer to vim-plug installation section for more information:
129-
```bash
130-
# For Vim
131-
$ curl -fLo ~/.vim/autoload/plug.vim --create-dirs \
132-
https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
133-
134-
# For NeoVim
135-
sh -c 'curl -fLo "${XDG_DATA_HOME:-$HOME/.local/share}"/nvim/site/autoload/plug.vim --create-dirs \
136-
https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim'
137-
```
138-
139-
3. Create the symlinks and install plugins:
109+
2. Create the symlink(s):
140110

141111
**Linux and macOS**
142112

143113
```bash
144114
# **For Vim**
145115
# If space-vim not installed to ~/.vim/:
146116
$ ln -s /path/to/space-vim/init.vim ~/.vimrc
147-
# Copy init.spacevim for local customization
148-
$ cp /path/to/space-vim/init.spacevim ~/.spacevim
149-
$ vim -es +'PlugInstall' +qall
150117
151118
# **For NeoVim**
152119
# If space-vim not installed to ~/.config/nvim/:
153120
$ ln -s /path/to/space-vim/init.vim ~/.config/nvim/init.vim
154-
# Copy init.spacevim for local customization
155-
$ cp /path/to/space-vim/init.spacevim ~/.spacevim
156-
$ nvim +'PlugInstall' +qall
157-
```
158-
159-
## Customize
160-
161-
You can use `.spacevim` in your home directory to customize space-vim, where you can enable the existing layers, add your extra plugins and private configurations.
162121
163-
If `.spacevim` does not exist, vanilla vim will be loaded! Refer to [init.spacevim](init.spacevim) as an example.
164122
165-
### Presetting
166123
167-
```vim
168-
" Comment the following line if you don't want Vim and NeoVim to share the
169-
" same plugin download directory.
170-
let g:spacevim_plug_home = '~/.vim/plugged'
171-
172-
" Uncomment the following line to override the leader key. The default value is space key "<\Space>".
173-
" let g:spacevim_leader = "<\Space>"
174-
175-
" Uncomment the following line to override the local leader key. The default value is comma ','.
176-
" let g:spacevim_localleader = ','
124+
## Customize
177125
178-
" Enable the existing layers in space-vim
179-
" Refer to https://github.com/liuchengxu/space-vim/blob/master/layers/LAYERS.md for all available layers.
180-
let g:spacevim_layers = [
181-
\ 'fzf', 'better-defaults', 'which-key',
182-
\ ]
126+
```bash
127+
# Copy init.spacevim for local customization, or symlink it
128+
$ cp /path/to/space-vim/init.spacevim ~/.spacevim
129+
```
183130

184-
" Uncomment the following line if your terminal(-emulator) supports true colors.
185-
" let g:spacevim_enable_true_color = 1
131+
You can use `.spacevim` in your home directory to customize space-vim, where you can enable the existing layers, add your extra plugins and private configurations.
186132

187-
" Uncomment the following if you have some nerd font installed.
188-
" let g:spacevim_nerd_fonts = 1
189-
190-
" If you want to have more control over the layer, try using Layer command.
191-
" if g:spacevim.gui
192-
" Layer 'airline'
193-
" endif
194-
```
133+
### .spacevim details
195134

196135
Please refer to [LAYERS.md](layers/LAYERS.md) to take a look at the whole shipped layers.
197136

198137
Basically, `g:spacevim_layers` almost takes the place of `Layer` command. As far as I known, most people never use the option of `Layer` command, e.g., `exclude`, so `g:spacevim_layers` could save a lengthy `Layer` list, requiring less ceremony. Nevertheless, `Layer` command is still avaiable for some advanced uses.
199138

200139
### `UserInit()`
201140

141+
`UserInit()` may be used to add plugins that are not within a layer.
142+
202143
```vim
203144
" Manage your own plugins.
204-
" Refer to https://github.com/junegunn/vim-plug for more detials.
145+
" Refer to https://github.com/Shougo/dein.vim for more detials.
205146
function! UserInit()
206147

207-
" Add your own plugin via Plug command.
148+
" Add your own plugin via Plug command (wrapper around dein#add)
208149
Plug 'junegunn/seoul256.vim'
209150
210151
endfunction
211152
```
212153
213154
### `UserConfig()`
214155
156+
Configuration may be placed in `UserConfig()`, and/or in a `plugin/` folder on the runtime path. E.g. `~/.vim/plugin/<pluginname>.vim` for each local plugin configuration.
157+
215158
```vim
216159
" Override the default settings as well as adding extras
217160
function! UserConfig()
@@ -289,15 +232,6 @@ Second, since console Vim uses whatever font the console/terminal is using, you'
289232
290233
## Update
291234
292-
Run `make update`:
293-
294-
```bash
295-
$ cd path/to/space-vim
296-
$ make update
297-
```
298-
299-
Alternatively, you can manually perform the following steps. If anything has changed with the structure of the configuration, you will have to create the appropriate symlinks.
300-
301235
```bash
302236
$ cd path/to/space-vim
303237
$ git pull origin master

0 commit comments

Comments
 (0)