2018-02-19 22:07:04 +08:00
|
|
|
"=============================================================================
|
|
|
|
" sh.vim --- SpaceVim lang#sh layer
|
|
|
|
" Copyright (c) 2016-2017 Wang Shidong & Contributors
|
|
|
|
" Author: Wang Shidong < wsdjeg at 163.com >
|
|
|
|
" URL: https://spacevim.org
|
|
|
|
" License: GPLv3
|
|
|
|
"=============================================================================
|
|
|
|
|
2017-12-03 20:47:47 +08:00
|
|
|
function! SpaceVim#layers#lang#sh#plugins() abort
|
|
|
|
let l:plugins = []
|
|
|
|
call add(l:plugins, ['chrisbra/vim-zsh', { 'on_ft' : 'zsh' }])
|
|
|
|
if get(g:, 'spacevim_enable_ycm') == 1
|
|
|
|
call add(l:plugins, ['Valodim/vim-zsh-completion', { 'on_ft' : 'zsh' }])
|
|
|
|
else
|
|
|
|
call add(l:plugins, ['zchee/deoplete-zsh', { 'on_ft' : 'zsh' }])
|
|
|
|
endif
|
|
|
|
return l:plugins
|
2017-11-12 16:48:15 +08:00
|
|
|
endfunction
|
|
|
|
|
2017-07-29 05:39:44 +08:00
|
|
|
function! SpaceVim#layers#lang#sh#config()
|
2017-11-12 19:38:09 +08:00
|
|
|
" chrisbra/vim-zsh {{{
|
|
|
|
let g:zsh_fold_enable = 1
|
|
|
|
" }}}
|
|
|
|
|
2017-07-29 05:39:44 +08:00
|
|
|
call SpaceVim#layers#edit#add_ft_head_tamplate('sh',
|
|
|
|
\ ['#!/usr/bin/env bash',
|
|
|
|
\ '']
|
|
|
|
\ )
|
2017-11-12 16:48:15 +08:00
|
|
|
call SpaceVim#layers#edit#add_ft_head_tamplate('zsh', [
|
|
|
|
\ '#!/usr/bin/env zsh',
|
|
|
|
\ ''
|
|
|
|
\ ])
|
2017-07-29 05:39:44 +08:00
|
|
|
endfunction
|