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

Merge pull request #1 from SpaceVim/dev

Merge from base
This commit is contained in:
Jinxuan Zhu 2018-01-08 12:14:14 -05:00 committed by GitHub
commit a33a1e5775
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
48 changed files with 1655 additions and 522 deletions

View File

@ -32,7 +32,7 @@ function! s:get_list_of_PRs() abort
let prs = []
for i in range(1, 10)
let issues = List('SpaceVim','SpaceVim', i)
call extend(prs, filter(issues, 'v:val["number"] > 768 && v:val["number"] < 966'))
call extend(prs, filter(issues, 'v:val["number"] > 966 && v:val["number"] < 1203'))
endfor
return filter(prs, 'has_key(v:val, "pull_request")')
endfunction

1
.gitignore vendored
View File

@ -1,4 +1,5 @@
doc/tags
.ropeproject/
wiki/.git
*.class
.floo

View File

@ -10,7 +10,7 @@
[![Build Status](https://travis-ci.org/SpaceVim/SpaceVim.svg?branch=dev)](https://travis-ci.org/SpaceVim/SpaceVim)
[![Build status](https://ci.appveyor.com/api/projects/status/eh3t5oph70abp665/branch/dev?svg=true)](https://ci.appveyor.com/project/wsdjeg/spacevim/branch/dev)
[![codecov](https://codecov.io/gh/SpaceVim/SpaceVim/branch/dev/graph/badge.svg)](https://codecov.io/gh/SpaceVim/SpaceVim/branch/dev)
![Version](https://img.shields.io/badge/version-0.6.0--dev-FF00CC.svg)
![Version](https://img.shields.io/badge/version-0.7.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")

View File

@ -1,4 +1,4 @@
version: 0.6.0-dev.{build}
version: 0.7.0-dev.{build}
pull_requests:
do_not_increment_build_number: true
skip_tags: true

View File

@ -27,7 +27,7 @@
""
" Version of SpaceVim , this value can not be changed.
scriptencoding utf-8
let g:spacevim_version = '0.6.0-dev'
let g:spacevim_version = '0.7.0-dev'
lockvar g:spacevim_version
""
" Change the default indentation of SpaceVim. Default is 2.
@ -207,6 +207,10 @@ let g:spacevim_statusline_right_sections = ['fileformat', 'cursorpos', 'percenta
" Enable/Disable unicode symbols in statusline
let g:spacevim_statusline_unicode_symbols = 1
""
" Enable/Disable language specific leader, by default you can use `,` ket
" instead of `SPC` `l`.
let g:spacevim_enable_language_specific_leader = 1
""
" Enable/Disable display mode. Default is 0, mode will be
" displayed in statusline. To enable this feature:
" >
@ -252,7 +256,7 @@ let g:spacevim_warning_symbol = '⚠'
" >
" let g:spacevim_info_symbol = 'i'
" <
let g:spacevim_info_symbol = '🛈'
let g:spacevim_info_symbol = SpaceVim#api#import('messletters').circled_letter('i')
""
" Set the SpaceVim cursor shape in the terminal.
" >
@ -602,11 +606,11 @@ function! SpaceVim#end() abort
if !empty(g:spacevim_denite_leader)
call SpaceVim#mapping#leader#defindDeniteLeader(g:spacevim_denite_leader)
endif
call SpaceVim#mapping#g#init()
call SpaceVim#mapping#z#init()
call SpaceVim#mapping#leader#defindglobalMappings()
call SpaceVim#mapping#leader#defindKEYs()
call SpaceVim#mapping#space#init()
call SpaceVim#mapping#g#init()
call SpaceVim#mapping#z#init()
if !SpaceVim#mapping#guide#has_configuration()
let g:leaderGuide_map = {}
call SpaceVim#mapping#guide#register_prefix_descriptions('', 'g:leaderGuide_map')

View File

@ -1,7 +1,8 @@
let s:self = {}
let s:CMP = SpaceVim#api#import('vim#compatible')
if has('python')
if s:CMP.has('python')
" @vimlint(EVL103, 1, a:text)
function! s:self.encode(text) abort
py import vim
@ -116,7 +117,7 @@ endif
function! SpaceVim#api#data#base64#get()
function! SpaceVim#api#data#base64#get() abort
return deepcopy(s:self)

View File

@ -15,20 +15,20 @@ let s:file_node_extensions = {
\ 'styl' : '',
\ 'scss' : '',
\ 'htm' : '',
\ 'html' : '',
\ 'html' : '',
\ 'erb' : '',
\ 'slim' : '',
\ 'ejs' : '',
\ 'wxml' : '',
\ 'css' : '',
\ 'css' : '',
\ 'less' : '',
\ 'wxss' : '',
\ 'md' : '',
\ 'markdown' : '',
\ 'md' : '',
\ 'markdown' : '',
\ 'json' : '',
\ 'js' : '',
\ 'js' : '',
\ 'jsx' : '',
\ 'rb' : '',
\ 'rb' : '',
\ 'php' : '',
\ 'py' : '',
\ 'pyc' : '',
@ -64,7 +64,7 @@ let s:file_node_extensions = {
\ 'mli' : 'λ',
\ 'diff' : '',
\ 'db' : '',
\ 'sql' : '',
\ 'sql' : '',
\ 'dump' : '',
\ 'clj' : '',
\ 'cljc' : '',
@ -95,6 +95,7 @@ let s:file_node_extensions = {
\ 'psd' : '',
\ 'psb' : '',
\ 'ts' : '',
\ 'tsx' : '',
\ 'jl' : ''
\}

View File

@ -3,6 +3,8 @@ function! SpaceVim#api#vim#compatible#get() abort
\ 'execute' : '',
\ 'system' : '',
\ 'systemlist' : '',
\ 'version' : '',
\ 'has' : '',
\ 'globpath' : '',
\ },
\ "function('s:' . v:key)"
@ -86,4 +88,56 @@ else
endfunction
endif
if has('nvim')
function! s:version() abort
let v = api_info().version
return v.major . '.' . v.minor . '.' . v.patch
endfunction
else
function! s:version() abort
redir => l:msg
silent! execute ':version'
redir END
return s:parser(matchstr(l:msg,'\(Included\ patches:\ \)\@<=[^\n]*'))
endfunction
function! s:parser(version) abort
let v_list = split(a:version, ',')
if len(v_list) == 1
let patch = split(v_list[0], '-')[1]
let v = v:version[0:0] . '.' . v:version[2:2] . '.' . patch
else
let v = v:version[0:0] . '.' . v:version[2:2] . '(' . a:version . ')'
endif
return v
endfunction
endif
function! s:has(feature) abort
if a:feature ==# 'python'
try
py import vim
return 1
catch
return 0
endtry
elseif a:feature ==# 'python3'
try
py3 import vim
return 1
catch
return 0
endtry
elseif a:feature ==# 'pythonx'
try
pyx import vim
return 1
catch
return 0
endtry
else
return has(a:feature)
endif
endfunction
" vim:set et sw=2 cc=80:

View File

@ -4,6 +4,7 @@ let s:self._tree = {}
function! s:self._update() abort
let tabnr = tabpagenr('$')
let self._tree = {}
for i in range(1, tabnr)
let buffers = tabpagebuflist(i)
let self._tree[i] = buffers

View File

@ -77,6 +77,7 @@ function! SpaceVim#autocmds#init() abort
autocmd FocusGained * call s:reload_touchpad_status()
endif
autocmd BufWritePost *.vim call s:generate_doc()
autocmd ColorScheme * call SpaceVim#api#import('vim#highlight').hide_in_normal('EndOfBuffer')
autocmd ColorScheme gruvbox call s:fix_gruvbox()
autocmd VimEnter * call SpaceVim#autocmds#VimEnter()
autocmd User RooterChDir call SpaceVim#plugins#projectmanager#RootchandgeCallback()

View File

@ -1,3 +1,5 @@
let s:CMP = SpaceVim#api#import('vim#compatible')
function! SpaceVim#issue#report() abort
call s:open()
endfunction
@ -18,8 +20,8 @@ function! s:template() abort
\ '## Environment Information',
\ '',
\ '- OS:' . SpaceVim#api#import('system').name(),
\ '- vim version:' . (has('nvim') ? '' : v:version),
\ '- neovim version:' . (has('nvim') ? v:version : ''),
\ '- vim version:' . (has('nvim') ? '' : s:CMP.version()),
\ '- neovim version:' . (has('nvim') ? s:CMP.version() : ''),
\ '',
\ '## The reproduce ways from Vim starting (Required!)',
\ '',

View File

@ -5,6 +5,7 @@
let s:SIG = SpaceVim#api#import('vim#signatures')
let s:STRING = SpaceVim#api#import('data#string')
function! SpaceVim#layers#checkers#plugins() abort
let plugins = []
@ -19,6 +20,14 @@ function! SpaceVim#layers#checkers#plugins() abort
return plugins
endfunction
let s:last_echoed_error = has('timers')
function! SpaceVim#layers#checkers#set_variable(var) abort
let s:show_cursor_error = get(a:var, 'show_cursor_error', 1)
endfunction
function! SpaceVim#layers#checkers#config() abort
let g:neomake_cursormoved_delay = get(g:, 'neomake_cursormoved_delay', 300)
@ -40,13 +49,15 @@ function! SpaceVim#layers#checkers#config() abort
call SpaceVim#mapping#space#def('nnoremap', ['e', '.'], 'call call('
\ . string(s:_function('s:error_transient_state')) . ', [])',
\ 'error-transient-state', 1)
call SpaceVim#mapping#space#def('nnoremap', ['t', 's'], 'call call('
\ . string(s:_function('s:toggle_syntax_checker')) . ', [])',
\ 'toggle syntax checker', 1)
augroup SpaceVim_layer_checker
autocmd!
if g:spacevim_enable_neomake
autocmd User NeomakeFinished nested
\ let &l:statusline = SpaceVim#layers#core#statusline#get(1)
if s:last_echoed_error
" when move cursor, the error message will be shown below current line
" after a delay
autocmd CursorMoved * call <SID>neomake_cursor_move_delay()
@ -60,6 +71,7 @@ function! SpaceVim#layers#checkers#config() abort
else
autocmd InsertEnter,WinLeave * call <SID>neomake_signatures_clear()
endif
endif
elseif g:spacevim_enable_ale
autocmd User ALELint
\ let &l:statusline = SpaceVim#layers#core#statusline#get(1)
@ -117,6 +129,12 @@ function! s:verify_syntax_setup() abort
endif
endfunction
function! s:toggle_syntax_checker() abort
call SpaceVim#layers#core#statusline#toggle_section('syntax checking')
call SpaceVim#layers#core#statusline#toggle_mode('syntax-checking')
verbose NeomakeToggle
endfunction
function! s:error_transient_state() abort
if g:spacevim_enable_neomake
let num_errors = neomake#statusline#LoclistCounts()

View File

@ -93,8 +93,7 @@ function! SpaceVim#layers#core#banner#config() abort
\ ' ▀▀▀▀▀▀▀▀▀▀▀ ▀ ▀ ▀ ▀▀▀▀▀▀▀▀▀▀▀ ▀▀▀▀▀▀▀▀▀▀▀ ▀ ▀▀▀▀▀▀▀▀▀▀▀ ▀ ▀ ',
\ ' ',
\ ' version : ' . g:spacevim_version . ' by : spacevim.org',
\ '',
\ ],
\ '', ],
\ [
\ '',
\ '',
@ -249,6 +248,140 @@ function! SpaceVim#layers#core#banner#config() abort
\ ' version : ' . g:spacevim_version . ' by : spacevim.org',
\ '',
\ ],
\ [
\ '',
\ '',
\ ' _____ __ ___ ',
\ ' / ____| \ \ / (_) ',
\ ' | (___ _ __ __ _ ___ __\ \ / / _ _ __ ___ ',
\ ' \___ \| \`_ \ / _` |/ __/ _ \ \/ / | | `_ ` _ \ ',
\ ' ____) | |_) | (_| | (_| __/\ / | | | | | | | ',
\ ' |_____/| .__/ \__,_|\___\___| \/ |_|_| |_| |_| ',
\ ' | | ',
\ ' |_| ',
\ '',
\ ' version : ' . g:spacevim_version . ' by : spacevim.org',
\ '',
\ ],
\ [
\ '',
\ '',
\ ' # # ### # # ### ##### ###### ####### ##### ####### ',
\ ' # # # ## ## # # # # # # # # # ',
\ ' # # # # # # # # # # # # # # ',
\ ' # # # # # # # ##### ###### ##### ##### # ',
\ ' # # # # # # # # # # # # ',
\ ' # # # # # # # # # # # # # # ',
\ ' # ### # # ### ##### ###### ####### ##### # ',
\ '',
\ ' version : ' . g:spacevim_version . ' by : spacevim.org',
\ '',
\ ],
\ [
\ '',
\ '',
\ ' VVVVVVVV VVVVVVVVIIIIIIIIIIMMMMMMMM MMMMMMMM ',
\ ' V::::::V V::::::VI::::::::IM:::::::M M:::::::M ',
\ ' V::::::V V::::::VI::::::::IM::::::::M M::::::::M ',
\ ' V::::::V V::::::VII::::::IIM:::::::::M M:::::::::M ',
\ ' V:::::V V:::::V I::::I M::::::::::M M::::::::::M ',
\ ' V:::::V V:::::V I::::I M:::::::::::M M:::::::::::M ',
\ ' V:::::V V:::::V I::::I M:::::::M::::M M::::M:::::::M ',
\ ' V:::::V V:::::V I::::I M::::::M M::::M M::::M M::::::M ',
\ ' V:::::V V:::::V I::::I M::::::M M::::M::::M M::::::M ',
\ ' V:::::V V:::::V I::::I M::::::M M:::::::M M::::::M ',
\ ' V:::::V:::::V I::::I M::::::M M:::::M M::::::M ',
\ ' V:::::::::V I::::I M::::::M MMMMM M::::::M ',
\ ' V:::::::V II::::::IIM::::::M M::::::M ',
\ ' V:::::V I::::::::IM::::::M M::::::M ',
\ ' V:::V I::::::::IM::::::M M::::::M ',
\ ' VVV IIIIIIIIIIMMMMMMMM MMMMMMMM ',
\ '',
\ ' version : ' . g:spacevim_version . ' by : spacevim.org',
\ '',
\ ],
\ [
\ '',
\ '',
\ ' _ _ _____ ______ _____ _ ______ _______ _ _______ ',
\ ' | | | (_____) ___ \ (_____) | | (____ \(_______) | | (_______) ',
\ ' | | | | _ | | _ | | _ \ \ ____) )_____ \ \ _ ',
\ ' \ \/ / | | | || || | | | \ \ | __ (| ___) \ \| | ',
\ ' \ / _| |_| || || | _| |_ _____) ) | |__) ) |_____ _____) ) |_____ ',
\ ' \/ (_____)_||_||_| (_____|______/ |______/|_______|______/ \______) ',
\ '',
\ ' version : ' . g:spacevim_version . ' by : spacevim.org',
\ '',
\ ],
\ [
\ '',
\ '',
\ ' .##.....##.####.........########.##.....##.########.########..########...#### ',
\ ' .##.....##..##.............##....##.....##.##.......##.....##.##.........#### ',
\ ' .##.....##..##.............##....##.....##.##.......##.....##.##.........#### ',
\ ' .#########..##...####......##....#########.######...########..######......##. ',
\ ' .##.....##..##...####......##....##.....##.##.......##...##...##............. ',
\ ' .##.....##..##....##.......##....##.....##.##.......##....##..##.........#### ',
\ ' .##.....##.####..##........##....##.....##.########.##.....##.########...#### ',
\ '',
\ ' version : ' . g:spacevim_version . ' by : spacevim.org',
\ '',
\ ],
\ [
\ '',
\ '',
\ ' __ __ __ __ __ __ __ __ ________ ',
\ ' / | / |/ | / |/ |/ | / \ / |/ | ',
\ ' $$ | $$ |$$/ _____ ____ $$ |$$/ $$ | __ ______ _______ $$ \ /$$ |$$$$$$$$/ ',
\ ' $$ | $$ |/ |/ \/ \ $$ |/ |$$ | / | / \ / | $$$ \ /$$$ |$$ |__ ',
\ ' $$ \ /$$/ $$ |$$$$$$ $$$$ | $$ |$$ |$$ |_/$$/ /$$$$$$ |/$$$$$$$/ $$$$ /$$$$ |$$ | ',
\ ' $$ /$$/ $$ |$$ | $$ | $$ | $$ |$$ |$$ $$< $$ $$ |$$ \ $$ $$ $$/$$ |$$$$$/ ',
\ ' $$ $$/ $$ |$$ | $$ | $$ | $$ |$$ |$$$$$$ \ $$$$$$$$/ $$$$$$ | $$ |$$$/ $$ |$$ |_____ ',
\ ' $$$/ $$ |$$ | $$ | $$ | $$ |$$ |$$ | $$ |$$ |/ $$/ $$ | $/ $$ |$$ | ',
\ ' $/ $$/ $$/ $$/ $$/ $$/ $$/ $$/ $$/ $$$$$$$/ $$$$$$$/ $$/ $$/ $$$$$$$$/ ',
\ '',
\ ' version : ' . g:spacevim_version . ' by : spacevim.org',
\ '',
\ ],
\ [
\ '',
\ '',
\ ' _____ __ __ ___ __ __ ___ ___ ___ __ __ ___ __ __ ____ __ __ ____ ___ ___ ',
\ ' / ___/| | | / \ | |__| | | | | / _] | | | / \ | | || \ | | || || | | ',
\ ' ( \_ | | || || | | | | _ _ | / [_ | | || || | || D ) | | | | | | _ _ | ',
\ ' \__ || _ || O || | | | | \_/ || _] | ~ || O || | || / | | | | | | \_/ | ',
\ ' / \ || | || || ` ` | | | || [_ |___, || || : || \ | : | | | | | | ',
\ ' \ || | || | \ / | | || | | || || || . \ \ / | | | | | ',
\ ' \___||__|__| \___/ \_/\_/ |___|___||_____| |____/ \___/ \__,_||__|\_| \_/ |____||___|___| ',
\ '',
\ ' version : ' . g:spacevim_version . ' by : spacevim.org',
\ '',
\ ],
\ [
\ '',
\ '',
\ ' ███████╗██╗ ██╗ ██████╗ ██╗ ██╗ ███╗ ███╗███████╗ ██╗ ██╗ ██████╗ ██╗ ██╗██████╗ ██╗ ██╗██╗███╗ ███╗ ',
\ ' ██╔════╝██║ ██║██╔═══██╗██║ ██║ ████╗ ████║██╔════╝ ╚██╗ ██╔╝██╔═══██╗██║ ██║██╔══██╗ ██║ ██║██║████╗ ████║ ',
\ ' ███████╗███████║██║ ██║██║ █╗ ██║ ██╔████╔██║█████╗ ╚████╔╝ ██║ ██║██║ ██║██████╔╝ ██║ ██║██║██╔████╔██║ ',
\ ' ╚════██║██╔══██║██║ ██║██║███╗██║ ██║╚██╔╝██║██╔══╝ ╚██╔╝ ██║ ██║██║ ██║██╔══██╗ ╚██╗ ██╔╝██║██║╚██╔╝██║ ',
\ ' ███████║██║ ██║╚██████╔╝╚███╔███╔╝ ██║ ╚═╝ ██║███████╗ ██║ ╚██████╔╝╚██████╔╝██║ ██║ ╚████╔╝ ██║██║ ╚═╝ ██║ ',
\ ' ╚══════╝╚═╝ ╚═╝ ╚═════╝ ╚══╝╚══╝ ╚═╝ ╚═╝╚══════╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝ ╚═══╝ ╚═╝╚═╝ ╚═╝ ',
\ '',
\ ' version : ' . g:spacevim_version . ' by : spacevim.org',
\ '',
\ ],
\ [
\ '',
\ '',
\ ' . .--.--. . .--. --.--.---..---. . ..---. ',
\ ' \ / | |\ /| | ) | | | |\ /|| ',
\ ' \ / | | \/ | o |--: | | |--- | \/ ||--- ',
\ ' \ / | | | | ) | | | | || ',
\ ' ` --`--` ` o `--` --`-- ` `---` ` ``---` ',
\ '',
\ ' version : ' . g:spacevim_version . ' by : spacevim.org',
\ '',
\ ],
\ ]
endfunction

View File

@ -32,7 +32,13 @@ let s:i_separators = {
\ 'bar' : ["|", "|"],
\ 'nil' : ['', ''],
\ }
let s:loaded_modes = ['syntax-checking']
let s:loaded_modes = []
if index(g:spacevim_plugin_groups, 'checkers') != -1
call add(s:loaded_modes, 'syntax-checking')
endif
if &cc ==# '80'
call add(s:loaded_modes, 'fill-column-indicator')
endif
let s:modes = {
\ 'center-cursor': {
\ 'icon' : '⊝',

View File

@ -48,7 +48,7 @@ function! s:tabname(id) abort
if g:spacevim_enable_tabline_filetype_icon
let icon = s:file.fticon(fn)
if !empty(icon)
let fn = icon . ' ' . fn
let fn = fn . ' ' . icon
endif
endif
if empty(fn)
@ -109,7 +109,7 @@ function! SpaceVim#layers#core#tabline#get() abort
if g:spacevim_enable_tabline_filetype_icon
let icon = s:file.fticon(name)
if !empty(icon)
let name = icon . ' ' . name
let name = name . ' ' . icon
endif
endif
let t .= id . ' ' . name
@ -174,7 +174,7 @@ function! SpaceVim#layers#core#tabline#get() abort
if g:spacevim_enable_tabline_filetype_icon
let icon = s:file.fticon(name)
if !empty(icon)
let name = icon . ' ' . name
let name = name . ' ' . icon
endif
endif
let t .= id . ' ' . name

View File

@ -0,0 +1,21 @@
function! SpaceVim#layers#cscope#plugins() abort
let plugins = [
\ ['SpaceVim/cscope.vim'],
\ ]
return plugins
endfunction
function! SpaceVim#layers#cscope#config() abort
let g:_spacevim_mappings_space.m.c = {'name' : '+cscope'}
call SpaceVim#mapping#space#def('nnoremap', ['m', 'c', 'c'], 'Unite cscope/functions_called_by', 'find functions called by this function', 1)
call SpaceVim#mapping#space#def('nnoremap', ['m', 'c', 'C'], 'Unite cscope/functions_calling', 'find functions calling this function', 1)
call SpaceVim#mapping#space#def('nnoremap', ['m', 'c', 'd'], 'Unite cscope/global_definition', 'find global definition of a symbol', 1)
call SpaceVim#mapping#space#def('nnoremap', ['m', 'c', 'r'], 'Unite cscope/find_this_symbol', 'find references of a symbol', 1)
call SpaceVim#mapping#space#def('nnoremap', ['m', 'c', 'f'], 'Unite cscope/find_file', 'find files', 1)
call SpaceVim#mapping#space#def('nnoremap', ['m', 'c', 'F'], 'Unite cscope/including_this_file', 'find files including this file', 1)
call SpaceVim#mapping#space#def('nnoremap', ['m', 'c', 'e'], 'Unite cscope/egrep_pattern', 'Find this egrep pattern', 1)
call SpaceVim#mapping#space#def('nnoremap', ['m', 'c', 't'], 'Unite cscope/text_string', 'find this text string', 1)
call SpaceVim#mapping#space#def('nnoremap', ['m', 'c', '='], 'Unite cscope/assignments_to_symbol', 'find assignments to this symbol', 1)
call SpaceVim#mapping#space#def('nnoremap', ['m', 'c', 'i'], 'call CscopeUpdateDB()', 'create cscope index', 1)
endfunction

View File

@ -119,10 +119,10 @@ function! SpaceVim#layers#default#config() abort
call SpaceVim#mapping#space#def('nnoremap', ['b', '.'], 'call call('
\ . string(s:_function('s:buffer_transient_state')) . ', [])',
\ 'buffer transient state', 1)
call SpaceVim#mapping#space#def('nnoremap', ['b', 'd'], 'call SpaceVim#mapping#close_current_buffer()', 'kill-this-buffer', 1)
call SpaceVim#mapping#space#def('nnoremap', ['b', 'd'], 'call SpaceVim#mapping#close_current_buffer()', 'kill this buffer', 1)
call SpaceVim#mapping#space#def('nnoremap', ['b', 'D'],
\ 'call SpaceVim#mapping#kill_visible_buffer_choosewin()',
\ 'kill-this-buffer', 1)
\ 'kill the buffer by selecting', 1)
call SpaceVim#mapping#space#def('nnoremap', ['b', '<C-d>'], 'call SpaceVim#mapping#clearBuffers()', 'kill-other-buffers', 1)
call SpaceVim#mapping#space#def('nnoremap', ['b', 'c'], 'call SpaceVim#mapping#clear_saved_buffers()', 'clear all saved buffers', 1)
call SpaceVim#mapping#space#def('nnoremap', ['b', 'e'], 'call call('

View File

@ -45,6 +45,7 @@ let s:clang_executable = 'clang'
let s:SYSTEM = SpaceVim#api#import('system')
function! SpaceVim#layers#lang#c#plugins() abort
let plugins = []
if !SpaceVim#layers#lsp#check_filetype('c') && !SpaceVim#layers#lsp#check_filetype('cpp')
if g:spacevim_autocomplete_method ==# 'deoplete'
if s:use_libclang
call add(plugins, ['zchee/deoplete-clang'])
@ -59,6 +60,7 @@ function! SpaceVim#layers#lang#c#plugins() abort
else
call add(plugins, ['Rip-Rip/clang_complete'])
endif
endif
if has('nvim')
if has('python3')
call add(plugins, ['arakashic/chromatica.nvim', { 'merged' : 0}])
@ -100,6 +102,11 @@ function! SpaceVim#layers#lang#c#set_variable(var) abort
let g:neomake_cpp_enabled_makers = ['clang']
let s:clang_executable = a:var.clang_executable
endif
if has_key(a:var, 'libclang_path')
let g:deoplete#sources#clang#libclang_path = a:var.libclang_path
let g:chromatica#libclang_path = a:var.libclang_path
endif
endfunction
function! s:language_specified_mappings() abort

View File

@ -0,0 +1,42 @@
function! SpaceVim#layers#lang#dart#plugins() abort
let plugins = []
call add(plugins, ['dart-lang/dart-vim-plugin', {'merged' : 0}])
if !SpaceVim#layers#lsp#check_filetype('dart')
call add(plugins, ['SpaceVim/deoplete-dart', {'merged' : 0}])
endif
return plugins
endfunction
function! SpaceVim#layers#lang#dart#config() abort
call SpaceVim#plugins#runner#reg_runner('dart', 'dart %s')
call SpaceVim#mapping#space#regesit_lang_mappings('dart', funcref('s:language_specified_mappings'))
call SpaceVim#plugins#repl#reg('dart', ['pub', 'global', 'run', 'dart_repl'])
endfunction
function! s:language_specified_mappings() abort
call SpaceVim#mapping#space#langSPC('nmap', ['l','r'],
\ 'call SpaceVim#plugins#runner#open()',
\ 'execute current file', 1)
let g:_spacevim_mappings_space.l.s = {'name' : '+Send'}
call SpaceVim#mapping#space#langSPC('nmap', ['l','s', 'i'],
\ 'call SpaceVim#plugins#repl#start("dart")',
\ 'start REPL process', 1)
call SpaceVim#mapping#space#langSPC('nmap', ['l','s', 'l'],
\ 'call SpaceVim#plugins#repl#send("line")',
\ 'send line and keep code buffer focused', 1)
call SpaceVim#mapping#space#langSPC('nmap', ['l','s', 'b'],
\ 'call SpaceVim#plugins#repl#send("buffer")',
\ 'send buffer and keep code buffer focused', 1)
call SpaceVim#mapping#space#langSPC('nmap', ['l','s', 's'],
\ 'call SpaceVim#plugins#repl#send("selection")',
\ 'send selection and keep code buffer focused', 1)
if SpaceVim#layers#lsp#check_filetype('dart')
nnoremap <silent><buffer> K :call SpaceVim#lsp#show_doc()<CR>
call SpaceVim#mapping#space#langSPC('nnoremap', ['l', 'd'],
\ 'call SpaceVim#lsp#show_doc()', 'show_document', 1)
call SpaceVim#mapping#space#langSPC('nnoremap', ['l', 'e'],
\ 'call SpaceVim#lsp#rename()', 'rename symbol', 1)
endif
endfunction

View File

@ -14,7 +14,6 @@ function! SpaceVim#layers#lang#markdown#set_variable(var) abort
let s:md_listItemIndent = get(a:var, 'listItemIndent', s:md_listItemIndent)
let s:md_enableWcwidth = get(a:var, 'enableWcwidth', s:md_enableWcwidth)
let s:md_listItemChar = get(a:var, 'listItemChar', s:md_listItemChar)
let g:vmt_list_item_char = s:md_listItemChar
endfunction
function! SpaceVim#layers#lang#markdown#plugins() abort
@ -28,6 +27,7 @@ function! SpaceVim#layers#lang#markdown#plugins() abort
endfunction
function! SpaceVim#layers#lang#markdown#config() abort
let g:vmt_list_item_char = s:md_listItemChar
let g:markdown_minlines = 100
let g:markdown_syntax_conceal = 0
let g:markdown_enable_mappings = 0

View File

@ -78,6 +78,7 @@ let s:lsp_servers = {
\ 'cpp' : ['clangd'],
\ 'objc' : ['clangd'],
\ 'objcpp' : ['clangd'],
\ 'dart' : ['dart_language_server'],
\ 'go' : ['go-langserver', '-mode', 'stdio'],
\ 'rust' : ['rustup', 'run', 'nightly', 'rls'],
\ 'python' : ['pyls'],

View File

@ -2,7 +2,6 @@ function! SpaceVim#layers#tools#plugins() abort
return [
\ ['tpope/vim-scriptease'],
\ ['mbbill/fencview', { 'on_cmd' : 'FencAutoDetect'}],
\ ['SpaceVim/cscope.vim'],
\ ['wsdjeg/vim-cheat', { 'on_cmd' : 'Cheat'}],
\ ['wsdjeg/SourceCounter.vim', { 'on_cmd' : 'SourceCounter'}],
\ ['junegunn/goyo.vim', { 'on_cmd' : 'Goyo',

View File

@ -70,9 +70,6 @@ function! SpaceVim#layers#ui#config() abort
call SpaceVim#mapping#space#def('nnoremap', ['T', '~'], 'call call('
\ . string(s:_function('s:toggle_end_of_buffer')) . ', [])',
\ 'display ~ in the fringe on empty lines', 1)
call SpaceVim#mapping#space#def('nnoremap', ['t', 's'], 'call call('
\ . string(s:_function('s:toggle_syntax_checker')) . ', [])',
\ 'toggle syntax checker', 1)
call SpaceVim#mapping#space#def('nnoremap', ['t', 'S'], 'call call('
\ . string(s:_function('s:toggle_spell_check')) . ', [])',
\ 'toggle spell checker', 1)
@ -116,7 +113,11 @@ function! s:toggle_tool_bar() abort
endif
endfunction
if &cc ==# '80'
let s:ccflag = 1
else
let s:ccflag = 0
endif
function! s:toggle_colorcolumn() abort
if !s:ccflag
set cc=80
@ -196,12 +197,6 @@ function! s:toggle_win_fringe() abort
endif
endfunction
function! s:toggle_syntax_checker() abort
call SpaceVim#layers#core#statusline#toggle_section('syntax checking')
call SpaceVim#layers#core#statusline#toggle_mode('syntax-checking')
verbose NeomakeToggle
endfunction
function! s:toggle_spell_check() abort
if &l:spell
let &l:spell = 0

View File

@ -432,11 +432,13 @@ function! s:updateStatusline() abort
let gname = ' - ' . gname[1:]
let gname = substitute(gname,' ', '\\ ', 'g')
endif
let keys = get(s:, 'prefix_key_inp', '')
let keys = substitute(keys, '\', '\\\', 'g')
exe 'setlocal statusline=%#LeaderGuiderPrompt#\ Guide:\ ' .
\ '%#LeaderGuiderSep1#' . s:lsep .
\ '%#LeaderGuiderName#\ ' .
\ SpaceVim#mapping#leader#getName(s:prefix_key)
\ . get(s:, 'prefix_key_inp', '') . gname
\ . keys . gname
\ . '\ %#LeaderGuiderSep2#' . s:lsep . '%#LeaderGuiderFill#'
\ . s:guide_help_msg()
endfunction
@ -595,6 +597,7 @@ if get(g:, 'mapleader', '\') == ' '
else
call SpaceVim#mapping#guide#register_prefix_descriptions('\',
\ 'g:_spacevim_mappings')
call SpaceVim#plugins#help#regist_root({'<leader>' : g:_spacevim_mappings})
call SpaceVim#mapping#guide#register_prefix_descriptions(' ',
\ 'g:_spacevim_mappings_space')
call SpaceVim#plugins#help#regist_root({'SPC' : g:_spacevim_mappings_space})
@ -602,18 +605,27 @@ endif
call SpaceVim#mapping#guide#register_prefix_descriptions(
\ g:spacevim_unite_leader,
\ 'g:_spacevim_mappings_unite')
call SpaceVim#plugins#help#regist_root({'[unite]' : g:_spacevim_mappings_unite})
call SpaceVim#mapping#guide#register_prefix_descriptions(
\ g:spacevim_denite_leader,
\ 'g:_spacevim_mappings_denite')
call SpaceVim#plugins#help#regist_root({'[denite]' : g:_spacevim_mappings_denite})
call SpaceVim#mapping#guide#register_prefix_descriptions(
\ g:spacevim_windows_leader,
\ 'g:_spacevim_mappings_windows')
call SpaceVim#plugins#help#regist_root({'[WIN]' : g:_spacevim_mappings_windows})
call SpaceVim#mapping#guide#register_prefix_descriptions(
\ '[KEYs]',
\ 'g:_spacevim_mappings_prefixs')
call SpaceVim#mapping#guide#register_prefix_descriptions(
\ 'g',
\ 'g:_spacevim_mappings_g')
call SpaceVim#plugins#help#regist_root({'[g]' : g:_spacevim_mappings_g})
call SpaceVim#mapping#guide#register_prefix_descriptions(
\ 'z',
\ 'g:_spacevim_mappings_z')
call SpaceVim#plugins#help#regist_root({'[z]' : g:_spacevim_mappings_z})
let [s:lsep, s:rsep] = SpaceVim#layers#core#statusline#rsep()
let &cpo = s:save_cpo
unlet s:save_cpo

View File

@ -6,6 +6,8 @@
" License: MIT license
"=============================================================================
let s:file = expand('<sfile>:~')
function! SpaceVim#mapping#leader#defindglobalMappings() abort
if g:spacevim_enable_insert_leader
inoremap <silent> <Leader><Tab> <C-r>=MyLeaderTabfunc()<CR>
@ -119,44 +121,129 @@ function! SpaceVim#mapping#leader#defindglobalMappings() abort
\ 'call SpaceVim#mapping#vertical_split_previous_buffer()')
endfunction
let s:lnum = expand('<slnum>') + 3
function! SpaceVim#mapping#leader#defindWindowsLeader(key) abort
if !empty(a:key)
call zvim#util#defineMap('nnoremap', '[Window]', '<Nop>',
\ 'Defind window prefix', 'normal [Window]')
call zvim#util#defineMap('nmap' , a:key, '[Window]',
\ 'Use ' . a:key . ' as window prefix', 'normal ' . a:key)
call zvim#util#defineMap('nnoremap <silent>', '[Window]p',
\ ':<C-u>vsplit<CR>:wincmd w<CR>',
\ 'vsplit vertically,switch to next window','vsplit | wincmd w')
call zvim#util#defineMap('nnoremap <silent>', '[Window]v',
\ ':<C-u>split<CR>', 'split window', 'split')
call zvim#util#defineMap('nnoremap <silent>', '[Window]g',
\ ':<C-u>vsplit<CR>', 'vsplit window', 'vsplit')
call zvim#util#defineMap('nnoremap <silent>', '[Window]t',
\ ':<C-u>tabnew<CR>', 'Create new tab', 'tabnew')
call zvim#util#defineMap('nnoremap <silent>', '[Window]o',
\ ':<C-u>only<CR>', 'Close other windows', 'only')
call zvim#util#defineMap('nnoremap <silent>', '[Window]x',
\ ':<C-u>call zvim#util#BufferEmpty()<CR>',
\ 'Empty current buffer', 'call zvim#util#BufferEmpty()')
call zvim#util#defineMap('nnoremap <silent>', '[Window]\',
\ ':<C-u>b#<CR>', 'Switch to the last buffer','b#')
call zvim#util#defineMap('nnoremap <silent>', '[Window]q',
\ ':<C-u>close<CR>', 'Close current windows','close')
call zvim#util#defineMap('nnoremap <silent>', '[Window]Q',
\ ':<C-u>call SpaceVim#mapping#close_current_buffer()<CR>',
exe 'nnoremap <silent><nowait> [Window] :<c-u>LeaderGuide "' .
\ a:key . '"<CR>'
exe 'nmap ' .a:key . ' [Window]'
let g:_spacevim_mappings_windows = {}
nnoremap <silent> [Window]p
\ :<C-u>vsplit<CR>:wincmd w<CR>
let lnum = expand('<slnum>') + s:lnum - 4
let g:_spacevim_mappings_windows.p = ['vsplit | wincmd w',
\ 'vsplit vertically,switch to next window',
\ [
\ '[WIN p ] is to split windows vertically, switch to the new window',
\ '',
\ 'Definition: ' . s:file . ':' . lnum,
\ ]
\ ]
nnoremap <silent> [Window]v
\ :<C-u>split<CR>
let lnum = expand('<slnum>') + s:lnum - 4
let g:_spacevim_mappings_windows.v = ['split',
\ 'split window',
\ [
\ '[WIN v] is to split windows, switch to the new window',
\ '',
\ 'Definition: ' . s:file . ':' . lnum,
\ ]
\ ]
nnoremap <silent> [Window]g
\ :<C-u>vsplit<CR>
let lnum = expand('<slnum>') + s:lnum - 4
let g:_spacevim_mappings_windows.g = ['vsplit',
\ 'vsplit window',
\ [
\ '[WIN g] is to split windows vertically, switch to the new window',
\ '',
\ 'Definition: ' . s:file . ':' . lnum,
\ ]
\ ]
nnoremap <silent> [Window]t
\ :<C-u>tabnew<CR>
let lnum = expand('<slnum>') + s:lnum - 4
let g:_spacevim_mappings_windows.t = ['tabnew',
\ 'create new tab',
\ [
\ '[WIN t] is to create new tab',
\ '',
\ 'Definition: ' . s:file . ':' . lnum,
\ ]
\ ]
nnoremap <silent> [Window]o
\ :<C-u>only<CR>
let lnum = expand('<slnum>') + s:lnum - 4
let g:_spacevim_mappings_windows.o = ['only',
\ 'Close other windows',
\ [
\ '[WIN o] is to close all other windows',
\ '',
\ 'Definition: ' . s:file . ':' . lnum,
\ ]
\ ]
nnoremap <silent> [Window]x
\ :<C-u>call zvim#util#BufferEmpty()<CR>
let lnum = expand('<slnum>') + s:lnum - 4
let g:_spacevim_mappings_windows.x = ['call zvim#util#BufferEmpty()',
\ 'Empty current buffer',
\ [
\ '[WIN x] is to empty current buffer',
\ '',
\ 'Definition: ' . s:file . ':' . lnum,
\ ]
\ ]
nnoremap <silent> [Window]\
\ :<C-u>b#<CR>
let lnum = expand('<slnum>') + s:lnum - 4
let g:_spacevim_mappings_windows['\'] = ['b#',
\ 'Switch to the last buffer',
\ [
\ '[WIN \] is to switch to the last buffer',
\ '',
\ 'Definition: ' . s:file . ':' . lnum,
\ ]
\ ]
nnoremap <silent> [Window]Q
\ :<C-u>close<CR>
let lnum = expand('<slnum>') + s:lnum - 4
let g:_spacevim_mappings_windows.Q = ['close',
\ 'Close current windows',
\ [
\ '[WIN Q] is to close current windows',
\ '',
\ 'Definition: ' . s:file . ':' . lnum,
\ ]
\ ]
nnoremap <silent> [Window]q
\ :<C-u>call SpaceVim#mapping#close_current_buffer()<CR>
let lnum = expand('<slnum>') + s:lnum - 4
let g:_spacevim_mappings_windows.q = ['call SpaceVim#mapping#close_current_buffer()',
\ 'delete current windows',
\ 'call SpaceVim#mapping#close_current_buffer()')
call zvim#util#defineMap('nnoremap <silent>', '[Window]c',
\ ':<C-u>call SpaceVim#mapping#clearBuffers()<CR>',
\ 'Clear all the buffers', 'call SpaceVim#mapping#clearBuffers()')
\ [
\ '[WIN q] is to delete current windows',
\ '',
\ 'Definition: ' . s:file . ':' . lnum,
\ ]
\ ]
nnoremap <silent> [Window]c
\ :<C-u>call SpaceVim#mapping#clearBuffers()<CR>
let lnum = expand('<slnum>') + s:lnum - 4
let g:_spacevim_mappings_windows.c = ['call SpaceVim#mapping#clearBuffers()',
\ 'Clear all the buffers',
\ [
\ '[WIN c] is to clear all the buffers',
\ '',
\ 'Definition: ' . s:file . ':' . lnum,
\ ]
\ ]
endif
endfunction
function! SpaceVim#mapping#leader#defindDeniteLeader(key) abort
if !empty(a:key)
if a:key == 'F'
if a:key ==# 'F'
nnoremap <leader>F F
endif
exe 'nnoremap <silent><nowait> [denite] :<c-u>LeaderGuide "' .
@ -197,9 +284,10 @@ function! SpaceVim#mapping#leader#defindDeniteLeader(key) abort
endif
endfunction
let s:unite_lnum = expand('<slnum>') + 3
function! SpaceVim#mapping#leader#defindUniteLeader(key) abort
if !empty(a:key)
if a:key == 'f'
if a:key ==# 'f'
nnoremap <leader>f f
endif
" The prefix key.
@ -209,87 +297,282 @@ function! SpaceVim#mapping#leader#defindUniteLeader(key) abort
let g:_spacevim_mappings_unite = {}
nnoremap <silent> [unite]r
\ :<C-u>Unite -buffer-name=resume resume<CR>
let lnum = expand('<slnum>') + s:unite_lnum - 4
let g:_spacevim_mappings_unite.r = ['Unite -buffer-name=resume resume',
\ 'resume unite window']
\ 'resume unite window',
\ [
\ '[UNITE r ] is to resume unite window',
\ '',
\ 'Definition: ' . s:file . ':' . lnum,
\ ]
\ ]
if has('nvim')
nnoremap <silent> [unite]f :<C-u>Unite file_rec/neovim<cr>
let g:_spacevim_mappings_unite.f = ['Unite file_rec/neovim', 'file_rec']
nnoremap <silent> [unite]f
\ :<C-u>Unite file_rec/neovim<cr>
let lnum = expand('<slnum>') + s:unite_lnum - 4
let g:_spacevim_mappings_unite.f = ['Unite file_rec/neovim',
\ 'file_rec',
\ [
\ '[UNITE f ] is to open unite file_rec source',
\ '',
\ 'Definition: ' . s:file . ':' . lnum,
\ ]
\ ]
else
nnoremap <silent> [unite]f :<C-u>Unite file_rec/async<cr>
let g:_spacevim_mappings_unite.f = ['Unite file_rec/async', 'file_rec']
nnoremap <silent> [unite]f
\ :<C-u>Unite file_rec/async<cr>
let lnum = expand('<slnum>') + s:unite_lnum - 4
let g:_spacevim_mappings_unite.f = ['Unite file_rec/async',
\ 'file_rec',
\ [
\ '[UNITE f ] is to open unite file_rec source',
\ '',
\ 'Definition: ' . s:file . ':' . lnum,
\ ]
\ ]
endif
nnoremap <silent> [unite]i :<C-u>Unite file_rec/git<cr>
let g:_spacevim_mappings_unite.i = ['Unite file_rec/git', 'git files']
nnoremap <silent> [unite]g :<C-u>Unite grep<cr>
let g:_spacevim_mappings_unite.g = ['Unite grep', 'unite grep']
nnoremap <silent> [unite]u :<C-u>Unite source<CR>
let g:_spacevim_mappings_unite.u = ['Unite source', 'unite source']
nnoremap <silent> [unite]t :<C-u>Unite tag<CR>
let g:_spacevim_mappings_unite.t = ['Unite tag', 'unite tag']
nnoremap <silent> [unite]T :<C-u>Unite tag/include<CR>
nnoremap <silent> [unite]i
\ :<C-u>Unite file_rec/git<cr>
let lnum = expand('<slnum>') + s:unite_lnum - 4
let g:_spacevim_mappings_unite.i = ['Unite file_rec/git',
\ 'git files',
\ [
\ '[UNITE f ] is to open unite file_rec source',
\ '',
\ 'Definition: ' . s:file . ':' . lnum,
\ ]
\ ]
nnoremap <silent> [unite]g
\ :<C-u>Unite grep<cr>
let lnum = expand('<slnum>') + s:unite_lnum - 4
let g:_spacevim_mappings_unite.g = ['Unite grep',
\ 'unite grep',
\ [
\ '[UNITE g ] is to open unite grep source',
\ '',
\ 'Definition: ' . s:file . ':' . lnum,
\ ]
\ ]
nnoremap <silent> [unite]u
\ :<C-u>Unite source<CR>
let lnum = expand('<slnum>') + s:unite_lnum - 4
let g:_spacevim_mappings_unite.u = ['Unite source',
\ 'unite source',
\ [
\ '[UNITE u ] is to open unite source',
\ '',
\ 'Definition: ' . s:file . ':' . lnum,
\ ]
\ ]
nnoremap <silent> [unite]t
\ :<C-u>Unite tag<CR>
let lnum = expand('<slnum>') + s:unite_lnum - 4
let g:_spacevim_mappings_unite.t = ['Unite tag',
\ 'unite tag',
\ [
\ '[UNITE t ] is to open unite tag source',
\ '',
\ 'Definition: ' . s:file . ':' . lnum,
\ ]
\ ]
nnoremap <silent> [unite]T
\ :<C-u>Unite tag/include<CR>
let lnum = expand('<slnum>') + s:unite_lnum - 4
let g:_spacevim_mappings_unite.T = ['Unite tag/include',
\ 'unite tag/include']
nnoremap <silent> [unite]l :<C-u>Unite locationlist<CR>
\ 'unite tag/include',
\ [
\ '[UNITE T ] is to open unite tag/include source',
\ '',
\ 'Definition: ' . s:file . ':' . lnum,
\ ]
\ ]
nnoremap <silent> [unite]l
\ :<C-u>Unite locationlist<CR>
let lnum = expand('<slnum>') + s:unite_lnum - 4
let g:_spacevim_mappings_unite.l = ['Unite locationlist',
\ 'unite locationlist']
nnoremap <silent> [unite]q :<C-u>Unite quickfix<CR>
let g:_spacevim_mappings_unite.q = ['Unite quickfix', 'unite quickfix']
\ 'unite locationlist',
\ [
\ '[UNITE l ] is to open unite locationlist source',
\ '',
\ 'Definition: ' . s:file . ':' . lnum,
\ ]
\ ]
nnoremap <silent> [unite]q
\ :<C-u>Unite quickfix<CR>
let lnum = expand('<slnum>') + s:unite_lnum - 4
let g:_spacevim_mappings_unite.q = ['Unite quickfix',
\ 'unite quickfix',
\ [
\ '[UNITE q ] is to open unite quickfix source',
\ '',
\ 'Definition: ' . s:file . ':' . lnum,
\ ]
\ ]
nnoremap <silent> [unite]e :<C-u>Unite
\ -buffer-name=register register<CR>
let g:_spacevim_mappings_unite.e = ['Unite register', 'unite register']
nnoremap <silent> [unite]j :<C-u>Unite jump<CR>
let g:_spacevim_mappings_unite.j = ['Unite jump', 'unite jump']
nnoremap <silent> [unite]h :<C-u>Unite history/yank<CR>
let lnum = expand('<slnum>') + s:unite_lnum - 4
let g:_spacevim_mappings_unite.e = ['Unite register',
\ 'unite register',
\ [
\ '[UNITE l ] is to open unite locationlist source',
\ '',
\ 'Definition: ' . s:file . ':' . lnum,
\ ]
\ ]
nnoremap <silent> [unite]j
\ :<C-u>Unite jump<CR>
let lnum = expand('<slnum>') + s:unite_lnum - 4
let g:_spacevim_mappings_unite.j = ['Unite jump',
\ 'unite jump',
\ [
\ '[UNITE j ] is to open unite jump source',
\ '',
\ 'Definition: ' . s:file . ':' . lnum,
\ ]
\ ]
nnoremap <silent> [unite]h
\ :<C-u>Unite history/yank<CR>
let lnum = expand('<slnum>') + s:unite_lnum - 4
let g:_spacevim_mappings_unite.h = ['Unite history/yank',
\ 'unite history/yank']
nnoremap <silent> [unite]<C-h> :<C-u>UniteWithCursorWord help<CR>
\ 'unite history/yank',
\ [
\ '[UNITE h ] is to open unite history/yank source',
\ '',
\ 'Definition: ' . s:file . ':' . lnum,
\ ]
\ ]
nnoremap <silent> [unite]<C-h>
\ :<C-u>UniteWithCursorWord help<CR>
let lnum = expand('<slnum>') + s:unite_lnum - 4
let g:_spacevim_mappings_unite['<C-h>'] = ['UniteWithCursorWord help',
\ 'unite with cursor word help']
nnoremap <silent> [unite]s :<C-u>Unite session<CR>
let g:_spacevim_mappings_unite.s = ['Unite session', 'unite session']
\ 'unite with cursor word help',
\ [
\ '[UNITE <c-h> ] is to open unite help source for cursor word',
\ '',
\ 'Definition: ' . s:file . ':' . lnum,
\ ]
\ ]
nnoremap <silent> [unite]s
\ :<C-u>Unite session<CR>
let lnum = expand('<slnum>') + s:unite_lnum - 4
let g:_spacevim_mappings_unite.s = ['Unite session',
\ 'unite session',
\ [
\ '[UNITE s ] is to open unite session source',
\ '',
\ 'Definition: ' . s:file . ':' . lnum,
\ ]
\ ]
nnoremap <silent> [unite]o :<C-u>Unite -buffer-name=outline
\ -start-insert -auto-preview -split outline<CR>
let g:_spacevim_mappings_unite.o = ['Unite outline', 'unite outline']
let lnum = expand('<slnum>') + s:unite_lnum - 4
let g:_spacevim_mappings_unite.o = ['Unite outline',
\ 'unite outline',
\ [
\ '[UNITE o ] is to open unite outline source',
\ '',
\ 'Definition: ' . s:file . ':' . lnum,
\ ]
\ ]
" menu
nnoremap <silent> [unite]ma
\ :<C-u>Unite mapping<CR>
nnoremap <silent> [unite]me
\ :<C-u>Unite output:message<CR>
let g:_spacevim_mappings_unite.m = {'name' : 'unite menus',
\ 'a' : ['Unite mapping', 'unite mappings'],
\ 'e' : ['Unite output:message', 'unite messages']
let lnum = expand('<slnum>') + s:unite_lnum - 6
let g:_spacevim_mappings_unite.m = {'name' : '+Menus',
\ 'a' : ['Unite mapping', 'unite mappings',
\ [
\ '[UNITE m a ] is to open unite mapping menu',
\ '',
\ 'Definition: ' . s:file . ':' . lnum,
\ ]
\ ],
\ 'e' : ['Unite output:message', 'unite messages',
\ [
\ '[UNITE o ] is to open unite message menu',
\ '',
\ 'Definition: ' . s:file . ':' . (lnum + 2),
\ ]
\ ]
\ }
nnoremap <silent> [unite]c :<C-u>UniteWithCurrentDir
\ -buffer-name=files buffer bookmark file<CR>
let lnum = expand('<slnum>') + s:unite_lnum - 4
let g:_spacevim_mappings_unite.c =
\ ['UniteWithCurrentDir -buffer-name=files buffer bookmark file',
\ 'unite files in current dir']
\ 'unite files in current dir',
\ [
\ '[UNITE c ] is to open unite outline source',
\ '',
\ 'Definition: ' . s:file . ':' . lnum,
\ ]
\ ]
nnoremap <silent> [unite]b :<C-u>UniteWithBufferDir
\ -buffer-name=files -prompt=%\ buffer bookmark file<CR>
let lnum = expand('<slnum>') + s:unite_lnum - 4
let g:_spacevim_mappings_unite.b =
\ ['UniteWithBufferDir -buffer-name=files' .
\ ' buffer bookmark file',
\ 'unite files in current dir']
nnoremap <silent> [unite]n :<C-u>Unite session/new<CR>
\ 'unite files in current dir',
\ [
\ '[UNITE b ] is to open unite buffer and bookmark source with cursor',
\ 'word',
\ '',
\ 'Definition: ' . s:file . ':' . lnum,
\ ]
\ ]
nnoremap <silent> [unite]n
\ :<C-u>Unite session/new<CR>
let lnum = expand('<slnum>') + s:unite_lnum - 4
let g:_spacevim_mappings_unite.n = ['Unite session/new',
\ 'unite session/new']
nnoremap <silent> [unite]/ :Unite grep:.<cr>
\ 'unite session/new',
\ [
\ '[UNITE n ] is to create new vim session',
\ '',
\ 'Definition: ' . s:file . ':' . lnum,
\ ]
\ ]
nnoremap <silent> [unite]/
\ :Unite grep:.<cr>
let lnum = expand('<slnum>') + s:unite_lnum - 4
let g:_spacevim_mappings_unite['/'] = ['Unite grep:.',
\ 'unite grep with preview']
\ 'unite grep with preview',
\ [
\ '[UNITE / ] is to open unite grep source',
\ '',
\ 'Definition: ' . s:file . ':' . lnum,
\ ]
\ ]
nnoremap <silent> [unite]w
\ :<C-u>Unite -buffer-name=files -no-split
\ jump_point file_point buffer_tab
\ file_rec:! file file/new<CR>
let lnum = expand('<slnum>') + s:unite_lnum - 6
let g:_spacevim_mappings_unite.w= ['Unite -buffer-name=files -no-split' .
\ ' jump_point file_point buffer_tab file_rec:! file file/new',
\ 'unite all file and jump']
\ 'unite all file and jump',
\ [
\ '[UNITE w ] is to open unite jump_point file_point and buffer_tab',
\ 'source',
\ '',
\ 'Definition: ' . s:file . ':' . lnum,
\ ]
\ ]
nnoremap <silent>[unite]<Space> :Unite -silent -ignorecase -winheight=17
\ -start-insert menu:CustomKeyMaps<CR>
let lnum = expand('<slnum>') + s:unite_lnum - 4
let g:_spacevim_mappings_unite['[SPC]'] = ['Unite -silent -ignorecase' .
\ ' -winheight=17 -start-insert menu:CustomKeyMaps',
\ 'unite customkeymaps']
\ 'unite customkeymaps',
\ [
\ '[UNITE o ] is to open unite outline source',
\ '',
\ 'Definition: ' . s:file . ':' . lnum,
\ ]
\ ]
endif
endfunction
@ -304,8 +587,12 @@ function! SpaceVim#mapping#leader#getName(key) abort
return '[g]'
elseif a:key == 'z'
return '[z]'
else
elseif a:key == g:spacevim_windows_leader
return '[WIN]'
elseif a:key ==# '\'
return '<leader>'
else
return ''
endif
endfunction
@ -315,6 +602,15 @@ function! SpaceVim#mapping#leader#defindKEYs() abort
call extend(g:_spacevim_mappings_prefixs[g:spacevim_unite_leader], g:_spacevim_mappings_unite)
let g:_spacevim_mappings_prefixs[g:spacevim_denite_leader] = {'name' : '+Denite prefix'}
call extend(g:_spacevim_mappings_prefixs[g:spacevim_denite_leader], g:_spacevim_mappings_denite)
let g:_spacevim_mappings_prefixs[g:spacevim_windows_leader] = {'name' : '+Window prefix'}
call extend(g:_spacevim_mappings_prefixs[g:spacevim_windows_leader], g:_spacevim_mappings_windows)
let g:_spacevim_mappings_prefixs['g'] = {'name' : '+g prefix'}
call extend(g:_spacevim_mappings_prefixs['g'], g:_spacevim_mappings_g)
let g:_spacevim_mappings_prefixs['z'] = {'name' : '+z prefix'}
call extend(g:_spacevim_mappings_prefixs['z'], g:_spacevim_mappings_z)
let leader = get(g:, 'mapleader', '\')
let g:_spacevim_mappings_prefixs[leader] = {'name' : '+Leader prefix'}
call extend(g:_spacevim_mappings_prefixs[leader], g:_spacevim_mappings)
endfunction

View File

@ -30,6 +30,10 @@ function! SpaceVim#mapping#space#init() abort
vnoremap <silent><nowait> [SPC] :<c-u>LeaderGuideVisual " "<CR>
nmap <Space> [SPC]
vmap <Space> [SPC]
if g:spacevim_enable_language_specific_leader
nmap , [SPC]l
vmap , [SPC]l
endif
" Windows
for i in range(1, 9)
exe "call SpaceVim#mapping#space#def('nnoremap', ["
@ -272,6 +276,8 @@ function! SpaceVim#mapping#space#init() abort
call SpaceVim#mapping#space#def('nnoremap', ['s', 'g', 'G'], 'call SpaceVim#plugins#flygrep#open()',
\ 'grep on the fly', 1)
call SpaceVim#mapping#space#def('nnoremap', ['s', '/'], 'call SpaceVim#plugins#flygrep#open()',
\ 'grep on the fly', 1)
call SpaceVim#mapping#space#def('nnoremap', ['s', 'c'], 'noh',
\ 'clear search highlight', 1)

View File

@ -2,7 +2,7 @@ let s:MPT = SpaceVim#api#import('prompt')
let s:JOB = SpaceVim#api#import('job')
let s:SYS = SpaceVim#api#import('system')
let s:grepid = 0
let s:MPT._prompt.mpt = '➭ '
function! SpaceVim#plugins#flygrep#open() abort
rightbelow split __flygrep__

View File

@ -13,12 +13,40 @@ endfunction
function! SpaceVim#plugins#help#describe_key()
let definded = 1
let defined = 1
let root = s:key_describ
let prompt = 'Describe key:'
let keys = []
call s:build_mpt(prompt)
while definded
let key = getchar()
let char = s:KEY.nr2name(key)
if index(keys(g:_spacevim_mappings_prefixs), char) != -1
let name = SpaceVim#mapping#leader#getName(nr2char(key))
else
let name = char
endif
call add(keys, name)
if has_key(root, name)
let root = root[name]
if type(root) == 3
if len(root) == 3
redraw!
call s:open_describe_buffer(root[-1])
else
call s:build_mpt(['can not find describe for ', join(keys, ' - ')])
endif
let defined = 0
else
call s:build_mpt([prompt, join(keys + [''], ' - ')])
endif
else
redraw!
echohl Comment
echo join(keys, ' - ') . ' is undefined'
echohl NONE
let defined = 0
endif
while defined
let key = getchar()
let name = s:KEY.nr2name(key)
call add(keys, name)
@ -31,16 +59,16 @@ function! SpaceVim#plugins#help#describe_key()
else
call s:build_mpt(['can not find describe for ', join(keys, ' - ')])
endif
let definded = 0
let defined = 0
else
call s:build_mpt([prompt, join(keys + [''], ' - ')])
endif
else
redraw!
echohl Comment
echo join(keys, ' - ') . ' is undfinded'
echo join(keys, ' - ') . ' is undefined'
echohl NONE
let definded = 0
let defined = 0
endif
endwhile
endfunction

View File

@ -66,7 +66,7 @@ function! s:start(exe) abort
\ }
let s:start_time = reltime()
call s:open_windows()
call s:BUFFER.buf_set_lines(s:bufnr, s:lines , s:lines + 3, 0, ['[REPL executable] ' . a:exe, '', repeat('-', 20)])
call s:BUFFER.buf_set_lines(s:bufnr, s:lines , s:lines + 3, 0, ['[REPL executable] ' . string(a:exe), '', repeat('-', 20)])
let s:lines += 3
let s:_out_data = ['']
let s:_current_line = ''

View File

@ -233,6 +233,10 @@ Define the right section of statusline in active windows. By default:
*g:spacevim_statusline_unicode_symbols*
Enable/Disable unicode symbols in statusline
*g:spacevim_enable_language_specific_leader*
Enable/Disable language specific leader, by default you can use `,` ket
instead of `SPC` `l`.
*g:spacevim_enable_statusline_display_mode*
Enable/Disable display mode. Default is 0, mode will be displayed in
statusline. To enable this feature:

View File

@ -1,44 +1,43 @@
---
title: "SpaceVim 中文手册"
description: "SpaceVim 是一个社区驱动的 Vim 配置,内含多种语言模块,提供了代码补全、语法检查、跳转等多种 IDE 特性。"
description: "SpaceVim 是一个社区驱动的模块化 Vim 配置,以模块的方式组织和管理插件,为不同语言开发定制特定的模块,提供语法检查、自动补全、格式化、一键编译运行、以及 REPL 和 DEBUG 支持。"
---
# SpaceVim 中文手册
[![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.6.0--dev-FF00CC.svg)
[![MIT License](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/SpaceVim/SpaceVim/blob/master/LICENSE)
[![Doc](https://img.shields.io/badge/doc-%3Ah%20SpaceVim-orange.svg?style=flat-square)](https://github.com/SpaceVim/SpaceVim/blob/dev/doc/SpaceVim.txt)
[![Build status](https://ci.appveyor.com/api/projects/status/eh3t5oph70abp665/branch/dev?svg=true)](https://ci.appveyor.com/project/wsdjeg/spacevim/branch/dev)
[![codecov](https://codecov.io/gh/SpaceVim/SpaceVim/branch/dev/graph/badge.svg)](https://codecov.io/gh/SpaceVim/SpaceVim/branch/dev)
[![Version](https://img.shields.io/badge/version-0.7.0--dev-FF00CC.svg)](https://github.com/SpaceVim/SpaceVim/releases)
[![MIT License](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/SpaceVim/SpaceVim/blob/dev/LICENSE)
[![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)
[![Weibo](https://img.shields.io/badge/Weibo-%40SpaceVim-orange.svg)](https://weibo.com/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)
![welcome-page](https://cloud.githubusercontent.com/assets/13142418/26402270/28ad72b8-40bc-11e7-945e-003f41e057be.png)
![welcome-page](https://user-images.githubusercontent.com/13142418/33793078-3446cb6e-dc76-11e7-9998-376a355557a4.png)
项 目 主 页: <https://spacevim.org>
Github 地址 : <https://github.com/SpaceVim/SpaceVim>
SpaceVim 是一个社区驱动的模块化 vim/neovim 配置集合,其中包含了多种功能模块,并且针对 neovim 做了功能优化。spacevim 有多种功能模块可供用户选择,针对不同语言选择特定的模块,就可以配置出一个适合特定语言开发的环境。
SpaceVim 是一个社区驱动的模块化 vim/neovim 配置集合,以模块的方式组织管理插件以
及相关配置,为不同的语言开发量身定制了相关的开发模块,该模块提供代码自动补全,
语法检查、格式化、调试、REPL 等特性。用户仅需载入相关语言的模块即可得到一个开箱
即用的Vim-IDE。
使用过程中遇到问题或者有什么功能需求可以在 github 提交 issue这将更容易被关注和修复。我们也欢迎喜欢 vim/neovim 的用户加入我们的 QQ 群,一起讨论 vim 相关的技巧,[点击加入Vim/SpaceVim用户群](https://jq.qq.com/?_wv=1027&k=43zWPlT)。
使用过程中遇到问题或者有什么功能需求可以在 github 提交 issue这将更容易被关注
和修复。我们也欢迎喜欢 vim/neovim 的用户加入我们的
[QQ群(点击加入)](https://jq.qq.com/?_wv=1027&k=43zWPlT),该群定期也会分享一些
实用的 Vim 技巧以及插件。
以下是近几周的开发汇总:
[![Throughput Graph](https://graphs.waffle.io/SpaceVim/SpaceVim/throughput.svg)](https://github.com/SpaceVim/SpaceVim/pulse)
**捐助SpaceVim**
| 微信 | 支付宝 |
| ------------------------------------------------------------------------ | -------------------------------------------------------------------------- |
| <img src="https://spacevim.org/img/weixin.png" height="150" width="150"> | <img src="https://spacevim.org/img/zhifubao.png" height="150" width="150"> |
**关注我们:**
**以下为SpaceVim中文手册部分内容还未完成翻译为了方便大家查询相关信息已提前发布官网上后面会逐渐更新完成感谢大家一直以来的支持**
<img src="https://spacevim.org/img/weixingongzhonghao.png" height="200" width="200">
<!-- vim-markdown-toc GFM -->
@ -205,7 +204,7 @@ SpaceVim是一种模块化配置可以运行在vim或者neovim上关于vim
**windows**
Window 下最方便的是下载安装脚本([install.cmd](https://spacevim.org/install.cmd))至本地,直接运行。
Window 下最方便的是下载安装脚本([install.cmd](https://spacevim.org/install.cmd))至本地,直接运行,安装完毕后,打开 Gvim 他将自动下载插件,在 Windows 下需要手动安装 [Nerd-fonts](https://github.com/ryanoasis/nerd-fonts) 字体
## 更新
@ -2141,4 +2140,10 @@ let g:spacevim_guifont = 'DejaVu\ Sans\ Mono\ for\ Powerline\ 11'
{% endfor %}
</ul>
**捐助SpaceVim**
| 微信 | 支付宝 |
| ------------------------------------------------------------------------ | -------------------------------------------------------------------------- |
| <img src="https://spacevim.org/img/weixin.png" height="150" width="150"> | <img src="https://spacevim.org/img/zhifubao.png" height="150" width="150"> |
<!-- vim:set nowrap: -->

View File

@ -0,0 +1,147 @@
---
title: SpaceVim release v0.6.0
categories: changelog
excerpt: "Many new features come out with v0.6.0"
type: NewsArticle
image: https://user-images.githubusercontent.com/13142418/33793078-3446cb6e-dc76-11e7-9998-376a355557a4.png
---
# [Changelogs](https://spacevim.org/development#changelog) > SpaceVim release v0.6.0
## New Features
- Add c/cpp syntax file [#1188](https://github.com/SpaceVim/SpaceVim/pull/1188)
- Add NeoSolarized guide theme [#1187](https://github.com/SpaceVim/SpaceVim/pull/1187)
- Add gf support in windows for plugin manager [#1184](https://github.com/SpaceVim/SpaceVim/pull/1184)
- Add solarized guide theme [#1180](https://github.com/SpaceVim/SpaceVim/pull/1180)
- Add php runner [#1174](https://github.com/SpaceVim/SpaceVim/pull/1174)
- Add lsp support for vim8 [#1165](https://github.com/SpaceVim/SpaceVim/pull/1165)
- Add lsp support for php [#1163](https://github.com/SpaceVim/SpaceVim/pull/1163)
- add description to the DOC of golang layer [#1140](https://github.com/SpaceVim/SpaceVim/pull/1140)
- add doc of searching files to managing project [#1116](https://github.com/SpaceVim/SpaceVim/pull/1116)
- Add a new plugin for JavaScript [#1099](https://github.com/SpaceVim/SpaceVim/pull/1099)
- Add language server configurations for Haskell [#1094](https://github.com/SpaceVim/SpaceVim/pull/1094)
- Add chat config [#1085](https://github.com/SpaceVim/SpaceVim/pull/1085)
- Add runner syntax file [#1068](https://github.com/SpaceVim/SpaceVim/pull/1068)
- Add func for custom group name [#1052](https://github.com/SpaceVim/SpaceVim/pull/1052)
- Add hunks summary [#1046](https://github.com/SpaceVim/SpaceVim/pull/1046)
- Add mapping for Increase/Decrease numbers [#1039](https://github.com/SpaceVim/SpaceVim/pull/1039)
- Add signatures api [#1036](https://github.com/SpaceVim/SpaceVim/pull/1036)
- Added a new layer lsp [#1014](https://github.com/SpaceVim/SpaceVim/pull/1014)
- Add: Improve spacevim statusline [#1012](https://github.com/SpaceVim/SpaceVim/pull/1012)
- Add mappings for git blame and git log [#1009](https://github.com/SpaceVim/SpaceVim/pull/1009)
- Added a new plugin vim-jplus [#1002](https://github.com/SpaceVim/SpaceVim/pull/1002)
- Added autocmd to update status-line [#1000](https://github.com/SpaceVim/SpaceVim/pull/1000)
- Add gd for help desc buffer && fix SPC p f [#997](https://github.com/SpaceVim/SpaceVim/pull/997)
- Added a runner for Ruby language [#993](https://github.com/SpaceVim/SpaceVim/pull/993)
- Added a runner for Crystal language [#992](https://github.com/SpaceVim/SpaceVim/pull/992)
- Added language features for JavaScript [#991](https://github.com/SpaceVim/SpaceVim/pull/991)
- Added filetypes for Emmet [#990](https://github.com/SpaceVim/SpaceVim/pull/990)
- Added zsh support [#989](https://github.com/SpaceVim/SpaceVim/pull/989)
- Added Denite sources [#988](https://github.com/SpaceVim/SpaceVim/pull/988)
- Added Rust language features [#973](https://github.com/SpaceVim/SpaceVim/pull/973)
- Added Haskell runner [#972](https://github.com/SpaceVim/SpaceVim/pull/972)
## Feature Changes
- Change gitk plugin [#1131](https://github.com/SpaceVim/SpaceVim/pull/1131)
## Bug Fixs
- fix issue 1196 (tab list bug) [#1201](https://github.com/SpaceVim/SpaceVim/pull/1201)
- fix typo [#1198](https://github.com/SpaceVim/SpaceVim/pull/1198)
- Fix win project manager [#1182](https://github.com/SpaceVim/SpaceVim/pull/1182)
- Fix lua repl && add layer doc [#1155](https://github.com/SpaceVim/SpaceVim/pull/1155)
- Fix lua repl [#1149](https://github.com/SpaceVim/SpaceVim/pull/1149)
- fix spelling error for stage all files [#1139](https://github.com/SpaceVim/SpaceVim/pull/1139)
- Fix SPC f b for show bookmarks [#1125](https://github.com/SpaceVim/SpaceVim/pull/1125)
- Fix transient state api [#1124](https://github.com/SpaceVim/SpaceVim/pull/1124)
- Fix two typos. [#1108](https://github.com/SpaceVim/SpaceVim/pull/1108)
- Fix an issue occurd in ALE-enabled environment [#1103](https://github.com/SpaceVim/SpaceVim/pull/1103)
- Fix for ctrlp with ag searcher. #1081 [#1082](https://github.com/SpaceVim/SpaceVim/pull/1082)
- Fix statusline for small windows. [#1076](https://github.com/SpaceVim/SpaceVim/pull/1076)
- Fix ycm config [#1074](https://github.com/SpaceVim/SpaceVim/pull/1074)
- Fix #1070 [#1072](https://github.com/SpaceVim/SpaceVim/pull/1072)
- Fix bot [#1063](https://github.com/SpaceVim/SpaceVim/pull/1063)
- Fix Duplicate meta descriptions [#1060](https://github.com/SpaceVim/SpaceVim/pull/1060)
- fix a syntax error of markdown table in documentation. [#1057](https://github.com/SpaceVim/SpaceVim/pull/1057)
- Fix Yggdroot/indentLine configuration [#1037](https://github.com/SpaceVim/SpaceVim/pull/1037)
- Fix typo whit -> with [#1033](https://github.com/SpaceVim/SpaceVim/pull/1033)
- Fix lint [#1030](https://github.com/SpaceVim/SpaceVim/pull/1030)
- Fix windows installation [#1029](https://github.com/SpaceVim/SpaceVim/pull/1029)
- fix mac fc-cache mkfontdir mkfontscale not exists #1016 [#1017](https://github.com/SpaceVim/SpaceVim/pull/1017)
- Fix lsp support [#1013](https://github.com/SpaceVim/SpaceVim/pull/1013)
- fix word [#1006](https://github.com/SpaceVim/SpaceVim/pull/1006)
- Fixed plugin 'vim-rtags' initialization errors [#995](https://github.com/SpaceVim/SpaceVim/pull/995)
- Fix Logger [#985](https://github.com/SpaceVim/SpaceVim/pull/985)
- Fix server error [#979](https://github.com/SpaceVim/SpaceVim/pull/979)
- Fixed Haskell layer config [#974](https://github.com/SpaceVim/SpaceVim/pull/974)
- Fixed cursor mode-sensitive issue [#971](https://github.com/SpaceVim/SpaceVim/pull/971)
- Fix capitalization on website [#970](https://github.com/SpaceVim/SpaceVim/pull/970)
## Unmarked PRs
- [SPC b t] Open Vimfiler by buffer file dir [#1200](https://github.com/SpaceVim/SpaceVim/pull/1200)
- Auto update neoinclude config [#1195](https://github.com/SpaceVim/SpaceVim/pull/1195)
- Disable welcome when load session at startup [#1191](https://github.com/SpaceVim/SpaceVim/pull/1191)
- Close #1157 [#1189](https://github.com/SpaceVim/SpaceVim/pull/1189)
- Support cwd in job [#1186](https://github.com/SpaceVim/SpaceVim/pull/1186)
- Improve plugin manager [#1179](https://github.com/SpaceVim/SpaceVim/pull/1179)
- Update project index [#1175](https://github.com/SpaceVim/SpaceVim/pull/1175)
- Update JavaScript language server [#1170](https://github.com/SpaceVim/SpaceVim/pull/1170)
- Update c layer doc [#1169](https://github.com/SpaceVim/SpaceVim/pull/1169)
- git: ignore swp files. [#1167](https://github.com/SpaceVim/SpaceVim/pull/1167)
- Update language layer [#1161](https://github.com/SpaceVim/SpaceVim/pull/1161)
- Support disable tabline [#1156](https://github.com/SpaceVim/SpaceVim/pull/1156)
- Update doc for layers [#1154](https://github.com/SpaceVim/SpaceVim/pull/1154)
- [Ready] Improve lua layer [#1147](https://github.com/SpaceVim/SpaceVim/pull/1147)
- Update blog [#1144](https://github.com/SpaceVim/SpaceVim/pull/1144)
- Update java layer [#1138](https://github.com/SpaceVim/SpaceVim/pull/1138)
- Update project key bindings [#1137](https://github.com/SpaceVim/SpaceVim/pull/1137)
- Clear cmdline after open file in flygrep [#1136](https://github.com/SpaceVim/SpaceVim/pull/1136)
- Set sign text [#1135](https://github.com/SpaceVim/SpaceVim/pull/1135)
- [WIP] Lua layer improvements [#1134](https://github.com/SpaceVim/SpaceVim/pull/1134)
- Update init.vim [#1130](https://github.com/SpaceVim/SpaceVim/pull/1130)
- Project manager [#1129](https://github.com/SpaceVim/SpaceVim/pull/1129)
- Update elixir layer [#1127](https://github.com/SpaceVim/SpaceVim/pull/1127)
- Update Home page [#1126](https://github.com/SpaceVim/SpaceVim/pull/1126)
- Update key bindings for debug layer [#1118](https://github.com/SpaceVim/SpaceVim/pull/1118)
- reimplement move text down and up [#1114](https://github.com/SpaceVim/SpaceVim/pull/1114)
- Improve guide cursor [#1113](https://github.com/SpaceVim/SpaceVim/pull/1113)
- Improve lang#ruby layer [#1112](https://github.com/SpaceVim/SpaceVim/pull/1112)
- Improve Emmet configuration [#1111](https://github.com/SpaceVim/SpaceVim/pull/1111)
- Update python layer documentation [#1110](https://github.com/SpaceVim/SpaceVim/pull/1110)
- Update wiki & website & readme [#1106](https://github.com/SpaceVim/SpaceVim/pull/1106)
- Improve implementations of tmux integration [#1105](https://github.com/SpaceVim/SpaceVim/pull/1105)
- doc: fix g:spacevim_terminal_cursor_shape default [#1095](https://github.com/SpaceVim/SpaceVim/pull/1095)
- Add language server configuration for JavaScript [#1093](https://github.com/SpaceVim/SpaceVim/pull/1093)
- Update documents about colorscheme [#1091](https://github.com/SpaceVim/SpaceVim/pull/1091)
- [WARNING!] Implement Sass - second pull request [#1083](https://github.com/SpaceVim/SpaceVim/pull/1083)
- Mouse support in tabline [#1071](https://github.com/SpaceVim/SpaceVim/pull/1071)
- Improve Tabline [#1067](https://github.com/SpaceVim/SpaceVim/pull/1067)
- Update lang#c layer [#1065](https://github.com/SpaceVim/SpaceVim/pull/1065)
- zsh:support autocomplete [#1064](https://github.com/SpaceVim/SpaceVim/pull/1064)
- bashcomplete: can not trigger omnicomplete in some pos [#1061](https://github.com/SpaceVim/SpaceVim/pull/1061)
- Update runner [#1055](https://github.com/SpaceVim/SpaceVim/pull/1055)
- get_complete: compatiable with macOS. [#1054](https://github.com/SpaceVim/SpaceVim/pull/1054)
- bugfix start zsh error [#1050](https://github.com/SpaceVim/SpaceVim/pull/1050)
- File clipboard [#1043](https://github.com/SpaceVim/SpaceVim/pull/1043)
- Update community page [#1041](https://github.com/SpaceVim/SpaceVim/pull/1041)
- Enable syntax error/warning counts in status line [#1040](https://github.com/SpaceVim/SpaceVim/pull/1040)
- Update issue.vim [#1034](https://github.com/SpaceVim/SpaceVim/pull/1034)
- uninstall section added [#1027](https://github.com/SpaceVim/SpaceVim/pull/1027)
- Makefile: fix covimerage integration: use installed [#1026](https://github.com/SpaceVim/SpaceVim/pull/1026)
- Update autocomple layer [#1025](https://github.com/SpaceVim/SpaceVim/pull/1025)
- Run EmmetInstall on vue and eex filetypes [#1020](https://github.com/SpaceVim/SpaceVim/pull/1020)
- Update website [#1011](https://github.com/SpaceVim/SpaceVim/pull/1011)
- Version control [#1005](https://github.com/SpaceVim/SpaceVim/pull/1005)
- Auto install fonts [#998](https://github.com/SpaceVim/SpaceVim/pull/998)
- Enable deoplete in vim8 && lsp support [#994](https://github.com/SpaceVim/SpaceVim/pull/994)
- Made Markdown preview use open-browser.vim [#987](https://github.com/SpaceVim/SpaceVim/pull/987)
- Update version [#984](https://github.com/SpaceVim/SpaceVim/pull/984)
- Update travis setting [#981](https://github.com/SpaceVim/SpaceVim/pull/981)
- Server client [#976](https://github.com/SpaceVim/SpaceVim/pull/976)
- Disabled completions by deoplete [#968](https://github.com/SpaceVim/SpaceVim/pull/968)

View File

@ -0,0 +1,94 @@
---
title: "Newsletter #2 - Never lost, Never give up"
categories: newsletter
excerpt: "We know exactly what is the purpose of SpaceVim, and we keep trying to get it, never get lost, never give up..."
image: https://user-images.githubusercontent.com/13142418/34612367-18fdf2d6-f1ef-11e7-885e-5e82613c1444.png
---
# [newsletter](https://spacevim.org/development#newsletter) > Never lost, Never give up
Welcome to the second newsletter for SpaceVim, a project that hopes to turn vim into a modular IDE for most languages.
## What is SpaceVim
SpaceVim is a vim distribution which's inspired by spacemacs. It manages collection of plugins in layers, which help collect related packages together to provide features. For example, the [python layer](http://spacevim.org/layers/lang/python/) collects [deoplete.nvim](https://github.com/Shougo/deoplete.nvim/), [neomake](https://github.com/neomake/neomake) and [deoplete-jedi](https://github.com/zchee/deoplete-jedi) together to provides autocompletion, syntax checking, and documentation lookup. This approach helps keep configuration organized and reduces overhead for users by keeping them from having to think about what packages to install.
The development of SpaceVim happened on github: <https://github.com/SpaceVim/SpaceVim>.
## Participating
If you are interested in contributing to SpaceVim, read the [development](http://spacevim.org/development/) page to get start. You can also join our [community channels](http://spacevim.org/community/).
## What's new
The last newsletter was posted on May 31, SpaceVim has released 4 releases.
### Release 0.3.1
This release is a HOTFIX after 0.3.0, It brings support for old version of vim and fixs some startup errors.
new features in this release:
- autocompletion when edit gitcommit.
- Undo/Redo quit windows
- `SPC b` prefix key bindings for buffer
- `SPC f` prefix key bindings for file
- `g` prefix key bindings guide
- `z` prefix key bindings guide
- `SPC s` prefix key bindings for searching && searching index
for more info, please check the [release page of 0.3.1](https://spacevim.org/SpaceVim-release-v0.3.1/)
### Release 0.4.0
Next lets see what happened in 0.4.0. As before, check out the [release notes](https://spacevim.org/SpaceVim-release-v0.4.0/) for details.
- background searching and grep on the fly in incsearch layer
- add prompt and web api
- help describe for key bindings: `SPC h d k`
- Add comment/manipulation/insertion key bindings
### Release 0.5.0
This release is a big release after 0.4.0, three months development brings many new features.
- Improve help describe key bindings
- Improve ci
- modular statusline/tabline
- job API for neovim/vim
- project manager and remote manager
- new language layers
for more info, please check the [release page of 0.5.0](https://spacevim.org/SpaceVim-release-v0.5.0/)
### Release 0.6.0
The latest release brings a host of fixes and improvements. We will list some new features here, and be sure to check the [release page](https://spacevim.org/SpaceVim-release-v0.6.0/) for all the details.
- gf support in windows for plugin manager
- runner/debuger/REPL support for language layer
- language server protocol support
- Improve the plugin manager UI (added in v0.3.0)
### 0.7.0-dev
The develop version of SpaceVim is 0.7.0-dev now, here is a list of new features.
- Guide for windows key bindings: `s` prefix
- new language layer: `lang#dart`
- new layer: `cscope`
- key bindings help describe
for more info, you can check the [pull requests](https://github.com/SpaceVim/SpaceVim/pulls?q=is%3Apr+is%3Aclosed)
### Upcoming features
we recommand to read the [roadmap](https://spacevim.org/roadmap/) of SpaceVim. You can also check the PR list of SpaceVim:
https://github.com/SpaceVim/SpaceVim/pulls
[#1102](https://github.com/SpaceVim/SpaceVim/pull/1102) is PR for useing floating windows for grep on the fly, But this need a new neovim [WIP feature](https://github.com/neovim/neovim/pull/6619).
## Thanks
Thank you contributors, sponsors, bug-reporters, supporters. Thank you [@wsdjeg](https://github.com/wsdjeg) for the awesome project and thank you [@syl20bnr](https://github.com/syl20bnr) for your foundational work.

View File

@ -7,12 +7,17 @@ description: "A list for community channels for SpaceVim."
Visit these resources for help or general questions.
## Discuss
- [/r/spacevim on Reddit](https://reddit.com/r/spacevim)
- [Mailing list](https://groups.google.com/forum/#!forum/spacevim)
- [Twitter](https://twitter.com/SpaceVim)
- [Facebook](https://www.facebook.com/SpaceVim)
## Ask
- [issue tracker](https://github.com/SpaceVim/SpaceVim/issues) for issue and feature requests
- Try [vi.stackexchange.com](https://vi.stackexchange.com/) for **usage and configuration questions**.
- [Twitter](https://twitter.com/SpaceVim) for hugs & pithy comments
- [Facebook](https://www.facebook.com/SpaceVim)
- [issue tracker](https://github.com/SpaceVim/SpaceVim/issues) for issue and feature requests
## Chat
@ -26,7 +31,3 @@ All of these channels are bridged together. Click on one of the badges below to
- [`#spacevim:matrix.org` on Matrix](https://riot.im/app/#/room/%23spacevim:matrix.org)
- [`#spacevim` on slack](https://spacevim.slack.com/messages/C88CTJ62J)
## Discuss
- [google mailing list](https://groups.google.com/forum/#!forum/spacevim)
- [/r/spacevim on Reddit](https://reddit.com/r/spacevim)

View File

@ -21,6 +21,7 @@ description: "Development information about SpaceVim, including contributing gui
- [Author of a new layer](#author-of-a-new-layer)
- [Contributor to an existing layer](#contributor-to-an-existing-layer)
- [Contributing a keybinding](#contributing-a-keybinding)
- [Language specified key bindings](#language-specified-key-bindings)
- [Contributing a banner](#contributing-a-banner)
- [Build with SpaceVim](#build-with-spacevim)
- [Changelog](#changelog)
@ -110,6 +111,7 @@ Write commit messages according to adapted [Tim Popes guidelines](http://tbag
This is a model commit message:
```gitcommit
Capitalized, short (72 chars or less) summary
More detailed explanatory text, if necessary. Wrap it to about 72
@ -131,6 +133,7 @@ This is a model commit message:
single space, with blank lines in between, but conventions vary here
- Use a hanging indent
```
[Gita] provide vim mode for Git commit messages, which helps you to comply to these guidelines.
@ -148,13 +151,13 @@ The file header for vim script should look like the following template:
"=============================================================================
" FILENAME --- NAME layer file for SpaceVim
" Copyright (c) 2012-2016 Shidong Wang & Contributors
" Author: YOUR_NAME <YOUR_EMAIL>
" Author: YOUR NAME <YOUR EMAIL>
" URL: https://spacevim.org
" License: MIT license
"=============================================================================
```
You should replace FILENAME by the name of the file (e.g. foo.vim) and NAME by the name of the layer you are creating, dont forget to replace YOUR_NAME and YOUR_EMAIL also.
You should replace FILENAME by the name of the file (e.g. foo.vim) and NAME by the name of the layer you are creating, dont forget to replace **YOUR NAME** and **YOUR EMAIL** also.
##### Author of a new layer
@ -180,20 +183,27 @@ here is an example for creating a new layer names `foo`:
" @parentsection layers
" This the doc for this layer:
"
" @subsection Mappings
" @subsection Key Bindings
" >
" Mode Key Function
" -------------------------------------------------------------
" normal <leader>jA generate accessors
" normal <leader>js generate setter accessor
" <
" @subsection options
" @subsection Layer options
" >
" Name Description Default
" -------------------------------------------------------------
" g:foo_option1 Set option1 for foo layer 1
" g:foo_option2 Set option2 for foo layer 2
" g:foo_option3 Set option3 for foo layer 3
" option1 Set option1 for foo layer ''
" option2 Set option2 for foo layer []
" option3 Set option3 for foo layer {}
" <
" @subsection Global options
" >
" Name Description Default
" -------------------------------------------------------------
" g:pluginA_opt1 Set opt1 for plugin A ''
" g:pluginB_opt2 Set opt2 for plugin B []
" <
function! SpaceVim#layers#foo#plugins() abort
@ -212,7 +222,46 @@ function! SpaceVim#layers#foo#config() abort
endfunction
```
4. send PR to SpaceVim.
4. Add layer document `docs/layers/foo.md` for `foo` layer.
```md
---
title: "SpaceVim foo layer"
description: "This is a short discription for the foo layer"
---
# [SpaceVim Layers:](https://spacevim.org/layers) foo
<!-- vim-markdown-toc GFM -->
- [Description](#description)
- [Installation](#installation)
- [Layer](#layer)
- [Syntax checking && Code formatting](#syntax-checking--code-formatting)
- [Key bindings](#key-bindings)
- [Inferior REPL process](#inferior-repl-process)
- [RuboCop](#rubocop)
- [Running current script](#running-current-script)
<!-- vim-markdown-toc -->
## Description
This layer is for ruby development.
## Installation
### Layer
To use this configuration layer, add `call SpaceVim#layers#load('foo')` to your custom configuration file.
### Other dependences
## Key bindings
```
5. Open `docs/layers/index.md`, run `:call SpaceVim#dev#layers#update()` to update layer list.
6. send PR to SpaceVim.
##### Contributor to an existing layer
@ -228,6 +277,26 @@ If you think it worth contributing a new mappings then be sure to read the docum
ALWAYS document your new mappings or mappings changes inside the relevant documentation file. It should be the the layer file and the [documentation.md](https://spacevim.org/documentation).
#### Language specified key bindings
All language specified key bindings are started with `SPC l` prefix.
we recommended to keep same language specified key bindings for different languages:
| Key Binding | Description |
| ----------- | ------------------------------------------------ |
| SPC l r | start a runner for current file |
| SPC l e | rename symbol |
| SPC l d | show doc |
| SPC l i r | remove unused imports |
| SPC l i s | sort imports with isort |
| SPC l s i | Start a language specified inferior REPL process |
| SPC l s b | send buffer and keep code buffer focused |
| SPC l s l | send line and keep code buffer focused |
| SPC l s s | send selection text and keep code buffer focused |
All of these above key bindings are just recommended as default, but it also base on the language layer itself.
#### Contributing a banner
The startup banner is by default the SpaceVim logo but there are also ASCII banners available in the core/banner layer.

View File

@ -32,6 +32,7 @@ description: "General documentation about how to using SpaceVim, including the q
- [Alternative directory](#alternative-directory)
- [Concepts](#concepts)
- [Transient-states](#transient-states)
- [Differences between vim/neovim and SpaceVim](#differences-between-vimneovim-and-spacevim)
- [Awesome ui](#awesome-ui)
- [Colorschemes](#colorschemes)
- [Font](#font)
@ -254,7 +255,6 @@ In SpaceVim, a layer is a single file. In a layer, for example, `autocomplete` l
- `SpaceVim#layers#autocomplete#config()`: layer config, such as key bindings and autocmds.
- `SpaceVim#layers#autocomplete#set_variable()`: function for setting layer options.
## Custom Configuration
User configuration can be stored in your ~/.SpaceVim.d directory.
@ -354,6 +354,26 @@ Move Text Transient State:
![Move Text Transient State](https://user-images.githubusercontent.com/13142418/28489559-4fbc1930-6ef8-11e7-9d5a-716fe8dbb881.png)
## Differences between vim/neovim and SpaceVim
- The `f` key does find char on the right, but in SpaceVim it is the `Unite` key bindings specific leader key by defalut (which can be set on another key binding in dotfile). If you still prefer the origin function of `f`, you can use an empty string to disable this feature.
the option is `g:spacevim_unite_leader`, defalut value is `f`.
- The `F` key does find char on the left, but in SpaceVim it is the `Denite` key bindings specific leader key by defalut (which can be set on another key binding in dotfile). If you still prefer the origin function of `F`, you can use an empty string to disable this feature.
the option is `g:spacevim_denite_leader`, defalut value is `F`.
- The `s` key does replace cursor char, but in SpaceVim it is the `Window` key bindings specific leader key by defalut (which can be set on another key binding in dotfile). If you still prefer the origin function of `s`, you can use an empty string to disable this feature.
the option is `g:spacevim_windows_leader`, defalut value is `s`.
- The `,` key does repeat last `f`, `F`, `t` and `T` in vim, but in SpaceVim it is the language specified Leader key.
the option is `g:spacevim_enable_language_specific_leader`, defalut value is 1.
[Send a PR](http://spacevim.org/development/) to add the differences you found in this section.
## Awesome ui
SpaceVim has a minimalistic and distraction free UI:
@ -1787,7 +1807,7 @@ Unite work flow leader can only be used in normal mode. Unite leader need unite
##### Window Management
| Key | Mode | Action |
| --------------- | :----: | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| --------------- | :----: | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `q` | Normal | Smart buffer close |
| `s`+`p` | Normal | Split nicely |
| `s`+`v` | Normal | :split |
@ -1795,15 +1815,15 @@ Unite work flow leader can only be used in normal mode. Unite leader need unite
| `s`+`t` | Normal | Open new tab (:tabnew) |
| `s`+`o` | Normal | Close other windows (:only) |
| `s`+`x` | Normal | Remove buffer, leave blank window |
| `s`+`q` | Normal | Closes current buffer (:close) |
| `s`+`Q` | Normal | Removes current buffer, left buffer in the tabline will be displayed, if there is no buffer on the left, the right buffer will be displayed, if this is the last buffer in the tabline, then an empty buffer will be displayed. |
| `s`+`q` | Normal | Remove current buffer, left buffer in the tabline will be displayed. If there is no buffer on the left, the right buffer will be displayed; if this is the last buffer in the tabline, then an empty buffer will be displayed. |
| `s`+`Q` | Normal | Close current buffer (:close) |
| `Tab` | Normal | Next window or tab |
| `Shift`+`Tab` | Normal | Previous window or tab |
| `<leader>`+`sv` | Normal | Split with previous buffer |
| `<leader>`+`sg` | Normal | Vertical split with previous buffer |
| `<leader>`+`sg` | Normal | Vertically split with previous buffer |
SpaceVim has mapped normal <kbd>q</kbd> as smart buffer close, the normal func of <kbd>q</kbd>
can be get by <kbd>`<leader>` q r</kbd>
can be get by <kbd><leader> q r</kbd>
##### Native functions
@ -2095,5 +2115,4 @@ As SpaceVim use above bookmarks mappings, so you can not use `a`, `m`, `n`, `p`
[textobj-multiblock]: https://github.com/osyo-manga/vim-textobj-multiblock
<!-- vim:set nowrap: -->

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

View File

@ -7,7 +7,7 @@ description: "SpaceVim is a community-driven vim distribution that seeks to prov
[![Build Status](https://travis-ci.org/SpaceVim/SpaceVim.svg?branch=dev)](https://travis-ci.org/SpaceVim/SpaceVim)
[![Build status](https://ci.appveyor.com/api/projects/status/eh3t5oph70abp665/branch/dev?svg=true)](https://ci.appveyor.com/project/wsdjeg/spacevim/branch/dev)
[![codecov](https://codecov.io/gh/SpaceVim/SpaceVim/branch/dev/graph/badge.svg)](https://codecov.io/gh/SpaceVim/SpaceVim/branch/dev)
[![Version](https://img.shields.io/badge/version-0.6.0--dev-FF00CC.svg)](https://github.com/SpaceVim/SpaceVim/releases/tag/0.5.0)
[![Version](https://img.shields.io/badge/version-0.7.0--dev-FF00CC.svg)](https://github.com/SpaceVim/SpaceVim)
[![MIT License](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/SpaceVim/SpaceVim/blob/dev/LICENSE)
SpaceVim is a distribution of the vim editor that's inspired by spacemacs. It manages collections of plugins in layers, which help collect related packages together to provide features. For example, the python layer collects deoplete.nvim, neomake and jedi-vim together to provides autocompletion, syntax checking, and documentation lookup. This approach helps keep configuration organized and reduces overhead for the user by keeping them from having to think about what packages to install.

View File

@ -11,7 +11,7 @@ echo " \______/| ##____/ \_______/\_______/\_______/ \_/ |__|__/ |__/
echo " | ## "
echo " | ## "
echo " |__/ "
echo " version : 0.6.0-dev by : spacevim.org "
echo " version : 0.7.0-dev by : spacevim.org "
Push-Location ~

View File

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

View File

@ -24,6 +24,15 @@ checkers layer is loaded by default.
## Configuration
By default, the error will be display below current line, if you want to disabled this feature, you may need to load this layer with `show_cursor_error` to 0.
```vim
call SpaceVim#layers#load('checkers', {
\ 'show_cursor_error' : 0,
\ })
```
| Name | default value | description |
| ---------------------------- | ------------- | -------------------------------------------------------- |
| `g:spacevim_enable_neomake` | 1 | Use neomake as default checking tools |

46
docs/layers/cscope.md Normal file
View File

@ -0,0 +1,46 @@
---
title: "SpaceVim cscope layer"
description: "This layer provide cscope manager for project"
---
## Description
This layer provides a smart [Cscope](http://cscope.sourceforge.net/) and [PyCscope](https://github.com/portante/pycscope) helper for SpaceVim.
For more info about the differences between Cscope and other similar tools, please read [Comparison with Similar Tools](https://github.com/oracle/opengrok/wiki/Comparison-with-Similar-Tools)
## Features
- Tag indexing and searching for C-C++ via Cscope
- Tag indexing and searching for python via PyCscope
## Installation
### cscope
```shell
sudo pacman -S cscope
```
### layer
To use this configuration layer, add it to your `~/.SpaceVim.d/init.vim`.
```vim
call SpaceVim#layers#load('cscope')
```
## Key bindings
| Key Binding | Description |
| ----------- | -------------------------------------- |
| `SPC m c =` | Find assignments to this symbol |
| `SPC m c i` | Create cscope index |
| `SPC m c c` | Find functions called by this function |
| `SPC m c C` | Find functions calling this function |
| `SPC m c d` | find global definition of a symbol |
| `SPC m c r` | find references of a symbol |
| `SPC m c f` | find file |
| `SPC m c F` | find which files include a file |
| `SPC m c e` | search regular expression |
| `SPC m c t` | search text |

View File

@ -52,10 +52,12 @@ call SpaceVim#layers#disable('shell')
| [checkers](https://spacevim.org/layers/checkers/) | This layer provides syntax checking feature |
| [chinese](https://spacevim.org/layers/chinese/) | Layer for chinese users, include chinese docs and runtime messages |
| [colorscheme](https://spacevim.org/layers/colorscheme/) | colorscheme provides a list of colorscheme for SpaceVim, default colorscheme is gruvbox with dark theme. |
| [cscope](https://spacevim.org/layers/cscope/) | This layer provide cscope manager for project |
| [debug](https://spacevim.org/layers/debug/) | This layer provide debug workflow support in SpaceVim |
| [default](https://spacevim.org/layers/default/) | lt layer contains none plugins, but it has some better default config for vim and neovim |
| [git](https://spacevim.org/layers/git/) | This layers adds extensive support for git |
| [lang#c](https://spacevim.org/layers/lang/c/) | This layer is for c/c++/object-c development |
| [lang#dart](https://spacevim.org/layers/lang/dart/) | This layer is for dart development, provide autocompletion, syntax checking, code format for dart file. |
| [lang#elixir](https://spacevim.org/layers/lang/elixir/) | This layer is for elixir development, provide autocompletion, syntax checking, code format for elixir file. |
| [lang#go](https://spacevim.org/layers/lang/go/) | This layer is for golang development. It also provides additional language-specific key mappings. |
| [lang#haskell](https://spacevim.org/layers/lang/haskell/) | This layer is for haskell development |

90
docs/layers/lang/dart.md Normal file
View File

@ -0,0 +1,90 @@
---
title: "SpaceVim lang#dart layer"
description: "This layer is for dart development, provide autocompletion, syntax checking, code format for dart file."
---
# [SpaceVim Layers:](https://spacevim.org/layers) lang#dart
<!-- vim-markdown-toc GFM -->
- [Description](#description)
- [Features](#features)
- [Installation](#installation)
- [Layer](#layer)
- [Syntax checking && Code formatting](#syntax-checking--code-formatting)
- [Install dart-repl](#install-dart-repl)
- [Key bindings](#key-bindings)
- [Inferior REPL process](#inferior-repl-process)
- [Running current script](#running-current-script)
- [Code formatting](#code-formatting)
- [Screenshots](#screenshots)
<!-- vim-markdown-toc -->
## Description
This layer is for dart development.
## Features
- code completion
- syntax checking
- code formatting
- REPL
- code runner
## Installation
### Layer
To use this configuration layer, add `call SpaceVim#layers#load('lang#dart')` to your custom configuration file.
### Syntax checking && Code formatting
To enable syntax checking and code formatting in spacevim, you need to install [dart sdk](https://github.com/dart-lang/sdk).
### Install dart-repl
you need to install the dart_repl via pub, pub is a build-in package manager in dart-sdk:
```sh
pub global activate dart_repl
```
## Key bindings
### Inferior REPL process
Start a `dart.repl` inferior REPL process with `SPC l s i`.
Send code to inferior process commands:
| Key Binding | Description |
| ----------- | ------------------------------------------------ |
| `SPC l s b` | send buffer and keep code buffer focused |
| `SPC l s l` | send line and keep code buffer focused |
| `SPC l s s` | send selection text and keep code buffer focused |
### Running current script
To running a ruby script, you can press `SPC l r` to run current file without loss focus, and the result will be shown in a runner buffer.
### Code formatting
| Key Binding | Description |
| ----------- | --------------------- |
| `SPC b f` | format current buffer |
## Screenshots
**code formatting:**
![format-dart-file-in-spacevim](https://user-images.githubusercontent.com/13142418/34455939-b094db54-ed4f-11e7-9df0-80cf5de1128d.gif)
**auto completion:**
![complete-dart-in-spacevim](https://user-images.githubusercontent.com/13142418/34455816-ee77182c-ed4c-11e7-8f63-402849f60405.png)
**code runner:**
![dart-runner-in-spacevim](https://user-images.githubusercontent.com/13142418/34455403-1f6d4c3e-ed44-11e7-893f-09a6e64e27ed.png)

View File

@ -9,6 +9,7 @@ description: "This layer is for golang development. It also provides additional
- [Description](#description)
- [Install](#install)
- [Features](#features)
- [Key bindings](#key-bindings)
<!-- vim-markdown-toc -->
@ -19,14 +20,21 @@ This layer is for golang development. It also provides additional language-speci
## Install
To use this configuration layer, add `SPLayer 'lang#go` to your custom configuration file.
To use this configuration layer, add `call SpaceVim#layers#load('lang#go')` to your custom configuration file.
## Features
- auto-completion
- syntax checking
- goto definition
- refernce finder
## Key bindings
**Import key bindings:**
| Key Binding | Description |
| ----------- | ---------------------------------------- |
| ----------- | --------------- |
| SPC l i | go implements |
| SPC l f | go info |
| SPC l e | go rename |

View File

@ -8,7 +8,7 @@ description: "This layer is for JaveScript development"
<!-- vim-markdown-toc GFM -->
- [Description](#description)
- [Layer Installation](#layer-installation)
- [Install](#install)
- [Features](#features)
- [Layer configuration](#layer-configuration)
@ -18,7 +18,7 @@ description: "This layer is for JaveScript development"
This layer is for JavaScript development.
## Layer Installation
## Install
To use this configuration layer, add `call SpaceVim#layers#load('lang#javascript')` to your custom configuration file.

View File

@ -7,13 +7,13 @@ description: "This layer is for lua development, provide autocompletion, syntax
<!-- vim-markdown-toc GFM -->
- [Description](#description)
- [Installation](#installation)
- [Layer](#layer)
- [Syntax checking && Code formatting](#syntax-checking--code-formatting)
- [Key bindings](#key-bindings)
- [Inferior REPL process](#inferior-repl-process)
- [Running current script](#running-current-script)
* [Description](#description)
* [Installation](#installation)
* [Layer](#layer)
* [Syntax checking && Code formatting](#syntax-checking--code-formatting)
* [Key bindings](#key-bindings)
* [Inferior REPL process](#inferior-repl-process)
* [Running current script](#running-current-script)
<!-- vim-markdown-toc -->
@ -34,7 +34,7 @@ To use this configuration layer, add `SPLayer 'lang#lua'` to your custom configu
### Inferior REPL process
Start a `lua` or `luap` inferior REPL process with `SPC l s i`. You may change the REPL command by layer option `repl_command`. for example, if you want to use `lua.repl`, load this layer via:
Start a `lua` or `luap` inferior REPL process with `SPC l s i`. You may change the REPL command by layer option `repl_command`. For example, if you want to use `lua.repl`, load this layer via:
```vim
call SpaceVim#layers#load('lang#lua'
@ -47,6 +47,9 @@ Send code to inferior process commands:
| Key Binding | Description |
| ----------- | ------------------------------------------------ |
| `SPC l b` | compile current lua buffer |
| `SPC l r` | run current lua file |
| `SPC l f` | format current lua file |
| `SPC l s b` | send buffer and keep code buffer focused |
| `SPC l s l` | send line and keep code buffer focused |
| `SPC l s s` | send selection text and keep code buffer focused |

View File

@ -36,7 +36,6 @@ else
endif
```
## Features
- Asynchronous calls
@ -70,7 +69,6 @@ npm install -g javascript-typescript-langserver
pip install --user python-language-server
```
## Configuration
To enable lsp support for a specified filetype, you may need to load this layer with `filtypes` option, for example:
@ -88,9 +86,18 @@ call SpaceVim#layers#load('lsp',
default language server commands:
| language | server command |
| ------------ | --------------------------------- |
| ------------ | ------------------------------------------------ |
| `javascript` | `['javascript-typescript-stdio']` |
| `haskell` | `['hie', '--lsp']` |
| `c` | `['clangd']` |
| `cpp` | `['clangd']` |
| `objc` | `['clangd']` |
| `objcpp` | `['clangd']` |
| `dart` | `['dart_language_server']` |
| `go` | `['go-langserver', '-mode', 'stdio']` |
| `rust` | `['rustup', 'run', 'nightly', 'rls']` |
| `python` | `['pyls']` |
| `php` | `['php', 'path/to/bin/php-language-server.php']` |
To override the server command, you may need to use `override_cmd` option: