1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-02-23 17:01:34 +08:00
SpaceVim/autoload/SpaceVim/layers/lang/sh.vim
tracyone 8880cf355b zsh:support autocomplete
1. autotrigger in YCM and deoplete.
2. press ^x^o in other case
2017-12-03 20:49:54 +08:00

26 lines
758 B
VimL

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
endfunction
function! SpaceVim#layers#lang#sh#config()
" chrisbra/vim-zsh {{{
let g:zsh_fold_enable = 1
" }}}
call SpaceVim#layers#edit#add_ft_head_tamplate('sh',
\ ['#!/usr/bin/env bash',
\ '']
\ )
call SpaceVim#layers#edit#add_ft_head_tamplate('zsh', [
\ '#!/usr/bin/env zsh',
\ ''
\ ])
endfunction