2017-03-11 10:12:27 +08:00
---
2017-03-12 19:08:16 +08:00
title: "chinese totur"
2017-03-17 16:18:19 +08:00
redirect_from: "/README_zh_cn/"
2017-03-11 10:12:27 +08:00
---
# SpaceVim 中文手册
2017-01-21 12:14:49 +08:00
2017-01-21 12:16:42 +08:00
[![Build Status ](https://travis-ci.org/SpaceVim/SpaceVim.svg?branch=dev )](https://travis-ci.org/SpaceVim/SpaceVim)
2017-03-11 10:12:27 +08:00
![Version 0.2.0-dev ](https://img.shields.io/badge/version-0.2.0--dev-yellow.svg?style=flat-square )
[![MIT License ](https://img.shields.io/badge/license-MIT-blue.svg?style=flat-square )]()
[![Doc ](https://img.shields.io/badge/doc-%3Ah%20SpaceVim-orange.svg?style=flat-square )](https://github.com/SpaceVim/SpaceVim/blob/dev/doc/SpaceVim.txt)
2017-01-21 12:16:42 +08:00
[![QQ ](https://img.shields.io/badge/QQ群-121056965-blue.svg )](https://jq.qq.com/?_wv=1027& k=43DB6SG)
[![Gitter ](https://badges.gitter.im/SpaceVim/SpaceVim.svg )](https://gitter.im/SpaceVim/SpaceVim?utm_source=badge& utm_medium=badge& utm_campaign=pr-badge)
[![Facebook ](https://img.shields.io/badge/FaceBook-SpaceVim-blue.svg )](https://www.facebook.com/SpaceVim)
[![GitHub watchers ](https://img.shields.io/github/watchers/SpaceVim/SpaceVim.svg?style=social&label=Watch )](https://github.com/SpaceVim/SpaceVim)
[![GitHub stars ](https://img.shields.io/github/stars/SpaceVim/SpaceVim.svg?style=social&label=Star )](https://github.com/SpaceVim/SpaceVim)
[![GitHub forks ](https://img.shields.io/github/forks/SpaceVim/SpaceVim.svg?style=social&label=Fork )](https://github.com/SpaceVim/SpaceVim)
[![Twitter Follow ](https://img.shields.io/twitter/follow/SpaceVim.svg?style=social&label=Follow&maxAge=2592000 )](https://twitter.com/SpaceVim)
2017-03-11 10:12:27 +08:00
![2017-02-26_1365x739 ](https://cloud.githubusercontent.com/assets/13142418/23339920/590f2e9a-fc67-11e6-99ec-794f79ba0902.png )
2017-01-22 12:24:42 +08:00
项 目 主 页: [spacevim.org ](https://spacevim.org )
2017-03-16 13:16:36 +08:00
Github 地址 : [https://github.com/SpaceVim/SpaceVim ](https://github.com/SpaceVim/SpaceVim ), 欢迎Star或fork。
SpaceVim 是一个社区驱动的模块化 vim/neovim 配置集合,其中包含了多种功能模块,并且针对 neovim 做了功能优化。spacevim 有多种功能模块可供选择,用户只需要选择需要的模块,就可以配置出一个适合自己的开发环境。
使用过程中遇到问题或者有什么功能需求可以在 github 提交 issue, 这将更容易被关注和修复。我们也欢迎喜欢 vim/neovim 的用户加入我们的 QQ 群,一起讨论 vim 相关的技巧,[点击加入Vim/SpaceVim用户群](https://jq.qq.com/?_wv=1027& k=43zWPlT)。
2017-03-11 10:12:27 +08:00
以下是近几周的开发汇总:
[![Throughput Graph ](https://graphs.waffle.io/SpaceVim/SpaceVim/throughput.svg )](https://github.com/SpaceVim/SpaceVim/pulse)
2017-03-16 13:16:36 +08:00
## 安装
2017-01-22 12:24:42 +08:00
2017-03-16 13:16:36 +08:00
**Linux 或 Mac 下 SpaceVim的安装非常简单, 只需要执行以下命令即可: **
2017-03-12 18:30:47 +08:00
2017-01-22 12:24:42 +08:00
```sh
curl -sLf https://spacevim.org/install.sh | bash
```
2017-03-12 18:30:47 +08:00
2017-01-22 12:24:42 +08:00
想要获取更多的自定义的安装方式,请参考:
2017-03-12 18:30:47 +08:00
2017-01-22 12:24:42 +08:00
```sh
curl -sLf https://spacevim.org/install.sh | bash -s -- -h
```
2017-03-12 18:30:47 +08:00
2017-01-22 12:24:42 +08:00
SpaceVim是一种模块化配置, 可以运行在vim或者neovim上, 关于vim以及neovim的安装, 请参考以下链接:
[安装neovim ](https://github.com/neovim/neovim/wiki/Installing-Neovim )
[从源码编译vim ](https://github.com/Valloric/YouCompleteMe/wiki/Building-Vim-from-source )
2017-03-16 13:16:36 +08:00
**windows系统下的安装步骤: **
2017-01-22 12:24:42 +08:00
2017-03-16 13:16:36 +08:00
Windows 下 vim 用户只需要将本仓库克隆成用户 HOME 目录下的 vimfiles 即可,打开 CMD 默认的目录默认即为 HOME 目录,只需要执行如下命令即可:
2017-03-12 18:30:47 +08:00
2017-03-16 13:16:36 +08:00
```
2017-01-22 12:24:42 +08:00
git clone https://github.com/SpaceVim/SpaceVim.git vimfiles
```
2017-03-12 18:30:47 +08:00
2017-03-16 13:16:36 +08:00
Windows 下 neovim 用户 需要将本仓库克隆成用户 HOME 目录下的 AppData\Local\nvim, 想要获取跟多关于 neovim 安装相关的知识,可以访问 neovim 的 wiki, wiki 写的非常详细。打开 CMD 初始目录默认一般即为 HOME 目录,只需要执行如下命令即可:
2017-03-12 18:30:47 +08:00
2017-03-16 13:16:36 +08:00
```
2017-01-22 12:24:42 +08:00
git clone https://github.com/SpaceVim/SpaceVim.git AppData\Local\nvim
```
2017-03-12 18:30:47 +08:00
2017-03-16 13:16:36 +08:00
## 特性
### 优雅的界面
### Unite为主的工作平台
Unite 的快捷键前缀是`f`, 可以通过 `g:spacevim_unite_leader` 来设定, 快捷键无需记忆, SpaceVim 有很好的快捷键辅助机制,如下是 Unite 的快捷键键图:
![unite ](https://cloud.githubusercontent.com/assets/13142418/23955542/26fd5348-09d5-11e7-8253-1f43991439b0.png )
2017-01-22 12:24:42 +08:00
以neovim为主的新特性实现
模块化设置
依赖 dein.vim 的延迟加载, 90%插件延迟加载,启动速度极快
高效,轻量级
针对不同语言开发的优化
可扩展的补全引擎, vim下为neocomplete, neovim 下为 deoplete
细致的tags管理
轻量级状态栏
优雅的主题
2017-03-16 13:16:36 +08:00
## 用户配置
2017-01-22 12:24:42 +08:00
2017-03-12 18:30:47 +08:00
SpaceVim 将从 ~/.SpaceVim.d/init.vim 和当前目录的 ./SpaceVim.d/init.vim 载入配置,并且更新 rtp, 用户可以在 ~/.SpaceVim.d/ 和 .SpaceVim.d/ 这两个文件夹下编辑自己的脚本,和 SpaceVim 的配置文件。
2017-01-22 12:24:42 +08:00
示例:
2017-03-12 18:30:47 +08:00
```vim
" Here are some basic customizations, please refer to the ~/.SpaceVim.d/init.vim
" file for all possible options:
2017-01-22 12:24:42 +08:00
let g:spacevim_default_indent = 3
let g:spacevim_max_column = 80
2017-03-12 18:30:47 +08:00
" Change the default directory where all miscellaneous persistent files go.
" By default it is ~/.cache/vimfiles.
let g:spacevim_plugin_bundle_dir = '~/.cache/vimfiles'
" set SpaceVim colorscheme
let g:spacevim_colorscheme = 'jellybeans'
" Set plugin manager, you want to use, default is dein.vim
2017-01-22 12:24:42 +08:00
let g:spacevim_plugin_manager = 'dein' " neobundle or dein or vim-plug
2017-03-12 18:30:47 +08:00
" use space as `<Leader>`
let mapleader = "\<space>"
2017-01-22 12:24:42 +08:00
2017-03-12 18:30:47 +08:00
" Set windows shortcut leader [Window], default is `s`
let g:spacevim_windows_leader = 's'
2017-01-22 12:24:42 +08:00
2017-03-12 18:30:47 +08:00
" Set unite work flow shortcut leader [Unite], default is `f`
let g:spacevim_unite_leader = 'f'
2017-01-22 12:24:42 +08:00
2017-03-12 18:30:47 +08:00
" By default, language specific plugins are not loaded. This can be changed
" with the following, then the plugins for go development will be loaded.
call SpaceVim#layers#load('lang#go')
2017-01-22 12:24:42 +08:00
2017-03-12 18:30:47 +08:00
" loaded ui layer
call SpaceVim#layers#load('ui')
2017-01-22 12:24:42 +08:00
2017-03-12 18:30:47 +08:00
" If there is a particular plugin you don't like, you can define this
" variable to disable them entirely:
let g:spacevim_disabled_plugins=[
\ ['junegunn/fzf.vim'],
\ ]
2017-01-22 12:24:42 +08:00
2017-03-12 18:30:47 +08:00
" If you want to add some custom plugins, use these options:
2017-01-22 12:24:42 +08:00
let g:spacevim_custom_plugins = [
2017-03-12 18:30:47 +08:00
\ ['plasticboy/vim-markdown', {'on_ft' : 'markdown'}],
\ ['wsdjeg/GitHub.vim'],
\ ]
2017-01-22 12:24:42 +08:00
2017-03-12 18:30:47 +08:00
" set the guifont
2017-01-22 12:24:42 +08:00
let g:spacevim_guifont = 'DejaVu\ Sans\ Mono\ for\ Powerline\ 11'
```
2017-03-12 18:30:47 +08:00
### SpaceVim选项
2017-01-22 12:24:42 +08:00
2017-03-12 18:30:47 +08:00
选项名称 | 默认值 | 描述
----- |:----:| ------------------
`g:spacevim_default_indent` | 2 | 对齐空格
`g:spacevim_enable_guicolors` | 1 | 启用/禁用终端使用真色彩
`g:spacevim_windows_leader` | `s` | 窗口管理快捷键前缀
`g:spacevim_unite_leader` | `f` | Unite快捷键前缀
2017-03-12 19:08:16 +08:00
`g:spacevim_plugin_bundle_dir` | `~/.cache/vimfiles` | SpaceVim 默认插件缓存位置
`g:spacevim_realtime_leader_guide` | 0 | 启用/禁用实时快捷键提示
`g:spacevim_guifont` | '' | 设置SpaceVim字体
`g:spacevim_sidebar_width` | 30 | 设置边栏宽度,此设置将影响到文件树侧栏和语法树侧栏
`g:spacevim_custom_plugins` | `[]` | 设置自定义插件