From 1a16948a8516666d3f7f076295e7cc784488cd8c Mon Sep 17 00:00:00 2001 From: wsdjeg Date: Fri, 20 Jan 2017 21:21:33 +0800 Subject: [PATCH] Add fcitx.vim only when fcitx is executable --- autoload/SpaceVim/layers/edit.vim | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/autoload/SpaceVim/layers/edit.vim b/autoload/SpaceVim/layers/edit.vim index 5d65124b7..fc552dc9e 100644 --- a/autoload/SpaceVim/layers/edit.vim +++ b/autoload/SpaceVim/layers/edit.vim @@ -1,5 +1,5 @@ function! SpaceVim#layers#edit#plugins() abort - return [ + let plugins = [ \ ['tpope/vim-surround'], \ ['terryma/vim-multiple-cursors'], \ ['scrooloose/nerdcommenter'], @@ -8,8 +8,11 @@ function! SpaceVim#layers#edit#plugins() abort \ ['easymotion/vim-easymotion',{'on_map' : '(easymotion-prefix)'}], \ ['editorconfig/editorconfig-vim', { 'on_cmd' : 'EditorConfigReload'}], \ ['floobits/floobits-neovim', { 'on_cmd' : ['FlooJoinWorkspace','FlooShareDirPublic','FlooShareDirPrivate']}], - \ ['lilydjwg/fcitx.vim', { 'on_i' : 1}], \ ] + if executable('fcitx') + call add(plugins,['lilydjwg/fcitx.vim', { 'on_i' : 1}]) + endif + return plugins endfunction function! SpaceVim#layers#edit#config() abort