1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-02-03 06:30:03 +08:00
This commit is contained in:
tenfy 2017-06-29 13:13:24 +08:00
commit 00bae39a19
21 changed files with 450 additions and 57 deletions

View File

@ -0,0 +1,78 @@
function! s:generate_content() abort
let content = ['## Achievements', '']
let content += s:issues_ac()
let content += s:stargazers_ac()
return content
endfunction
function! s:find_position() abort
let start = search('^<!-- SpaceVim Achievements start -->$','bwnc')
let end = search('^<!-- SpaceVim Achievements end -->$','bnwc')
return sort([start, end])
endfunction
function! s:issues_ac() abort
let line = ['### issues']
call add(line, '')
call add(line, 'Achievements | Account')
call add(line, '----- | -----')
let acc = [100, 1000, 2000, 3000, 4000, 5000, 6000, 7000, 8000, 9000, 10000]
for id in acc
let issue = github#api#issues#Get_issue('SpaceVim', 'SpaceVim', id)
if has_key(issue, 'id')
let is_pr = has_key(issue, 'pull_request')
call add(line, '[' . id . 'th issue(' .
\ (is_pr ? 'PR' : 'issue') .
\ ')](https://github.com/SpaceVim/SpaceVim/issues/' . id . ') | [' . issue.user.login
\ . '](https://github.com/' . issue.user.login . ')'
\ )
else
break
endif
endfor
if line[-1] != ''
let line += ['']
endif
return line
endfunction
function! s:stargazers_ac() abort
let line = ['### Stars, forks and watchers']
call add(line, '')
call add(line, 'Achievements | Account')
call add(line, '----- | -----')
let stc = [1, 100, 1000, 2000, 3000, 4000, 5000, 6000, 7000, 8000, 9000, 10000]
for id in stc
if id == 1
let user = github#api#activity#List_stargazers('SpaceVim','SpaceVim')[0]
call add(line, 'First stargazers | [' . user.login . '](https://github.com/' . user.login . ')')
else
let index = id % 30
if index == 0
let page = id/30
let index = 30
else
let page = id/30 + 1
endif
let users = github#api#activity#List_stargazers('SpaceVim','SpaceVim', page)
if type(users) == type([]) && len(users) >= index
let user = users[index - 1]
call add(line, id . 'th stargazers | [' . user.login . '](https://github.com/' . user.login . ')')
endif
endif
endfor
if line[-1] != ''
let line += ['']
endif
return line
endfunction
function! SpaceVim#dev#Achievements#update()
let [start, end] = s:find_position()
if start != 0 && end != 0
if end - start > 1
exe (start + 1) . ',' . (end - 1) . 'delete'
endif
call append(start, s:generate_content())
endif
endfunction

View File

@ -0,0 +1,13 @@
function! SpaceVim#dev#z#updatedoc()
let keys = keys(g:_spacevim_mappings_z)
let lines = []
for key in keys
if key == '`'
let line = '`` z' . key . ' `` | ' . g:_spacevim_mappings_z[key][1]
else
let line = '`z' . key . '` | ' . g:_spacevim_mappings_z[key][1]
endif
call add(lines, line)
endfor
call append(line('.'), lines)
endfunction

View File

@ -81,13 +81,17 @@ for example, after pressing `<Space>` in normal mode, you will see :
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.
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
@ -210,20 +214,20 @@ curl -sLf https://spacevim.org/install.sh | bash -s -- -h
### windows support
- 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.
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.
```sh
git clone https://github.com/SpaceVim/SpaceVim.git vimfiles
```
```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.
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
```
```bash
git clone https://github.com/SpaceVim/SpaceVim.git AppData\Local\nvim
```
## Update

View File

@ -36,6 +36,9 @@ lockvar g:spacevim_version
" <
let g:spacevim_default_indent = 2
""
" Enable/Disable relativenumber, by default it is enabled.
let g:spacevim_relativenumber = 1
""
" Change the max number of columns for SpaceVim. Default is 120.
" >
" let g:spacevim_max_column = 120
@ -413,7 +416,6 @@ let g:spacevim_leader_guide_submode_mappings = {'<C-C>': "win_close"}
command -nargs=1 LeaderGuide call SpaceVim#mapping#guide#start_by_prefix('0', <args>)
"====
function! SpaceVim#loadCustomConfig() abort
let custom_confs_old = SpaceVim#util#globpath(getcwd(), '.local.vim')
@ -472,6 +474,7 @@ function! SpaceVim#end() abort
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')
@ -521,6 +524,10 @@ function! SpaceVim#end() abort
call SpaceVim#layers#core#statusline#init()
endif
if !g:spacevim_relativenumber
set norelativenumber
endif
if g:spacevim_realtime_leader_guide
nnoremap <silent><nowait> <leader> :<c-u>LeaderGuide get(g:, 'mapleader', '\')<CR>
vnoremap <silent> <leader> :<c-u>LeaderGuideVisual get(g:, 'mapleader', '\')<CR>

View File

@ -78,11 +78,11 @@ endfunction
function! s:search_status() abort
let ct = 0
let tt = 0
let ctl = split(s:VIMCOMP.execute('.,$s/' . @/ . '//gn', 'silent!'), "\n")
let ctl = split(s:VIMCOMP.execute('keeppatterns .,$s/' . @/ . '//gn', 'silent!'), "\n")
if !empty(ctl)
let ct = split(ctl[0])[0]
endif
let ttl = split(s:VIMCOMP.execute('%s/' . @/ . '//gn', 'silent!'), "\n")
let ttl = split(s:VIMCOMP.execute('keeppatterns %s/' . @/ . '//gn', 'silent!'), "\n")
if !empty(ctl)
let tt = split(ttl[0])[0]
endif

View File

@ -8,7 +8,7 @@ function! SpaceVim#layers#edit#plugins() abort
\ ['kana/vim-textobj-indent'],
\ ['kana/vim-textobj-line'],
\ ['kana/vim-textobj-entire'],
\ ['scrooloose/nerdcommenter'],
\ ['scrooloose/nerdcommenter', { 'loadconf' : 1}],
\ ['mattn/emmet-vim', { 'on_cmd' : 'EmmetInstall'}],
\ ['gcmt/wildfire.vim',{'on_map' : '<Plug>(wildfire-'}],
\ ['easymotion/vim-easymotion'],

View File

@ -52,10 +52,6 @@ function! SpaceVim#layers#incsearch#config() abort
\ ],
\ }), get(a:, 1, {}))
endfunction
noremap <silent><expr> z/ incsearch#go(<SID>config_fuzzyall())
noremap <silent><expr> z? incsearch#go(<SID>config_fuzzyall({'command': '?'}))
noremap <silent><expr> zg? incsearch#go(<SID>config_fuzzyall({'is_stay': 1}))
function! s:config_easyfuzzymotion(...) abort
return extend(copy({
\ 'converters': [incsearch#config#fuzzy#converter()],
@ -65,9 +61,6 @@ function! SpaceVim#layers#incsearch#config() abort
\ 'is_stay': 1
\ }), get(a:, 1, {}))
endfunction
noremap <silent><expr> <Space>/ incsearch#go(<SID>config_easyfuzzymotion())
call SpaceVim#mapping#space#def('nnoremap', ['/',], 'call feedkeys("\<Space>/", "m")', 'incsearch-fuzzy', 1)
endfunction

View File

@ -1,17 +1,29 @@
function! SpaceVim#layers#lang#javascript#plugins() abort
let plugins = []
call add(plugins,['pangloss/vim-javascript', { 'on_ft' : ['javascript']}])
if has('nvim')
call add(plugins,['carlitux/deoplete-ternjs', { 'on_ft' : ['javascript']}])
else
call add(plugins,['ternjs/tern_for_vim', { 'on_ft' : ['javascript'],
\ 'build' : 'npm install',
\ }])
endif
call add(plugins,['othree/javascript-libraries-syntax.vim', { 'on_ft' : ['javascript','coffee','ls','typescript']}])
call add(plugins,['mmalecki/vim-node.js', { 'on_ft' : ['javascript']}])
call add(plugins,['othree/yajs.vim', { 'on_ft' : ['javascript']}])
call add(plugins,['othree/es.next.syntax.vim', { 'on_ft' : ['javascript']}])
call add(plugins,['maksimr/vim-jsbeautify', { 'on_ft' : ['javascript']}])
return plugins
let plugins = []
call add(plugins,['pangloss/vim-javascript', { 'on_ft' : ['javascript']}])
if has('nvim')
call add(plugins,['carlitux/deoplete-ternjs', { 'on_ft' : ['javascript']}])
endif
call add(plugins,['ternjs/tern_for_vim', { 'on_ft' : ['javascript'],
\ 'build' : 'npm install',
\ }])
call add(plugins,['othree/javascript-libraries-syntax.vim', { 'on_ft' : ['javascript','coffee','ls','typescript']}])
call add(plugins,['mmalecki/vim-node.js', { 'on_ft' : ['javascript']}])
call add(plugins,['othree/yajs.vim', { 'on_ft' : ['javascript']}])
call add(plugins,['othree/es.next.syntax.vim', { 'on_ft' : ['javascript']}])
call add(plugins,['maksimr/vim-jsbeautify', { 'on_ft' : ['javascript']}])
return plugins
endfunction
function! SpaceVim#layers#lang#javascript#config() abort
call SpaceVim#mapping#gd#add('javascript', function('s:gotodef'))
endfunction
function! s:gotodef() abort
if exists(':TernDef')
TernDef
endif
endfunction
" vim:set et sw=2 cc=80:

View File

@ -0,0 +1,36 @@
""
" @section lang#kotlin, layer-lang-kotlin
" @parentsection layers
" This layer is for kotlin development.
function! SpaceVim#layers#lang#kotlin#plugins() abort
let plugins = []
call add(plugins, ['udalov/kotlin-vim'])
return plugins
endfunction
function! SpaceVim#layers#lang#kotlin#config() abort
if g:spacevim_enable_neomake
" neomake support:
let g:neomake_kotlin_kotlinc_maker = {
\ 'args': ['-cp', s:classpath(), '-d', s:outputdir()],
\ 'errorformat':
\ "%E%f:%l:%c: error: %m," .
\ "%W%f:%l:%c: warning: %m," .
\ "%Eerror: %m," .
\ "%Wwarning: %m," .
\ "%Iinfo: %m,"
\ }
let g:neomake_kotlin_enabled_makers = ['kotlinc']
endif
endfunction
func! s:classpath()
endf
func! s:outputdir()
endf

View File

@ -38,8 +38,8 @@
function! SpaceVim#layers#lang#rust#plugins() abort
let plugins = []
call add(plugins, ['racer-rust/vim-racer', { 'on_ft' : 'rust'}])
call add(plugins, ['rust-lang/rust.vim', {'merged' : 1}])
call add(plugins, ['racer-rust/vim-racer', {'on_ft' : 'rust'}])
call add(plugins, ['rust-lang/rust.vim', {'on_ft' : 'rust', 'merged' : 1}])
return plugins
endfunction

View File

@ -572,10 +572,12 @@ call SpaceVim#mapping#guide#register_prefix_descriptions(
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#mapping#guide#register_prefix_descriptions(
\ 'z',
\ 'g:_spacevim_mappings_z')
let &cpo = s:save_cpo
unlet s:save_cpo

View File

@ -293,6 +293,8 @@ function! SpaceVim#mapping#leader#getName(key) abort
return '[SPC]'
elseif a:key == 'g'
return '[g]'
elseif a:key == 'z'
return '[z]'
else
return '<leader>'
endif

View File

@ -13,6 +13,7 @@ function! SpaceVim#mapping#space#init() abort
let g:_spacevim_mappings_space.T = {'name' : '+UI toggles/themes'}
let g:_spacevim_mappings_space.a = {'name' : '+Applications'}
let g:_spacevim_mappings_space.b = {'name' : '+Buffers'}
let g:_spacevim_mappings_space.c = {'name' : '+Comments'}
let g:_spacevim_mappings_space.f = {'name' : '+Files'}
let g:_spacevim_mappings_space.j = {'name' : '+Jump/Join/Split'}
let g:_spacevim_mappings_space.w = {'name' : '+Windows'}
@ -65,11 +66,25 @@ function! SpaceVim#mapping#space#init() abort
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')
"
" Comments sections
"
" Toggles the comment state of the selected line(s). If the topmost selected
" line is commented, all selected lines are uncommented and vice versa.
call SpaceVim#mapping#space#def('nnoremap', ['c', 'l'], 'call NERDComment("n", "Toggle")', 'Toggle comment line(s)', 1)
let g:_spacevim_mappings_space.e = {'name' : '+Errors/Encoding'}
let g:_spacevim_mappings_space.B = {'name' : '+Global-buffers'}
nnoremap <silent> [SPC]tn :<C-u>setlocal nonumber! norelativenumber!<CR>
let g:_spacevim_mappings_space.t.n = ['setlocal nonumber! norelativenumber!', 'toggle line number']
call SpaceVim#mapping#menu('toggle line number', '[SPC]tn', 'set nu!')
if g:spacevim_relativenumber
nnoremap <silent> [SPC]tn :<C-u>setlocal nonumber! norelativenumber!<CR>
let g:_spacevim_mappings_space.t.n = ['setlocal nonumber! norelativenumber!', 'toggle line number']
call SpaceVim#mapping#menu('toggle line number', '[SPC]tn', 'set nu!')
else
nnoremap <silent> [SPC]tn :<C-u>setlocal number!<CR>
let g:_spacevim_mappings_space.t.n = ['setlocal number!', 'toggle line number']
call SpaceVim#mapping#menu('toggle line number', '[SPC]tn', 'setlocal number!')
endif
call SpaceVim#mapping#space#def('nnoremap', ['b', 'b'], 'Unite buffer', 'buffer list', 1)
call extend(g:_spacevim_mappings_prefixs['[SPC]'], get(g:, '_spacevim_mappings_space', {}))
call SpaceVim#mapping#space#def('nnoremap', ['r', 'l'], 'Unite resume', 'resume unite buffer', 1)

View File

@ -0,0 +1,93 @@
function! SpaceVim#mapping#z#init() abort "{{{
nnoremap <silent><nowait> [z] :<c-u>LeaderGuide "z"<CR>
nmap z [z]
let g:_spacevim_mappings_z = {}
let g:_spacevim_mappings_z['<CR>'] = ['call feedkeys("z\<CR>", "n")', 'cursor line to top']
nnoremap z<CR> z<CR>
let g:_spacevim_mappings_z['+'] = ['call feedkeys("z+", "n")', 'cursor to screen top line N']
nnoremap z+ z+
let g:_spacevim_mappings_z['-'] = ['call feedkeys("z-", "n")', 'cursor to screen bottom line N']
nnoremap z- z-
let g:_spacevim_mappings_z['^'] = ['call feedkeys("z^", "n")', 'cursor to screen bottom line N']
nnoremap z^ z^
let g:_spacevim_mappings_z['.'] = ['call feedkeys("z.", "n")', 'cursor line to center']
nnoremap z. z.
let g:_spacevim_mappings_z['='] = ['call feedkeys("z=", "n")', 'spelling suggestions']
nnoremap z= z=
let g:_spacevim_mappings_z['A'] = ['call feedkeys("zA", "n")', 'toggle folds recursively']
nnoremap zA zA
let g:_spacevim_mappings_z['C'] = ['call feedkeys("zC", "n")', 'close folds recursively']
nnoremap zC zC
let g:_spacevim_mappings_z['D'] = ['call feedkeys("zD", "n")', 'delete folds recursively']
nnoremap zD zD
let g:_spacevim_mappings_z['E'] = ['call feedkeys("zE", "n")', 'eliminate all folds']
nnoremap zE zE
let g:_spacevim_mappings_z['F'] = ['call feedkeys("zF", "n")', 'create a fold for N lines']
nnoremap zF zF
let g:_spacevim_mappings_z['G'] = ['call feedkeys("zG", "n")', 'mark good spelled(update internal-wordlist)']
nnoremap zG zG
let g:_spacevim_mappings_z['H'] = ['call feedkeys("zH", "n")', 'scroll half a screenwidth to the right']
nnoremap zH zH
let g:_spacevim_mappings_z['L'] = ['call feedkeys("zL", "n")', 'scroll half a screenwidth to the left']
nnoremap zL zL
let g:_spacevim_mappings_z['M'] = ['call feedkeys("zM", "n")', 'set `foldlevel` to zero']
nnoremap zM zM
let g:_spacevim_mappings_z['N'] = ['call feedkeys("zN", "n")', 'set `foldenable`']
nnoremap zN zN
let g:_spacevim_mappings_z['O'] = ['call feedkeys("zO", "n")', 'open folds recursively']
nnoremap zO zO
let g:_spacevim_mappings_z['R'] = ['call feedkeys("zR", "n")', 'set `foldlevel` to deepest fold']
nnoremap zR zR
let g:_spacevim_mappings_z['W'] = ['call feedkeys("zW", "n")', 'mark wrong spelled']
nnoremap zW zW
let g:_spacevim_mappings_z['X'] = ['call feedkeys("zX", "n")', 're-apply `foldleve`']
nnoremap zX zX
let g:_spacevim_mappings_z['a'] = ['call feedkeys("za", "n")', 'toggle a fold']
nnoremap za za
let g:_spacevim_mappings_z['b'] = ['call feedkeys("zb", "n")', 'redraw, cursor line at bottom']
nnoremap zb zb
let g:_spacevim_mappings_z['c'] = ['call feedkeys("zc", "n")', 'close a fold']
nnoremap zc zc
let g:_spacevim_mappings_z['d'] = ['call feedkeys("zd", "n")', 'delete a fold']
nnoremap zd zd
let g:_spacevim_mappings_z['e'] = ['call feedkeys("ze", "n")', 'right scroll horizontally to cursor position']
nnoremap ze ze
let g:_spacevim_mappings_z['f'] = ['call feedkeys("zf", "n")', 'create a fold for motion']
nnoremap zf zf
let g:_spacevim_mappings_z['g'] = ['call feedkeys("zg", "n")', 'mark good spelled']
nnoremap zg zg
let g:_spacevim_mappings_z['h'] = ['call feedkeys("zh", "n")', 'scroll screen N characters to right']
nnoremap zh zh
let g:_spacevim_mappings_z['<Left>'] = ['call feedkeys("zh", "n")', 'scroll screen N characters to right']
nnoremap z<Left> zh
let g:_spacevim_mappings_z['i'] = ['call feedkeys("zi", "n")', 'toggle foldenable']
nnoremap zi zi
let g:_spacevim_mappings_z['j'] = ['call feedkeys("zj", "n")', 'mode to start of next fold']
nnoremap zj zj
let g:_spacevim_mappings_z['k'] = ['call feedkeys("zk", "n")', 'mode to end of previous fold']
nnoremap zk zk
let g:_spacevim_mappings_z['l'] = ['call feedkeys("zl", "n")', 'scroll screen N characters to left']
nnoremap zl zl
let g:_spacevim_mappings_z['<Right>'] = ['call feedkeys("zl", "n")', 'scroll screen N characters to left']
nnoremap z<Right> zl
let g:_spacevim_mappings_z['m'] = ['call feedkeys("zm", "n")', 'subtract one from `foldlevel`']
nnoremap zm zm
let g:_spacevim_mappings_z['n'] = ['call feedkeys("zn", "n")', 'reset `foldenable`']
nnoremap zn zn
let g:_spacevim_mappings_z['o'] = ['call feedkeys("zo", "n")', 'open fold']
nnoremap zo zo
let g:_spacevim_mappings_z['r'] = ['call feedkeys("zr", "n")', 'add one to `foldlevel`']
nnoremap zr zr
let g:_spacevim_mappings_z.s = ['call feedkeys("zs", "n")', 'left scroll horizontally to cursor position']
nnoremap zs zs
let g:_spacevim_mappings_z['t'] = ['call feedkeys("zt", "n")', 'cursor line at top of window']
nnoremap zt zt
let g:_spacevim_mappings_z['v'] = ['call feedkeys("zv", "n")', 'open enough folds to view cursor line']
nnoremap zv zv
let g:_spacevim_mappings_z['x'] = ['call feedkeys("zx", "n")', 're-apply foldlevel and do "zV"']
nnoremap zx zx
" smart scroll
let g:_spacevim_mappings_z['z'] = ['call feedkeys("zz", "n")', 'smart scroll']
nnoremap zz zz
endfunction "}}}

View File

@ -16,7 +16,24 @@ endfunction
command! -range=% REPLSendSelection call REPLSend(s:GetVisual())
command! REPLSendLine call REPLSend([getline('.')])
" }}}
let $NVIM_TUI_ENABLE_CURSOR_SHAPE = g:spacevim_terminal_cursor_shape
" https://github.com/syngan/vim-vimlint/issues/102
function! s:has(version) abort
return has(a:version)
endfunction
if !s:has('nvim-0.2.0')
let $NVIM_TUI_ENABLE_CURSOR_SHAPE = g:spacevim_terminal_cursor_shape
else
if g:spacevim_terminal_cursor_shape == 0
" prevent nvim from changing the cursor shape
set guicursor=
elseif g:spacevim_terminal_cursor_shape == 1
" enable non-blinking mode-sensitive cursor
set guicursor=a:block-blinkon0
elseif g:spacevim_terminal_cursor_shape == 2
" enable blinking mode-sensitive cursor
set guicursor=n-v-c:block-blinkon10,i-ci-ve:ver25-blinkon10,r-cr:hor20,o:hor50
endif
endif
"silent! let &t_SI = "\<Esc>]50;CursorShape=1\x7"
"silent! let &t_SR = "\<Esc>]50;CursorShape=2\x7"
"silent! let &t_EI = "\<Esc>]50;CursorShape=0\x7"

View File

@ -39,7 +39,10 @@ let g:deoplete#omni#input_patterns.perl = get(g:deoplete#omni#input_patterns, 'p
\])
" javascript
let g:deoplete#omni#input_patterns.javascript = get(g:deoplete#omni#input_patterns, 'javascript', ['[^. \t0-9]\.\w*'])
"let g:deoplete#omni#input_patterns.javascript = get(g:deoplete#omni#input_patterns, 'javascript', ['[^. \t0-9]\.\w*'])
let g:deoplete#ignore_sources.javascript = get(g:deoplete#ignore_sources, 'javascript', ['omni'])
call deoplete#custom#set('ternjs', 'mark', 'tern')
call deoplete#custom#set('ternjs', 'rank', 9999)
" php
let g:deoplete#omni#input_patterns.php = get(g:deoplete#omni#input_patterns, 'php', [

View File

@ -0,0 +1,31 @@
scriptencoding utf-8
"
" nerd-commenter plugin settings
"
" Add extra space around delimiters when commenting, remove them when
" uncommenting
let g:NERDSpaceDelims = 1
" Always remove the extra spaces when uncommenting regardless of whether
" NERDSpaceDelims is set
let g:NERDRemoveExtraSpaces = 1
" Use compact syntax for prettified multi-line comments
let g:NERDCompactSexyComs = 1
" Align line-wise comment delimiters flush left instead of following code
" indentation
let g:NERDDefaultAlign = 'left'
" Allow commenting and inverting empty lines (useful when commenting a
" region)
let g:NERDCommentEmptyLines = 1
" Enable trimming of trailing whitespace when uncommenting
let g:NERDTrimTrailingWhitespace = 1
" Always use alternative delimiter
let g:NERD_c_alt_style = 1
let g:NERDCustomDelimiters = {'c': { 'left': '//', 'leftAlt': '/*', 'rightAlt': '*/' }}

View File

@ -8,6 +8,7 @@ let g:vimfiler_tree_closed_icon = get(g:, 'vimfiler_tree_closed_icon', '▷')
let g:vimfiler_file_icon = get(g:, 'vimfiler_file_icon', '')
let g:vimfiler_readonly_file_icon = get(g:, 'vimfiler_readonly_file_icon', '*')
let g:vimfiler_marked_file_icon = get(g:, 'vimfiler_marked_file_icon', '√')
let g:vimfiler_direction = get(g:, 'vimfiler_direction', 'rightbelow')
"let g:vimfiler_preview_action = 'auto_preview'
let g:vimfiler_ignore_pattern = get(g:, 'vimfiler_ignore_pattern', [
\ '^\.git$',
@ -41,7 +42,7 @@ call vimfiler#custom#profile('default', 'context', {
\ 'winminwidth' : 30,
\ 'toggle' : 1,
\ 'auto_expand': 1,
\ 'direction' : 'rightbelow',
\ 'direction' : g:vimfiler_direction,
\ 'explorer_columns' : s:setcolum(),
\ 'parent': 0,
\ 'status' : 1,

View File

@ -35,17 +35,18 @@ CONTENTS *SpaceVim-contents*
12. lang#elixir.............................|SpaceVim-layer-lang-elixir|
13. lang#go.....................................|SpaceVim-layer-lang-go|
14. lang#java.................................|SpaceVim-layer-lang-java|
15. lang#ocaml...............................|SpaceVim-layer-lang-ocaml|
16. lang#php...................................|SpaceVim-layer-lang-php|
17. lang#puppet.............................|SpaceVim-layer-lang-puppet|
18. lang#python.............................|SpaceVim-layer-lang-python|
19. lang#rust.................................|SpaceVim-layer-lang-rust|
20. lang#scala...............................|SpaceVim-layer-lang-scala|
21. lang#tmux.................................|SpaceVim-layer-lang-tmux|
22. lang#xml...................................|SpaceVim-layer-lang-xml|
23. operator...................................|SpaceVim-layer-operator|
24. shell.........................................|SpaceVim-layer-shell|
25. tmux...........................................|SpaceVim-layer-tmux|
15. lang#kotlin.............................|SpaceVim-layer-lang-kotlin|
16. lang#ocaml...............................|SpaceVim-layer-lang-ocaml|
17. lang#php...................................|SpaceVim-layer-lang-php|
18. lang#puppet.............................|SpaceVim-layer-lang-puppet|
19. lang#python.............................|SpaceVim-layer-lang-python|
20. lang#rust.................................|SpaceVim-layer-lang-rust|
21. lang#scala...............................|SpaceVim-layer-lang-scala|
22. lang#tmux.................................|SpaceVim-layer-lang-tmux|
23. lang#xml...................................|SpaceVim-layer-lang-xml|
24. operator...................................|SpaceVim-layer-operator|
25. shell.........................................|SpaceVim-layer-shell|
26. tmux...........................................|SpaceVim-layer-tmux|
6. API........................................................|SpaceVim-api|
1. cmdlinemenu................................|SpaceVim-api-cmdlinemenu|
2. sid............................................|SpaceVim-api-vim-sid|
@ -75,6 +76,9 @@ Change the default indentation of SpaceVim. Default is 2.
let g:spacevim_default_indent = 2
<
*g:spacevim_relativenumber*
Enable/Disable relativenumber, by default it is enabled.
*g:spacevim_max_column*
Change the max number of columns for SpaceVim. Default is 120.
>
@ -792,6 +796,11 @@ https://github.com/google/google-java-format
and set 'g:spacevim_layer_lang_java_formatter' to the path of the jar.
==============================================================================
LANG#KOTLIN *SpaceVim-layer-lang-kotlin*
This layer is for kotlin development.
==============================================================================
LANG#OCAML *SpaceVim-layer-lang-ocaml*

View File

@ -65,6 +65,7 @@ title: "Documentation"
* [File tree navigation](#file-tree-navigation)
* [Open file with file tree.](#open-file-with-file-tree)
* [Commands starting with `g`](#commands-starting-with-g)
* [Commands starting with `z`](#commands-starting-with-z)
* [Auto-saving](#auto-saving)
* [Searching](#searching)
* [With an external tool](#with-an-external-tool)
@ -78,6 +79,9 @@ title: "Documentation"
* [Editing](#editing)
* [Multi-Encodings](#multi-encodings)
* [Errors handling](#errors-handling)
* [Achievements](#achievements)
* [issues](#issues)
* [Stars, forks and watchers](#stars-forks-and-watchers)
* [Features](#features)
* [Awesome ui](#awesome-ui-1)
* [Mnemonic key bindings](#mnemonic-key-bindings)
@ -864,6 +868,7 @@ Key Binding | Description
`l` or `Enter` | open file in one window
`sg` | open file in an vertically split window
`sv` | open file in an horizontally split window
<<<<<<< HEAD
### Commands starting with `g`
@ -917,6 +922,55 @@ Key Binding | Description
`g<End>` | go to rightmost character
`g<C-G>` | show cursor info
### Commands starting with `z`
after pressing prefix `z` in normal mode, if you do not remember the mappings, you will see the guide which will tell you the functional of all mappings starting with `z`.
Key Binding | Description
-----------| -----------
`z<Right>` | scroll screen N characters to left
`z+` | cursor to screen top line N
`z-` | cursor to screen bottom line N
`z.` | cursor line to center
`z<CR>` | cursor line to top
`z=` | spelling suggestions
`zA` | toggle folds recursively
`zC` | close folds recursively
`zD` | delete folds recursively
`zE` | eliminate all folds
`zF` | create a fold for N lines
`zG` | mark good spelled(update internal-wordlist)
`zH` | scroll half a screenwidth to the right
`zL` | scroll half a screenwidth to the left
`zM` | set `foldlevel` to zero
`zN` | set `foldenable`
`zO` | open folds recursively
`zR` | set `foldlevel` to deepest fold
`zW` | mark wrong spelled
`zX` | re-apply `foldleve`
`z^` | cursor to screen bottom line N
`za` | toggle a fold
`zb` | redraw, cursor line at bottom
`zc` | close a fold
`zd` | delete a fold
`ze` | right scroll horizontally to cursor position
`zf` | create a fold for motion
`zg` | mark good spelled
`zh` | scroll screen N characters to right
`zi` | toggle foldenable
`zj` | mode to start of next fold
`zk` | mode to end of previous fold
`zl` | scroll screen N characters to left
`zm` | subtract one from `foldlevel`
`zn` | reset `foldenable`
`zo` | open fold
`zr` | add one to `foldlevel`
`zs` | left scroll horizontally to cursor position
`zt` | cursor line at top of window
`zv` | open enough folds to view cursor line
`zx` | re-apply foldlevel and do "zV"
`zz` | smart scroll
`z<Left>` | scroll screen N characters to right
### Auto-saving
@ -1095,6 +1149,27 @@ Symbol | Description | Custom option
`✖` | Error | `g:spacevim_error_symbol`
`➤` | warning | `g:spacevim_warning_symbol`
<!-- SpaceVim Achievements start -->
## Achievements
### issues
Achievements | Account
----- | -----
[100th issue(issue)](https://github.com/SpaceVim/SpaceVim/issues/100) | [BenBergman](https://github.com/BenBergman)
### Stars, forks and watchers
Achievements | Account
----- | -----
First stargazers | [monkeydterry](https://github.com/monkeydterry)
100th stargazers | [naraj](https://github.com/naraj)
1000th stargazers | [icecity96](https://github.com/icecity96)
2000th stargazers | [frowhy](https://github.com/frowhy)
3000th stargazers | [purkylin](https://github.com/purkylin)
<!-- SpaceVim Achievements end -->
## Features
### Awesome ui

View File

@ -1 +1,3 @@
au BufRead,BufNewFile *.rs set filetype=rust
" vim:set et sw=2