1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-02-03 02:40:05 +08:00

Merge branch 'dev'

This commit is contained in:
wsdjeg 2017-09-02 20:02:40 +00:00
commit 30c220a4d7
21 changed files with 737 additions and 800 deletions

View File

@ -1,6 +1,11 @@
language: python
sudo: false
notifications:
slack:
on_success: never
on_failure: never
cache:
pip: true

247
README.md
View File

@ -4,16 +4,22 @@
[Documentation](http://spacevim.org/documentation/) |
[Twitter](https://twitter.com/SpaceVim) |
[Community](https://spacevim.org/community/) |
[Gitter **Chat**](https://gitter.im/SpaceVim/SpaceVim)
[Gitter **Chat**](https://gitter.im/SpaceVim/SpaceVim) |
[中文文档](http://spacevim.org/README_zh_cn/)
[![Build Status](https://travis-ci.org/SpaceVim/SpaceVim.svg?branch=dev)](https://travis-ci.org/SpaceVim/SpaceVim)
![Version](https://img.shields.io/badge/version-0.4.0--dev-FF00CC.svg)
![Version](https://img.shields.io/badge/version-0.5.0--dev-FF00CC.svg)
[![MIT License](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)
[![Doc](https://img.shields.io/badge/doc-%3Ah%20SpaceVim-orange.svg)](doc/SpaceVim.txt)
[![Average time to resolve an issue](http://isitmaintained.com/badge/resolution/SpaceVim/SpaceVim.svg)](http://isitmaintained.com/project/SpaceVim/SpaceVim "Average time to resolve an issue")
[![Percentage of issues still open](http://isitmaintained.com/badge/open/SpaceVim/SpaceVim.svg)](http://isitmaintained.com/project/SpaceVim/SpaceVim "Percentage of issues still open")
SpaceVim is a community-driven vim distribution that seeks to provide layer feature, especially for neovim. It offers a variety of layers to choose from. to create a suitable vim development environment, you just need to select the required layers.
SpaceVim is a community-driven vim distribution that seeks to provide layer feature, especially for neovim. It offers a variety of layers to choose from. to create a suitable vim development environment, you just need to select the required layers. If you use SpaceVim,
please star it on github. It's a great way of getting feedback and gives me the kick to
put more time into development.
![welcome-page](https://cloud.githubusercontent.com/assets/13142418/26402270/28ad72b8-40bc-11e7-945e-003f41e057be.png)
See the [documentation](https://spacevim.org/documentation) or [the list of layers](http://spacevim.org/layers/) for more information.
@ -21,108 +27,8 @@ Here is a throughput graph of the repository for the last few weeks:
[![Throughput Graph](https://graphs.waffle.io/SpaceVim/SpaceVim/throughput.svg)](https://waffle.io/SpaceVim/SpaceVim/metrics/throughput)
# Table of Contents
<!-- vim-markdown-toc GFM -->
* [Introduction](#introduction)
* [Features](#features)
* [Mnemonic key bindings](#mnemonic-key-bindings)
* [Unite work flow](#unite-work-flow)
* [module statusline](#module-statusline)
* [Install](#install)
* [1. Requirements](#1-requirements)
* [2. Install SpaceVim in Linux/Mac](#2-install-spacevim-in-linuxmac)
* [3. Install SpaceVim in windows](#3-install-spacevim-in-windows)
* [Update](#update)
* [Documentation](#documentation)
* [Quick start guide](#quick-start-guide)
* [Community](#community)
* [Support SpaceVim](#support-spacevim)
* [contribute to SpaceVim](#contribute-to-spacevim)
* [Write post about SpaceVim](#write-post-about-spacevim)
* [Credits & Thanks](#credits--thanks)
<!-- vim-markdown-toc -->
## Introduction
[SpaceVim](https://github.com/SpaceVim/SpaceVim) is a community-driven vim distribution with a bundle of modular configuration,
here we call these modules as layers, each layer has different plugins and config, users just need
to select the layers they need. It got inspired by [spacemacs](https://github.com/syl20bnr/spacemacs). If you use SpaceVim,
please star it on github. It's a great way of getting feedback and gives me the kick to
put more time into development.
![welcome-page](https://cloud.githubusercontent.com/assets/13142418/26402270/28ad72b8-40bc-11e7-945e-003f41e057be.png)
If you are new to vim, you should learn about Vim in general, read [vim-galore](https://github.com/mhinz/vim-galore).
## Features
- **Great documentation:** access documentation in Vim with
<kbd>:h SpaceVim</kbd>.
- **Beautiful GUI:** you'll love the awesome UI and its useful features.
- **Mnemonic key bindings:** commands have mnemonic prefixes like
<kbd>[Window]</kbd> for all the window and buffer commands or <kbd>[Unite]</kbd> for the
unite work flow commands.
- **Lazy load plugins:** Lazy-load 90% of plugins with [dein.vim]
- **Batteries included:** discover hundreds of ready-to-use packages nicely
organised in configuration layers following a set of
[conventions](http://spacevim.org/development/).
- **Neovim centric:** Dark powered mode of SpaceVim
### Mnemonic key bindings
By default the guide buffer will be displayed 1000ms after the key has been pressed. You can change the delay by setting `'timeoutlen'` option to your liking (the value is in milliseconds).
for example, after pressing `<Space>` in normal mode, you will see :
![mapping-guide](https://cloud.githubusercontent.com/assets/13142418/25778673/ae8c3168-3337-11e7-8536-ee78d59e5a9c.png)
this guide show you all the available key bindings begin with `[SPC]`, you can type `b` for all the buffer mappings, `p` for project mappings, etc. after pressing `<C-h>` in guide buffer, you will get paging and help info in the statusline.
here is the guide for the default mappings in SpaceVim:
![spc](https://user-images.githubusercontent.com/13142418/27549426-8141bd86-5ace-11e7-9082-eb86b398acdc.png)
### Unite work flow
![unite](docs/img/unite_mappings.png)
### module statusline
The `core#statusline` layer provide a heavily customized powerline with the following capabilities:, It is inspired by spacemacs's mode-line. and this layer is loaded by default.
- show the window number
- color code for current state
- show the number of search results
- toggle syntax checking info
- toggle battery info
- toggle minor mode lighters
![search status](https://cloud.githubusercontent.com/assets/13142418/26313080/578cc68c-3f3c-11e7-9259-a27419d49572.png)
## Install
### 1. Requirements
**nerd fonts and true colors:**
SpaceVim provides basic and awesome mode, if you want to use awesome mode, you need to install the [nerd-fonts](https://github.com/ryanoasis/nerd-fonts) and make sure your terminal support [true colors](https://gist.github.com/XVilka/8346728).
**Vim 7.4 above or neovim:**
- [neovim installation](https://github.com/neovim/neovim/wiki/Installing-Neovim)
- [install vim with python, python3 and lua support](https://github.com/Valloric/YouCompleteMe/wiki/Building-Vim-from-source)
**git:**
SpaceVim will download all plugins via git.
### 2. Install SpaceVim in Linux/Mac
Install SpaceVim with the command below:
### Install
```bash
curl -sLf https://spacevim.org/install.sh | bash
@ -136,137 +42,24 @@ for more info about the install script, please check:
curl -sLf https://spacevim.org/install.sh | bash -s -- -h
```
### 3. Install SpaceVim in windows
### Features
- For vim in windows, please just clone this repo as vimfiles in you Home directory.
by default, when open a cmd, the current dir is your Home directory, run this command in cmd.
make sure you have a backup of your own vimfiles. also you need remove `~/_vimrc` in your home directory.
- **Great documentation:** access documentation in Vim with
<kbd>:h SpaceVim</kbd>.
- **Beautiful GUI:** you'll love the awesome UI and its useful features.
- **Mnemonic key bindings:** all key bindings have mnemonic prefixes.
- **Lazy load plugins:** Lazy-load 90% of plugins with [dein.vim](https://github.com/Shougo/dein.vim)
- **Neovim centric:** Dark powered mode of SpaceVim
```sh
git clone https://github.com/SpaceVim/SpaceVim.git vimfiles
```
- For neovim in windows, please clone this repo as `AppData\Local\nvim` in your home directory.
for more info, please check out [neovim's wiki](https://github.com/neovim/neovim/wiki/Installing-Neovim).
by default, when open a cmd, the current dir is your Home directory, run this command in cmd.
```bash
git clone https://github.com/SpaceVim/SpaceVim.git AppData\Local\nvim
```
## Update
you can update SpaceVim with the command below:
```viml
:SPUpdate SpaceVim
```
## Documentation
### Quick start guide
SpaceVim load custom configuration from `~/.SpaceVim.d/init.vim`,
:warning: It is not `~/.SpaceVim/init.vim`, user should not change anything in `~/.SpaceVim/`.
here is an example:
```vim
" Here are some basic customizations, please refer to the ~/.SpaceVim.d/init.vim
" file for all possible options:
let g:spacevim_default_indent = 3
let g:spacevim_max_column = 80
" 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 = 'gruvbox'
" Set plugin manager, you want to use, default is dein.vim
let g:spacevim_plugin_manager = 'dein' " neobundle or dein or vim-plug
" Set windows shortcut leader [Window], default is `s`
let g:spacevim_windows_leader = 's'
" Set unite work flow shortcut leader [Unite], default is `f`
let g:spacevim_unite_leader = 'f'
" Set Denite work flow shortcut leader [Denite], default is `F`
let g:spacevim_denite_leader = 'F'
" 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')
" loaded ui layer
call SpaceVim#layers#load('ui')
" 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'],
\ ]
" If you want to add some custom plugins, use these options:
let g:spacevim_custom_plugins = [
\ ['plasticboy/vim-markdown', {'on_ft' : 'markdown'}],
\ ['wsdjeg/GitHub.vim'],
\ ]
" set the guifont
let g:spacevim_guifont = 'DejaVu\ Sans\ Mono\ for\ Powerline\ 11'
```
Comprehensive documentation is available for each layer by <kbd>:h SpaceVim</kbd>.
You can also check the [general documentation](http://spacevim.org/documentation/).
## Community
Try these SpaceVim hangouts for any questions, problems or comments.
- Chat
- [![Gitter](https://badges.gitter.im/SpaceVim/SpaceVim.svg)](https://gitter.im/SpaceVim/SpaceVim?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
- [![QQ](https://img.shields.io/badge/QQ群-121056965-blue.svg)](https://jq.qq.com/?_wv=1027&k=43DB6SG)
- [![Facebook](https://img.shields.io/badge/FaceBook-SpaceVim-blue.svg)](https://www.facebook.com/SpaceVim)
- Ask
- [issue tracker](https://github.com/SpaceVim/SpaceVim/issues) for issue and feature requests
- vi StackExchange for "how to" & configuration questions
- [![Twitter Follow](https://img.shields.io/twitter/follow/SpaceVim.svg?style=social&label=Follow&maxAge=2592000)](https://twitter.com/SpaceVim) for hugs & pithy comments
- Discuss
- [google mailing list](https://groups.google.com/forum/#!forum/spacevim)
## Support SpaceVim
### Support SpaceVim
The best way to support SpaceVim is to contribute to it either by reporting bugs, helping the community on the Gitter Chat or sending pull requests.
If you want to show your support financially you can contribute to [Bountysource](https://www.bountysource.com/teams/spacevim) or buy a drink for the maintainer by clicking following icon.
If you want to show your support financially you can buy a drink for the maintainer by clicking following icon.
<a href='https://ko-fi.com/A538L6H' target='_blank'><img height='36' style='border:0px;height:36px;' src='https://az743702.vo.msecnd.net/cdn/kofi4.png?v=f' border='0' alt='Buy Me a Coffee at ko-fi.com' /></a>
If you used SpaceVim in a project and you want to show that fact, you can use the SpaceVim badge:
[![](https://spacevim.org/img/build-with-SpaceVim.svg)](https://spacevim.org)
markdown
```markdown
[![](https://spacevim.org/img/build-with-SpaceVim.svg)](https://spacevim.org)
```
### contribute to SpaceVim
Before contributing be sure to consult the [contribution guidelines](http://spacevim.org/development/#contribution-guidelines) and [conventions](http://spacevim.org/development/#conventions).
### Write post about SpaceVim
if you want to write something about SpaceVim, and want your post to be posted in [SpaceVim's blog page](https://spacevim.org/blog), please show us the link.
## Credits & Thanks
### Credits & Thanks
- [![GitHub contributors](https://img.shields.io/github/contributors/SpaceVim/SpaceVim.svg)](https://github.com/SpaceVim/SpaceVim/graphs/contributors)
- [vimdoc](https://github.com/google/vimdoc) generate doc file for SpaceVim

View File

@ -27,7 +27,7 @@
""
" Version of SpaceVim , this value can not be changed.
scriptencoding utf-8
let g:spacevim_version = '0.4.0-dev'
let g:spacevim_version = '0.5.0-dev'
lockvar g:spacevim_version
""
" Change the default indentation of SpaceVim. Default is 2.

View File

@ -12,9 +12,12 @@ function! SpaceVim#layers#load(layer, ...) abort
endif
if index(g:spacevim_plugin_groups, a:layer) == -1
call add(g:spacevim_plugin_groups, a:layer)
if a:0 == 1 && type(a:1) == 4
call SpaceVim#layers#{a:layer}#set_variable(a:1)
endif
if a:0 == 1 && type(a:1) == 4
try
call SpaceVim#layers#{a:layer}#set_variable(a:1)
catch /^Vim\%((\a\+)\)\=:E117/
endtry
endif
if a:0 > 0 && type(a:1) == 1
for l in a:000

View File

@ -65,19 +65,36 @@ endfunction
function! SpaceVim#layers#autocomplete#config() abort
let g:delimitMate_matchpairs = '[:],{:},<:>'
inoremap <silent><expr> ( complete_parameter#pre_complete("()")
imap <expr>(
\ pumvisible() ?
\ complete_parameter#pre_complete("()") :
\ (len(maparg('<Plug>delimitMate(', 'i')) == 0) ?
\ "\<Plug>delimitMate(" :
\ '('
"mapping
if s:tab_key_behavior ==# 'smart'
imap <silent><expr><TAB> SpaceVim#mapping#tab()
imap <silent><expr><S-TAB> SpaceVim#mapping#shift_tab()
imap <silent><expr><CR> SpaceVim#mapping#enter()
smap <expr><TAB>
\ neosnippet#expandable_or_jumpable() ?
\ "\<Plug>(neosnippet_expand_or_jump)" :
\ (complete_parameter#jumpable(1) ?
\ "\<plug>(complete_parameter#goto_next_parameter)" :
\ "\<TAB>")
imap <silent><expr><S-TAB> SpaceVim#mapping#shift_tab()
elseif s:tab_key_behavior ==# 'complete'
inoremap <expr> <Tab> pumvisible() ? "\<C-y>" : "\<C-n>"
elseif s:tab_key_behavior ==# 'cycle'
inoremap <expr> <Tab> pumvisible() ? "\<Down>" : "\<Tab>"
inoremap <expr> <S-Tab> pumvisible() ? "\<Up>" : ""
elseif s:tab_key_behavior ==# 'nil'
endif
if s:return_key_behavior ==# 'smart'
imap <silent><expr><CR> SpaceVim#mapping#enter()
elseif s:return_key_behavior ==# 'complete'
imap <silent><expr><CR> pumvisible() ? "\<C-y>" : "\<CR>"
elseif s:return_key_behavior ==# 'nil'
endif
inoremap <expr> <Down> pumvisible() ? "\<C-n>" : "\<Down>"
inoremap <expr> <Up> pumvisible() ? "\<C-p>" : "\<Up>"
@ -90,7 +107,12 @@ function! SpaceVim#layers#autocomplete#config() abort
call SpaceVim#mapping#space#def('nnoremap', ['i', 's'], 'Unite neosnippet', 'insert sneppets', 1)
endfunction
function! SpaceVim#layers#autocomplete#set_variable(var)
let s:return_key_behavior = 'smart'
let s:tab_key_behavior = 'smart'
let s:key_sequence = 'nil'
let s:key_sequence_delay = 0.1
function! SpaceVim#layers#autocomplete#set_variable(var) abort
let s:return_key_behavior = get(a:var,
\ 'auto-completion-return-key-behavior',

View File

@ -373,6 +373,40 @@ function! SpaceVim#layers#core#statusline#config() abort
endfunction
let g:tagbar_status_func = 'TagbarStatusline'
let g:unite_force_overwrite_statusline = 0
let g:ctrlp_status_func = {
\ 'main': 'SpaceVim#layers#core#statusline#ctrlp',
\ 'prog': 'SpaceVim#layers#core#statusline#ctrlp_status',
\ }
endfunction
" Arguments:
" |
" +- a:focus : The focus of the prompt: "prt" or "win".
" |
" +- a:byfname : In filename mode or in full path mode: "file" or "path".
" |
" +- a:regex : In regex mode: 1 or 0.
" |
" +- a:prev : The previous search mode.
" |
" +- a:item : The current search mode.
" |
" +- a:next : The next search mode.
" |
" +- a:marked : The number of marked files, or a comma separated list of
" the marked filenames.
function! SpaceVim#layers#core#statusline#ctrlp(focus, byfname, regex, prev, item, next, marked) abort
return s:STATUSLINE.build([' Ctrlp ', ' ' . a:prev . ' ', ' ' . a:item . ' ', ' ' . a:next . ' '],
\ [' ' . a:focus . ' ', ' ' . a:byfname . ' ', ' ' . getcwd() . ' '], s:lsep, s:rsep,
\ 'SpaceVim_statusline_a_bold', 'SpaceVim_statusline_b', 'SpaceVim_statusline_c', 'SpaceVim_statusline_z')
endfunction
" a:str : Either the number of files scanned so far, or a string indicating
" the current directory is being scanned with a user_command.
function! SpaceVim#layers#core#statusline#ctrlp_status(str) abort
return s:STATUSLINE.build([' Ctrlp ', ' ' . a:str . ' '],
\ [' ' . getcwd() . ' '], s:lsep, s:rsep,
\ 'SpaceVim_statusline_a', 'SpaceVim_statusline_b', 'SpaceVim_statusline_c', 'SpaceVim_statusline_z')
endfunction
function! SpaceVim#layers#core#statusline#jump(i) abort
@ -428,3 +462,5 @@ function! SpaceVim#layers#core#statusline#unite_mode()
endif
return ''
endfunction
" vim:set et sw=2 cc=80:

View File

@ -2,12 +2,15 @@
" @section Default, default
" @parentsection layers
let s:filename = expand('<sfile>:~')
function! SpaceVim#layers#default#plugins() abort
let plugins = []
return plugins
endfunction
let s:lnum = expand('<slnum>') + 3
function! SpaceVim#layers#default#config() abort
" Unimpaired bindings
" Quickly add empty lines
@ -47,7 +50,27 @@ function! SpaceVim#layers#default#config() abort
" Select last paste
nnoremap <silent><expr> gp '`['.strpart(getregtype(), 0, 1).'`]'
call SpaceVim#mapping#space#def('nnoremap', ['f', 'f'], "exe 'CtrlP ' . fnamemodify(bufname('%'), ':h')", 'Find files in the directory of the current buffer', 1)
let lnum = expand('<slnum>') + s:lnum - 1
if has('python3')
let cmd = 'DeniteBufferDir file_rec'
elseif has('python')
let cmd = "exe 'LeaderfFile ' . fnamemodify(bufname('%'), ':h')"
else
let cmd = "exe 'CtrlP ' . fnamemodify(bufname('%'), ':h')"
endif
call SpaceVim#mapping#space#def('nnoremap', ['f', 'f'],
\ cmd,
\ ['Find files in the directory of the current buffer',
\ [
\ '[SPC f f] is to find files in the directory of the current buffer',
\ 'vim with +python3 support will use denite',
\ 'vim with +python support will use leaderf',
\ 'otherwise will use ctrlp',
\ '',
\ 'Definition: ' . s:filename . ':' . lnum,
\ ]
\ ]
\ , 1)
call SpaceVim#mapping#space#def('nnoremap', ['f', 's'], 'write', 'save buffer', 1)
call SpaceVim#mapping#space#def('nnoremap', ['f', 'S'], 'wall', 'save all buffer', 1)
call SpaceVim#mapping#space#def('nnoremap', ['f', 'W'], 'write !sudo tee % >/dev/null', 'save buffer with sudo', 1)
@ -63,7 +86,7 @@ function! SpaceVim#layers#default#config() abort
call SpaceVim#mapping#space#def('nnoremap', ['h', 'k'], 'LeaderGuide "[KEYs]"', 'show top-level bindings with mapping guide', 1)
call SpaceVim#mapping#space#def('nnoremap', ['h', '[SPC]'], 'Unite help -input=SpaceVim', 'unite-SpaceVim-help', 1)
call SpaceVim#mapping#space#def('nnoremap', ['j', '0'], 'm`^', 'push mark and goto beginning of line', 0)
call SpaceVim#mapping#space#def('nnoremap', ['j', '$'], 'm`g_', 'push mark and goto beginning of line', 0)
call SpaceVim#mapping#space#def('nnoremap', ['j', '$'], 'm`g_', 'push mark and goto end of line', 0)
call SpaceVim#mapping#space#def('nnoremap', ['j', 'b'], '<C-o>', 'jump backward', 0)
call SpaceVim#mapping#space#def('nnoremap', ['j', 'f'], '<C-i>', 'jump forward', 0)
call SpaceVim#mapping#space#def('nnoremap', ['j', 'd'], 'VimFiler -no-split', 'Explore current directory', 1)

View File

@ -6,6 +6,7 @@ let s:LIST = SpaceVim#api#import('data#list')
function! SpaceVim#layers#edit#plugins() abort
let plugins = [
\ ['tpope/vim-surround'],
\ ['tpope/vim-repeat'],
\ ['junegunn/vim-emoji'],
\ ['terryma/vim-multiple-cursors'],
\ ['terryma/vim-expand-region', { 'loadconf' : 1}],
@ -49,7 +50,7 @@ function! SpaceVim#layers#edit#config() abort
let g:_spacevim_mappings_space.x.i = {'name' : '+change symbol style'}
nnoremap <silent> <Plug>CountSelectionRegion :call <SID>count_selection_region()<Cr>
xnoremap <silent> <Plug>CountSelectionRegion :<C-u>call <SID>count_selection_region()<Cr>
call SpaceVim#mapping#space#def('nmap', ['x', 'c'], '<Plug>CountSelectionRegion', 'cunt in the selection region', 0, 1)
call SpaceVim#mapping#space#def('nmap', ['x', 'c'], '<Plug>CountSelectionRegion', 'count in the selection region', 0, 1)
call SpaceVim#mapping#space#def('nnoremap', ['x', 'a', '&'], 'Tabularize /&', 'align region at &', 1)
call SpaceVim#mapping#space#def('nnoremap', ['x', 'a', '('], 'Tabularize /(', 'align region at (', 1)
call SpaceVim#mapping#space#def('nnoremap', ['x', 'a', ')'], 'Tabularize /)', 'align region at )', 1)

View File

@ -10,7 +10,7 @@ function! SpaceVim#layers#lang#plugins() abort
\ ['juvenn/mustache.vim', { 'on_ft' : ['mustache']}],
\ ['leafgarland/typescript-vim', { 'on_ft' : ['typescript']}],
\ ['kchmck/vim-coffee-script', { 'on_ft' : ['coffee']}],
\ ['leshill/vim-json', { 'on_ft' : ['javascript','json']}],
\ ['elzr/vim-json', { 'on_ft' : ['javascript','json']}],
\ ['elixir-lang/vim-elixir', { 'on_ft' : 'elixir'}],
\ ['PotatoesMaster/i3-vim-syntax', { 'on_ft' : 'i3'}],
\ ['isundil/vim-irssi-syntax', { 'on_ft' : 'irssi'}],

View File

@ -0,0 +1,32 @@
"=============================================================================
" julia.vim --- Julia Language configuration for SpaceVim
" Copyright (c) 2012-2016 Shidong Wang & Contributors
" Author: Jinxuan Zhu <zhujinxuan@gmail.com>
" URL: https://spacevim.org
" License: MIT license
"=============================================================================
""
" @section lang#julia, layer-lang-julia
" @parentsection layers
" The layer provides synatax highlight and linting for julia.
" The completeion only works in nvim with deoplete.
" However, the julia-vim could not be load on-demanding
" due to its LaTeXToUnicode feature.
"
function! SpaceVim#layers#lang#julia#plugins() abort
let plugins = []
call add(plugins, ['JuliaEditorSupport/julia-vim' ])
if (has('nvim'))
call add(plugins, ['JuliaEditorSupport/deoplete-julia', {'on_ft' : 'julia'}])
endif
call add(plugins, ['zyedidia/julialint.vim', {'on_ft' : 'julia'}])
return plugins
endfunction
function! SpaceVim#layers#lang#julia#config() abort
let g:latex_to_unicode_tab = 0
au! BufNewFile,BufRead *.jl setf julia
au! BufNewFile,BufRead *.julia setf julia
endfunction

View File

@ -49,7 +49,7 @@ function! SpaceVim#layers#unite#plugins() abort
\ ['sgur/unite-everything'],
\ ['wsdjeg/unite-dwm'],
\ ['raw1z/unite-projects'],
\ ['voi/unite-ctags'],
\ ['SpaceVim/unite-ctags'],
\ ['Shougo/unite-session'],
\ ['osyo-manga/unite-quickfix'],
\ ['ujihisa/unite-colorscheme'],

View File

@ -68,6 +68,8 @@ function! SpaceVim#mapping#g#init() abort
nnoremap gn gn
let g:_spacevim_mappings_g['Q'] = ['call feedkeys("gQ", "n")', 'switch to Ex mode']
nnoremap gQ gQ
let g:_spacevim_mappings_g['q'] = ['call feedkeys("gq", "n")', 'format Nmove text']
nnoremap gq gq
let g:_spacevim_mappings_g['R'] = ['call feedkeys("gR", "n")', 'enter VREPLACE mode']
nnoremap gR gR
let g:_spacevim_mappings_g['T'] = ['call feedkeys("gT", "n")', 'previous tag page']
@ -94,10 +96,8 @@ function! SpaceVim#mapping#g#init() abort
nnoremap gs gs
let g:_spacevim_mappings_g['v'] = ['call feedkeys("gv", "n")', 'reselect the previous Visual area']
nnoremap gv gv
let g:_spacevim_mappings_g['<C-]>'] = ['call feedkeys("g<c-]>", "n")', 'jump to tag under cursor']
nnoremap g<c-]> g<c-]>
let g:_spacevim_mappings_g['d'] = ['call SpaceVim#mapping#gd()', 'goto definition']
call SpaceVim#mapping#def('nnoremap <silent>', 'gd', ':call SpaceVim#mapping#gd()<CR>', 'Goto declaration', '')

View File

@ -1,3 +1,4 @@
let s:file = expand('<sfile>:~')
function! SpaceVim#mapping#space#init() abort
if s:has_map_to_spc()
return
@ -63,19 +64,28 @@ function! SpaceVim#mapping#space#init() abort
call SpaceVim#mapping#space#def('nnoremap', ['w', 'W'], 'ChooseWin', 'select window', 1)
call SpaceVim#mapping#space#def('nnoremap', ['w', 'u'], 'call SpaceVim#plugins#windowsmanager#UndoQuitWin()', 'undo quieted window', 1)
call SpaceVim#mapping#space#def('nnoremap', ['w', 'U'], 'call SpaceVim#plugins#windowsmanager#RedoQuitWin()', 'redo quieted window', 1)
nnoremap <silent> [SPC]bn :bnext<CR>
let g:_spacevim_mappings_space.b.n = ['bnext', 'next buffer',
let s:lnum = expand('<slnum>') + 3
call SpaceVim#mapping#space#def('nnoremap', ['b', 'n'], 'bnext', ['next buffer',
\ [
\ 'SPC b n is running :bnext, jump to next buffer',
\ '[SPC b n] is running :bnext, jump to next buffer',
\ 'which is a vim build in command',
\ 'It is bound to SPC b n, ] b,',
\ '',
\ 'Definition: ' . s:file . ':' . s:lnum,
\ ]
\ ]
call SpaceVim#mapping#menu('Open next buffer', '[SPC]bn', 'bp')
nnoremap <silent> [SPC]bp :bp<CR>
let g:_spacevim_mappings_space.b.p = ['bp', 'previous buffer']
call SpaceVim#mapping#menu('Open previous buffer', '[SPC]bp', 'bp')
\ , 1)
let s:lnum = expand('<slnum>') + 3
call SpaceVim#mapping#space#def('nnoremap', ['b', 'p'], 'bp', ['previous buffer',
\ [
\ 'SPC b p is running :bp, jump to previous buffer',
\ 'which is a vim build in command',
\ 'It is bound to SPC b p, [ b,',
\ '',
\ 'Definition: ' . s:file . ':' . s:lnum,
\ ]
\ ]
\ , 1)
"
" Comments sections
"

View File

@ -208,7 +208,7 @@ function! SpaceVim#plugins#manager#update(...) abort
elseif reponame ==# 'SpaceVim'
let repo = {
\ 'name' : 'SpaceVim',
\ 'path' : expand('~/.SpaceVim')
\ 'path' : fnamemodify(g:Config_Main_Home, ':h')
\ }
call s:pull(repo)

View File

@ -1,4 +1,6 @@
let g:Config_Main_Home = fnamemodify(expand('<sfile>'), ':p:h:gs?\\?'.((has('win16') || has('win32') || has('win64'))?'\':'/') . '?')
let g:Config_Main_Home = fnamemodify(expand('<sfile>'),
\ ':p:h:gs?\\?'.((has('win16') || has('win32')
\ || has('win64'))?'\':'/') . '?')
" [dir?, path]
@ -58,3 +60,5 @@ endif
call zvim#util#source_rc('commands.vim')
filetype plugin indent on
syntax on
" vim:set et sw=2 cc=80:

View File

@ -20,7 +20,7 @@ if executable('rg') && !exists('g:ctrlp_user_command')
let g:ctrlp_user_command = 'rg %s --no-ignore --hidden --files -g "" '
\ . join(zvim#util#Generate_ignore(g:spacevim_wildignore,'rg', 1))
elseif executable('ag') && !exists('g:ctrlp_user_command')
let g:ctrlp_user_command = 'ag %s --hidden -i -g "" ' . join(zvim#util#Generate_ignore(g:spacevim_wildignore,'ag'))
let g:ctrlp_user_command = 'ag --hidden -i -g "" ' . join(zvim#util#Generate_ignore(g:spacevim_wildignore,'ag')) . ' %s'
endif
if !exists('g:ctrlp_match_func') && (has('python') || has('python3'))
let g:ctrlp_match_func = { 'match': 'pymatcher#PyMatch' }

View File

@ -848,7 +848,7 @@ SpaceVim use vimfiler as the default file tree, and the default key binding is `
let g:spacevim_filemanager = 'nerdtree'
```
VCS integration is supported, there will be a colum status, this feature maybe make vimfiler slow, so it is not enabled by default. to enable this feature, add `let g:spacevim_enable_vimfiler_gitstatus = 1` to your custom config. here is any picture for this feature:
VCS integration is supported, there will be a column status, this feature maybe make vimfiler slow, so it is not enabled by default. to enable this feature, add `let g:spacevim_enable_vimfiler_gitstatus = 1` to your custom config. here is any picture for this feature:
![file-tree](https://user-images.githubusercontent.com/13142418/26881817-279225b2-4bcb-11e7-8872-7e4bd3d1c84e.png)
@ -1196,7 +1196,7 @@ Text related commands (start with `x`):
| `SPC x a L` | right-align with evil-lion (TODO) |
| `SPC x a r` | align region using user-specified regexp (TODO) |
| `SPC x a m` | align region at arithmetic operators `(+-*/)` (TODO) |
| `SPC x c` | cunt the number of chars/words/lines in the selection region |
| `SPC x c` | count the number of chars/words/lines in the selection region |
| `SPC x d w` | delete trailing whitespaces |
| `SPC x d SPC` | Delete all spaces and tabs around point, leaving one space |
| `SPC x g l` | set lanuages used by translate commands (TODO) |

View File

@ -5,7 +5,7 @@ title: "Home"
# Introduction
[![Build Status](https://travis-ci.org/SpaceVim/SpaceVim.svg?branch=dev)](https://travis-ci.org/SpaceVim/SpaceVim)
![Version](https://img.shields.io/badge/version-0.4.0--dev-FF00CC.svg)
![Version](https://img.shields.io/badge/version-0.5.0--dev-FF00CC.svg)
[![MIT License](https://img.shields.io/badge/license-MIT-blue.svg?style=flat-square)](https://raw.githubusercontent.com/SpaceVim/SpaceVim/dev/LICENSE)
[![Doc](https://img.shields.io/badge/doc-%3Ah%20SpaceVim-orange.svg?style=flat-square)](https://raw.githubusercontent.com/SpaceVim/SpaceVim/dev/doc/SpaceVim.txt)
[![Average time to resolve an issue](http://isitmaintained.com/badge/resolution/SpaceVim/SpaceVim.svg)](http://isitmaintained.com/project/SpaceVim/SpaceVim "Average time to resolve an issue")

View File

@ -11,7 +11,7 @@
# Reset
Color_off='\033[0m' # Text Reset
Version='0.4.0-dev'
Version='0.5.0-dev'
# Regular Colors
Red='\033[0;31m'

View File

@ -44,17 +44,18 @@ call SpaceVim#layers#load('autocomplete')
You can customize the user experience of auto-completion with the following layer variables:
1. `auto-completion-return-key-behavior` set the action to perform when the `RET` key is pressed, the possible values are:
1. `auto-completion-return-key-behavior` set the action to perform when the `Return`/`Enter` key is pressed, the possible values are:
- `complete` completes with the current selection
- `nil` does nothing
- `smart` completes with current selection and expand snippet or argvs
- `nil`
2. `auto-completion-tab-key-behavior` set the action to perform when the `TAB` key is pressed, the possible values are:
- `smart` cycle candidates, expand snippets, jump parameters
- `complete` completes with the current selection
- `cycle` completes the common prefix and cycle between candidates
- `nil` does nothing
- `nil` insert a carriage return
3. `auto-completion-complete-with-key-sequence` is a string of two characters denoting a key sequence that will perform a `complete` action if the sequence as been entered quickly enough. If its value is `nil` then the feature is disabled.
4. `auto-completion-complete-with-key-sequence-delay` is the number of seconds to wait for the auto-completion key sequence to be entered. The default value is 0.1 seconds.
@ -99,12 +100,12 @@ call SpaceVim#layers#load('autocomplete', {
### auto-complete
| Key bindings | Description |
| ------------ | -------------------------------------------------------------------- |
| ------------ | --------------------------------------------- |
| `<C-n>` | select next candidate |
| `<C-p>` | select previous candidate |
| `<Tab>` | expand selection or select next candidate |
| `<Tab>` | base on `auto-completion-tab-key-behavior` |
| `<S-Tab>` | select previous candidate |
| `<Return>` | complete word, if word is already completed insert a carriage return |
| `<Return>` | base on `auto-completion-return-key-behavior` |
### Neosnippet
@ -112,4 +113,3 @@ call SpaceVim#layers#load('autocomplete', {
| ----------- | -------------------------------------------------------------- |
| `M-/` | Expand a snippet if text before point is a prefix of a snippet |
| `SPC i s` | List all current yasnippets for inserting |

8
syntax/HelpDescribe.vim Normal file
View File

@ -0,0 +1,8 @@
if exists("b:current_syntax")
finish
endif
let b:current_syntax = "HelpDescribe"
syntax case ignore
syn match FileName /[^:]*:\d\+:/
hi def link FileName Comment