mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-02-03 08:30:06 +08:00
Merge branch 'dev' into index
This commit is contained in:
commit
e64798fa9b
@ -29,6 +29,7 @@ function! s:layer_list() abort
|
|||||||
\ '| Name | Description |',
|
\ '| Name | Description |',
|
||||||
\ '| ---------- | ------------ |'
|
\ '| ---------- | ------------ |'
|
||||||
\ ]
|
\ ]
|
||||||
|
call remove(layers, index(layers, '/home/wsdjeg/.SpaceVim/docs/layers/index.md'))
|
||||||
for layer in layers
|
for layer in layers
|
||||||
let name = split(layer, '/docs/layers')[1][:-4] . '/'
|
let name = split(layer, '/docs/layers')[1][:-4] . '/'
|
||||||
let url = 'https://spacevim.org/layers' . name
|
let url = 'https://spacevim.org/layers' . name
|
||||||
|
@ -11,17 +11,15 @@ docker pull spacevim/vims
|
|||||||
git fetch origin dev:dev
|
git fetch origin dev:dev
|
||||||
|
|
||||||
if [ "${LINT#vimlint}" != "$LINT" ]; then
|
if [ "${LINT#vimlint}" != "$LINT" ]; then
|
||||||
git clone --depth=1 https://github.com/syngan/vim-vimlint /tmp/vimlint
|
git clone --depth=1 https://github.com/syngan/vim-vimlint /tmp/vimlint
|
||||||
git clone --depth=1 https://github.com/ynkdir/vim-vimlparser /tmp/vimlparser
|
git clone --depth=1 https://github.com/ynkdir/vim-vimlparser /tmp/vimlparser
|
||||||
elif [ "${LINT#vint}" != "$LINT" ]; then
|
elif [ "${LINT#vint}" != "$LINT" ]; then
|
||||||
pip install vim-vint
|
pip install vim-vint
|
||||||
elif [ "${LINT#vader}" != "$LINT" ]; then
|
elif [ "${LINT#vader}" != "$LINT" ]; then
|
||||||
git clone --depth=1 https://github.com/Shougo/dein.vim.git ~/.cache/vimfiles/repos/github.com/Shougo/dein.vim
|
git clone --depth=1 https://github.com/Shougo/dein.vim.git ~/.cache/vimfiles/repos/github.com/Shougo/dein.vim
|
||||||
if [ ! -f "$HOME/deps/bin/vim" ]; then
|
C_OPTS="--prefix=$DEPS --with-features=huge --disable-gui --enable-pythoninterp"
|
||||||
C_OPTS="--prefix=$DEPS --with-features=huge --disable-gui --enable-pythoninterp"
|
(git clone --depth 1 https://github.com/vim/vim /tmp/vim &&
|
||||||
(git clone --depth 1 https://github.com/vim/vim /tmp/vim &&
|
cd /tmp/vim &&
|
||||||
cd /tmp/vim &&
|
./configure $C_OPTS &&
|
||||||
./configure $C_OPTS &&
|
make install)
|
||||||
make install)
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
|
@ -2,31 +2,32 @@
|
|||||||
|
|
||||||
set -ex
|
set -ex
|
||||||
if [ "$LINT" = "vimlint" ]; then
|
if [ "$LINT" = "vimlint" ]; then
|
||||||
for file in $(git diff --name-only HEAD dev | grep .vim$);
|
for file in $(git diff --name-only HEAD dev | grep .vim$);
|
||||||
do
|
do
|
||||||
sh /tmp/vimlint/bin/vimlint.sh -l /tmp/vimlint -p /tmp/vimlparser $file;
|
sh /tmp/vimlint/bin/vimlint.sh -l /tmp/vimlint -p /tmp/vimlparser $file;
|
||||||
done
|
done
|
||||||
elif [ "$LINT" = "vimlint-errors" ]; then
|
elif [ "$LINT" = "vimlint-errors" ]; then
|
||||||
if [[ -f build_log ]]; then
|
if [[ -f build_log ]]; then
|
||||||
rm build_log
|
rm build_log
|
||||||
fi
|
fi
|
||||||
for file in $(git diff --name-only HEAD dev | grep .vim$);
|
for file in $(git diff --name-only HEAD dev | grep .vim$);
|
||||||
do
|
do
|
||||||
/tmp/vimlint/bin/vimlint.sh -E -l /tmp/vimlint -p /tmp/vimlparser $file >> build_log 2>&1;
|
/tmp/vimlint/bin/vimlint.sh -E -l /tmp/vimlint -p /tmp/vimlparser $file >> build_log 2>&1;
|
||||||
done
|
done
|
||||||
if [[ -s build_log ]]; then
|
if [[ -s build_log ]]; then
|
||||||
cat build_log
|
cat build_log
|
||||||
exit 2
|
exit 2
|
||||||
fi
|
fi
|
||||||
elif [ "$LINT" = "vint" ]; then
|
elif [ "$LINT" = "vint" ]; then
|
||||||
vint .
|
vint .
|
||||||
elif [ "$LINT" = "vint-errors" ]; then
|
elif [ "$LINT" = "vint-errors" ]; then
|
||||||
vint --error .
|
vint --error .
|
||||||
elif [ "$LINT" = "vader" ]; then
|
elif [ "$LINT" = "vader" ]; then
|
||||||
pip install covimerage
|
vim --version
|
||||||
make test_coverage
|
pip install covimerage
|
||||||
covimerage -vv xml --omit 'build/*'
|
make test_coverage
|
||||||
pip install codecov
|
covimerage -vv xml --omit 'build/*'
|
||||||
codecov -X search gcov pycov -f coverage.xml
|
pip install codecov
|
||||||
|
codecov -X search gcov pycov -f coverage.xml
|
||||||
fi
|
fi
|
||||||
set +x
|
set +x
|
||||||
|
@ -32,6 +32,7 @@ jobs:
|
|||||||
- env: LINT=vint-errors VIM=nvim VIM_VERSION=v0.2.0
|
- env: LINT=vint-errors VIM=nvim VIM_VERSION=v0.2.0
|
||||||
- env: LINT=vint VIM=nvim VIM_VERSION=v0.2.0
|
- env: LINT=vint VIM=nvim VIM_VERSION=v0.2.0
|
||||||
- env: LINT=vader
|
- env: LINT=vader
|
||||||
|
addons: { apt: { packages: [python2.7-dev] } }
|
||||||
allow_failures:
|
allow_failures:
|
||||||
- env: LINT=vimlint VIM=nvim VIM_VERSION=v0.2.0
|
- env: LINT=vimlint VIM=nvim VIM_VERSION=v0.2.0
|
||||||
- env: LINT=vint VIM=nvim VIM_VERSION=v0.2.0
|
- env: LINT=vint VIM=nvim VIM_VERSION=v0.2.0
|
||||||
|
@ -79,6 +79,8 @@ function! SpaceVim#autocmds#init() abort
|
|||||||
autocmd BufWritePost *.vim call s:generate_doc()
|
autocmd BufWritePost *.vim call s:generate_doc()
|
||||||
autocmd ColorScheme gruvbox call s:fix_gruvbox()
|
autocmd ColorScheme gruvbox call s:fix_gruvbox()
|
||||||
autocmd VimEnter * call SpaceVim#autocmds#VimEnter()
|
autocmd VimEnter * call SpaceVim#autocmds#VimEnter()
|
||||||
|
autocmd User RooterChDir call SpaceVim#plugins#projectmanager#RootchandgeCallback()
|
||||||
|
autocmd BufEnter * let b:_spacevim_project_name = get(g:, '_spacevim_project_name', '')
|
||||||
augroup END
|
augroup END
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
@ -16,6 +16,7 @@ function! SpaceVim#layers#core#config() abort
|
|||||||
call SpaceVim#layers#load('core#tabline')
|
call SpaceVim#layers#load('core#tabline')
|
||||||
call SpaceVim#mapping#space#def('nnoremap', ['p', 't'], 'Rooter', 'find-project-root', 1)
|
call SpaceVim#mapping#space#def('nnoremap', ['p', 't'], 'Rooter', 'find-project-root', 1)
|
||||||
call SpaceVim#mapping#space#def('nnoremap', ['p', 'k'], 'call SpaceVim#plugins#projectmanager#kill_project()', 'kill all project buffers', 1)
|
call SpaceVim#mapping#space#def('nnoremap', ['p', 'k'], 'call SpaceVim#plugins#projectmanager#kill_project()', 'kill all project buffers', 1)
|
||||||
|
call SpaceVim#mapping#space#def('nnoremap', ['p', 'p'], 'call SpaceVim#plugins#projectmanager#list()', 'List all projects', 1)
|
||||||
let lnum = expand('<slnum>') + s:lnum - 1
|
let lnum = expand('<slnum>') + s:lnum - 1
|
||||||
if has('python3')
|
if has('python3')
|
||||||
let cmd = 'Denite file_rec'
|
let cmd = 'Denite file_rec'
|
||||||
@ -44,6 +45,9 @@ function! SpaceVim#layers#core#config() abort
|
|||||||
call SpaceVim#mapping#space#def('nnoremap', ['q', 'r'], '', 'restart-vim-resume-layouts(TODO)', 1)
|
call SpaceVim#mapping#space#def('nnoremap', ['q', 'r'], '', 'restart-vim-resume-layouts(TODO)', 1)
|
||||||
call SpaceVim#mapping#space#def('nnoremap', ['q', 't'], 'tabclose!', 'kill current tab', 1)
|
call SpaceVim#mapping#space#def('nnoremap', ['q', 't'], 'tabclose!', 'kill current tab', 1)
|
||||||
call SpaceVim#mapping#gd#add('HelpDescribe', function('s:gotodef'))
|
call SpaceVim#mapping#gd#add('HelpDescribe', function('s:gotodef'))
|
||||||
|
" project manager
|
||||||
|
call SpaceVim#mapping#space#def('nnoremap', ['p', '!'], 'Grepper', 'fuzzy search for text in current project', 1)
|
||||||
|
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! s:gotodef() abort
|
function! s:gotodef() abort
|
||||||
|
@ -8,7 +8,29 @@
|
|||||||
" @section(layer-checkers)
|
" @section(layer-checkers)
|
||||||
|
|
||||||
function! SpaceVim#layers#lang#elixir#plugins() abort
|
function! SpaceVim#layers#lang#elixir#plugins() abort
|
||||||
let plugins = []
|
let plugins = []
|
||||||
call add(plugins, ['slashmili/alchemist.vim', {'on_ft' : 'elixir'}])
|
call add(plugins, ['elixir-editors/vim-elixir', {'on_ft' : 'elixir'}])
|
||||||
return plugins
|
call add(plugins, ['slashmili/alchemist.vim', {'on_ft' : 'elixir'}])
|
||||||
|
return plugins
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
|
||||||
|
function! SpaceVim#layers#lang#elixir#config()
|
||||||
|
call SpaceVim#plugins#repl#reg('elixir', 'iex')
|
||||||
|
call SpaceVim#mapping#space#regesit_lang_mappings('elixir', funcref('s:language_specified_mappings'))
|
||||||
|
endfunction
|
||||||
|
function! s:language_specified_mappings() abort
|
||||||
|
let g:_spacevim_mappings_space.l.s = {'name' : '+Send'}
|
||||||
|
call SpaceVim#mapping#space#langSPC('nmap', ['l','s', 'i'],
|
||||||
|
\ 'call SpaceVim#plugins#repl#start("elixir")',
|
||||||
|
\ '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)
|
||||||
endfunction
|
endfunction
|
||||||
|
@ -82,7 +82,10 @@ endfunction
|
|||||||
function! SpaceVim#layers#unite#config() abort
|
function! SpaceVim#layers#unite#config() abort
|
||||||
call SpaceVim#mapping#space#def('nnoremap', ['!'], 'call call('
|
call SpaceVim#mapping#space#def('nnoremap', ['!'], 'call call('
|
||||||
\ . string(s:_function('s:run_shell_cmd')) . ', [])',
|
\ . string(s:_function('s:run_shell_cmd')) . ', [])',
|
||||||
\ 'shell cmd', 1)
|
\ 'shell cmd(current dir)', 1)
|
||||||
|
call SpaceVim#mapping#space#def('nnoremap', ['p', '!'], 'call call('
|
||||||
|
\ . string(s:_function('s:run_shell_cmd_project')) . ', [])',
|
||||||
|
\ 'shell cmd(project root)', 1)
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! s:run_shell_cmd() abort
|
function! s:run_shell_cmd() abort
|
||||||
@ -92,6 +95,18 @@ function! s:run_shell_cmd() abort
|
|||||||
endif
|
endif
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
function! s:run_shell_cmd_project() abort
|
||||||
|
let cmd = input('Please input shell command:', '', 'customlist,SpaceVim#plugins#bashcomplete#complete')
|
||||||
|
if !empty(cmd)
|
||||||
|
call unite#start([['output/shellcmd', cmd]], {
|
||||||
|
\ 'log': 1,
|
||||||
|
\ 'wrap': 1,
|
||||||
|
\ 'start_insert':0,
|
||||||
|
\ 'cwd' : SpaceVim#plugins#projectmanager#current_root(),
|
||||||
|
\ })
|
||||||
|
endif
|
||||||
|
endfunction
|
||||||
|
|
||||||
" function() wrapper
|
" function() wrapper
|
||||||
if v:version > 703 || v:version == 703 && has('patch1170')
|
if v:version > 703 || v:version == 703 && has('patch1170')
|
||||||
function! s:_function(fstr) abort
|
function! s:_function(fstr) abort
|
||||||
|
@ -18,36 +18,70 @@
|
|||||||
let s:project_paths = {}
|
let s:project_paths = {}
|
||||||
|
|
||||||
function! s:cache_project(prj) abort
|
function! s:cache_project(prj) abort
|
||||||
if !has_key(s:project_paths, a:prj.path)
|
if !has_key(s:project_paths, a:prj.path)
|
||||||
let s:project_paths[a:prj.path] = a:prj
|
let s:project_paths[a:prj.path] = a:prj
|
||||||
endif
|
let desc = '[' . a:prj.name . '] ' . a:prj.path
|
||||||
|
let cmd = 'call SpaceVim#plugins#projectmanager#open("' . a:prj.path . '")'
|
||||||
|
call add(g:unite_source_menu_menus.Projects.command_candidates, [desc,cmd])
|
||||||
|
endif
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
let g:unite_source_menu_menus =
|
||||||
|
\ get(g:,'unite_source_menu_menus',{})
|
||||||
|
let g:unite_source_menu_menus.Projects = {'description':
|
||||||
|
\ 'Custom mapped keyboard shortcuts [SPC] p p'}
|
||||||
|
let g:unite_source_menu_menus.Projects.command_candidates =
|
||||||
|
\ get(g:unite_source_menu_menus.Projects,'command_candidates', [])
|
||||||
|
|
||||||
function! SpaceVim#plugins#projectmanager#list() abort
|
function! SpaceVim#plugins#projectmanager#list() abort
|
||||||
|
Unite menu:Projects
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! SpaceVim#plugins#projectmanager#current_()
|
function! SpaceVim#plugins#projectmanager#open(project) abort
|
||||||
return get(b:, '_spacevim_project_name', '')
|
let path = s:project_paths[a:project]['path']
|
||||||
|
tabnew
|
||||||
|
exe 'lcd ' . path
|
||||||
|
Startify | VimFiler
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
function! SpaceVim#plugins#projectmanager#current_name() abort
|
||||||
|
return get(b:, '_spacevim_project_name', '')
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
function! SpaceVim#plugins#projectmanager#RootchandgeCallback() abort
|
||||||
|
|
||||||
|
let project = {
|
||||||
|
\ 'path' : getcwd(),
|
||||||
|
\ 'name' : fnamemodify(getcwd(), ':t')
|
||||||
|
\ }
|
||||||
|
call s:cache_project(project)
|
||||||
|
let g:_spacevim_project_name = project.name
|
||||||
|
let b:_spacevim_project_name = g:_spacevim_project_name
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
function! SpaceVim#plugins#projectmanager#current_root() abort
|
||||||
|
try
|
||||||
|
Rooter
|
||||||
|
catch
|
||||||
|
endtry
|
||||||
|
return getcwd()
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
let s:BUFFER = SpaceVim#api#import('vim#buffer')
|
let s:BUFFER = SpaceVim#api#import('vim#buffer')
|
||||||
|
|
||||||
function! SpaceVim#plugins#projectmanager#kill_project() abort
|
function! SpaceVim#plugins#projectmanager#kill_project() abort
|
||||||
let name = get(b:, '_spacevim_project_name', '')
|
let name = get(b:, '_spacevim_project_name', '')
|
||||||
if name != ''
|
if name != ''
|
||||||
call s:BUFFER.filter_do(
|
call s:BUFFER.filter_do(
|
||||||
\ {
|
\ {
|
||||||
\ 'expr' : [
|
\ 'expr' : [
|
||||||
\ 'buflisted(v:val)',
|
\ 'buflisted(v:val)',
|
||||||
\ 'index(tabpagebuflist(), v:val) == -1',
|
\ 'getbufvar(v:val, "_spacevim_project_name") == "' . name . '"',
|
||||||
\ 'getbufvar(v:val, "_spacevim_project_name") == ' . name,
|
\ ],
|
||||||
\ ],
|
\ 'do' : 'bd %d'
|
||||||
\ 'do' : 'bd %d'
|
\ }
|
||||||
\ }
|
\ )
|
||||||
\ )
|
endif
|
||||||
endif
|
|
||||||
|
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
@ -41,6 +41,15 @@ function! SpaceVim#plugins#repl#send(type) abort
|
|||||||
elseif a:type ==# 'buffer'
|
elseif a:type ==# 'buffer'
|
||||||
call s:JOB.send(s:job_id, getline(1, '$') + [''])
|
call s:JOB.send(s:job_id, getline(1, '$') + [''])
|
||||||
elseif a:type ==# 'selection'
|
elseif a:type ==# 'selection'
|
||||||
|
let begin = getpos("'<")
|
||||||
|
let end = getpos("'>")
|
||||||
|
if begin[1] != 0 && end[1] != 0
|
||||||
|
call s:JOB.send(s:job_id, getline(begin[1], end[1]) + [''])
|
||||||
|
else
|
||||||
|
echohl WarningMsg
|
||||||
|
echo 'no selection text'
|
||||||
|
echohl None
|
||||||
|
endif
|
||||||
else
|
else
|
||||||
endif
|
endif
|
||||||
endfunction
|
endfunction
|
||||||
|
@ -52,7 +52,7 @@ if WINDOWS()
|
|||||||
" fallback into cp1252 instead of eg. iso-8859-15.
|
" fallback into cp1252 instead of eg. iso-8859-15.
|
||||||
" Newer Windows files might contain utf-8 or utf-16 LE so we might
|
" Newer Windows files might contain utf-8 or utf-16 LE so we might
|
||||||
" want to try them first.
|
" want to try them first.
|
||||||
set fileencodings=ucs-bom,utf-8,utf-16le,cp1252,iso-8859-15
|
set fileencodings=ucs-bom,utf-8,gbk,utf-16le,cp1252,iso-8859-15
|
||||||
endif
|
endif
|
||||||
|
|
||||||
else
|
else
|
||||||
|
@ -31,6 +31,7 @@ function! s:parser_argv() abort
|
|||||||
endif
|
endif
|
||||||
endfunction
|
endfunction
|
||||||
let s:status = s:parser_argv()
|
let s:status = s:parser_argv()
|
||||||
|
call SpaceVim#plugins#projectmanager#RootchandgeCallback()
|
||||||
if s:status[0]
|
if s:status[0]
|
||||||
let g:_spacevim_enter_dir = s:status[1]
|
let g:_spacevim_enter_dir = s:status[1]
|
||||||
augroup SPwelcome
|
augroup SPwelcome
|
||||||
|
@ -22,7 +22,6 @@ description: "Development information about SpaceVim, including contributing gui
|
|||||||
- [Contributor to an existing layer](#contributor-to-an-existing-layer)
|
- [Contributor to an existing layer](#contributor-to-an-existing-layer)
|
||||||
- [Contributing a keybinding](#contributing-a-keybinding)
|
- [Contributing a keybinding](#contributing-a-keybinding)
|
||||||
- [Contributing a banner](#contributing-a-banner)
|
- [Contributing a banner](#contributing-a-banner)
|
||||||
- [Contributing a statusline theme](#contributing-a-statusline-theme)
|
|
||||||
- [Build with SpaceVim](#build-with-spacevim)
|
- [Build with SpaceVim](#build-with-spacevim)
|
||||||
- [Changelog](#changelog)
|
- [Changelog](#changelog)
|
||||||
|
|
||||||
@ -237,8 +236,6 @@ If you have some ASCII skills you can submit your artwork!
|
|||||||
|
|
||||||
You are free to choose a reasonable height size but the width size should be around 75 characters.
|
You are free to choose a reasonable height size but the width size should be around 75 characters.
|
||||||
|
|
||||||
#### Contributing a statusline theme
|
|
||||||
|
|
||||||
## Build with SpaceVim
|
## Build with SpaceVim
|
||||||
|
|
||||||
SpaceVim provide a lot of public [APIs](https://spacevim.org/apis), you can create plugins base on this APIs. also you can add a badge to the README.md of your plugin.
|
SpaceVim provide a lot of public [APIs](https://spacevim.org/apis), you can create plugins base on this APIs. also you can add a badge to the README.md of your plugin.
|
||||||
|
@ -1422,12 +1422,13 @@ project manager commands start with `p`:
|
|||||||
|
|
||||||
#### Searching files in project
|
#### Searching files in project
|
||||||
|
|
||||||
| Key Binding | Description |
|
| Key Binding | Description |
|
||||||
| ----------- | ----------------------------------------------------- |
|
| ----------- | ---------------------------------------- |
|
||||||
| `SPC p f` | find files in current project |
|
| `SPC p f` | find files in current project |
|
||||||
| `SPC p /` | fuzzy search for text in current project |
|
| `SPC p /` | fuzzy search for text in current project |
|
||||||
| `SPC p k` | kill all project buffers |
|
| `SPC p k` | kill all buffers of current project |
|
||||||
| `SPC p t` | find project root |
|
| `SPC p t` | find project root |
|
||||||
|
| `SPC p p` | list all projects |
|
||||||
|
|
||||||
## EditorConfig
|
## EditorConfig
|
||||||
|
|
||||||
|
@ -28,10 +28,11 @@ call SpaceVim#layers#load('shell',
|
|||||||
| [checkers](https://spacevim.org/layers/checkers/) | This layer provides syntax checking feature |
|
| [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 |
|
| [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. |
|
| [colorscheme](https://spacevim.org/layers/colorscheme/) | colorscheme provides a list of colorscheme for SpaceVim, default colorscheme is gruvbox with dark theme. |
|
||||||
|
| [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 |
|
| [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 |
|
| [git](https://spacevim.org/layers/git/) | This layers adds extensive support for git |
|
||||||
| [index](https://spacevim.org/layers/index/) | list of available layers in SpaceVim |
|
|
||||||
| [lang#c](https://spacevim.org/layers/lang/c/) | This layer is for c/c++/object-c development |
|
| [lang#c](https://spacevim.org/layers/lang/c/) | This layer is for c/c++/object-c development |
|
||||||
|
| [lang#elixir](https://spacevim.org/layers/lang/elixir/) | This layer is for elixir development, provide autocompletion, syntax checking, code format for elixir file. |
|
||||||
| [lang#java](https://spacevim.org/layers/lang/java/) | This layer is for Java development |
|
| [lang#java](https://spacevim.org/layers/lang/java/) | This layer is for Java development |
|
||||||
| [lang#javascript](https://spacevim.org/layers/lang/javascript/) | This layer is for JaveScript development |
|
| [lang#javascript](https://spacevim.org/layers/lang/javascript/) | This layer is for JaveScript development |
|
||||||
| [lang#lisp](https://spacevim.org/layers/lang/lisp/) | for lisp development |
|
| [lang#lisp](https://spacevim.org/layers/lang/lisp/) | for lisp development |
|
||||||
|
56
docs/layers/lang/elixir.md
Normal file
56
docs/layers/lang/elixir.md
Normal file
@ -0,0 +1,56 @@
|
|||||||
|
---
|
||||||
|
title: "SpaceVim lang#elixir layer"
|
||||||
|
description: "This layer is for elixir development, provide autocompletion, syntax checking, code format for elixir file."
|
||||||
|
---
|
||||||
|
|
||||||
|
# [SpaceVim Layers:](https://spacevim.org/layers) lang#elixir
|
||||||
|
|
||||||
|
<!-- vim-markdown-toc GFM -->
|
||||||
|
|
||||||
|
- [Description](#description)
|
||||||
|
- [Features](#features)
|
||||||
|
- [Install](#install)
|
||||||
|
- [Layer](#layer)
|
||||||
|
- [Key bindings](#key-bindings)
|
||||||
|
- [Inferior REPL process](#inferior-repl-process)
|
||||||
|
- [Running current script](#running-current-script)
|
||||||
|
|
||||||
|
<!-- vim-markdown-toc -->
|
||||||
|
|
||||||
|
## Description
|
||||||
|
|
||||||
|
This layer is for Elixir development.
|
||||||
|
|
||||||
|
## Features
|
||||||
|
|
||||||
|
This layer include the plugin [slashmili/alchemist.vim](https://github.com/slashmili/alchemist.vim), which provides:
|
||||||
|
|
||||||
|
- Completion for Modules and functions.
|
||||||
|
- Documentation lookup for Modules and functions.
|
||||||
|
- Jump to the definition.
|
||||||
|
|
||||||
|
SpaceVim also provides REPL/Debug support for elixir.
|
||||||
|
|
||||||
|
## Install
|
||||||
|
|
||||||
|
### Layer
|
||||||
|
|
||||||
|
To use this configuration layer, add `SPLayer 'lang#elixir'` to your custom configuration file.
|
||||||
|
|
||||||
|
## Key bindings
|
||||||
|
|
||||||
|
### Inferior REPL process
|
||||||
|
|
||||||
|
Start a `iex` 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 current script, you can press `SPC l r` to run current file without loss focus, and the result will be shown in a runner buffer.
|
@ -59,4 +59,4 @@ Send code to inferior process commands:
|
|||||||
|
|
||||||
### Running current script
|
### Running current script
|
||||||
|
|
||||||
To running a python script, you can press `SPC l r` to run current file without loss focus, and the result will be shown in a runner buffer.
|
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.
|
||||||
|
Loading…
Reference in New Issue
Block a user