From 58874d8b21d9a3de0da446a0a757ca11df0e2f41 Mon Sep 17 00:00:00 2001 From: wsdjeg Date: Sun, 12 Jun 2022 12:06:52 +0800 Subject: [PATCH] refactor(lang#coffeescript): move coffeescript autocmds to layer --- autoload/SpaceVim/autocmds.vim | 1 - autoload/SpaceVim/layers/lang/coffeescript.vim | 5 +++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/autoload/SpaceVim/autocmds.vim b/autoload/SpaceVim/autocmds.vim index 79328b85b..d9975e802 100644 --- a/autoload/SpaceVim/autocmds.vim +++ b/autoload/SpaceVim/autocmds.vim @@ -46,7 +46,6 @@ function! SpaceVim#autocmds#init() abort autocmd FileType c,cpp,java,javascript set comments=sO:*\ -,mO:*\ \ ,exO:*/,s1:/*,mb:*,ex:*/,:// autocmd FileType cs set comments=sO:*\ -,mO:*\ \ ,exO:*/,s1:/*,mb:*,ex:*/,:///,:// autocmd Filetype qf setlocal nobuflisted - autocmd FileType coffee call SpaceVim#util#check_if_expand_tab() au StdinReadPost * call s:disable_welcome() if !has('nvim-0.5.0') autocmd InsertEnter * call s:fixindentline() diff --git a/autoload/SpaceVim/layers/lang/coffeescript.vim b/autoload/SpaceVim/layers/lang/coffeescript.vim index c6d9e794b..bbfa9f080 100644 --- a/autoload/SpaceVim/layers/lang/coffeescript.vim +++ b/autoload/SpaceVim/layers/lang/coffeescript.vim @@ -59,6 +59,11 @@ function! SpaceVim#layers#lang#coffeescript#config() abort call SpaceVim#plugins#repl#reg('coffee', [s:coffee_interpreter, '-i']) call SpaceVim#mapping#space#regesit_lang_mappings('coffee', function('s:language_specified_mappings')) + augroup spacevim_layer_lang_coffeescript + autocmd! + autocmd FileType coffee call SpaceVim#util#check_if_expand_tab() + augroup END + endfunction function! s:language_specified_mappings() abort