diff --git a/autoload/SpaceVim/autocmds.vim b/autoload/SpaceVim/autocmds.vim index 25be7d112..015324b86 100644 --- a/autoload/SpaceVim/autocmds.vim +++ b/autoload/SpaceVim/autocmds.vim @@ -60,6 +60,7 @@ function! SpaceVim#autocmds#init() abort autocmd FocusLost * call system('synclient touchpadoff=0') autocmd FocusGained * call s:reload_touchpad_status() endif + " @fixme this autocmd should also support `:w foo/test.vim` autocmd BufWritePre * call SpaceVim#plugins#mkdir#CreateCurrent() autocmd ColorScheme * call SpaceVim#api#import('vim#highlight').hide_in_normal('EndOfBuffer') autocmd ColorScheme gruvbox,jellybeans,nord,srcery,NeoSolarized call s:fix_colorschem_in_SpaceVim() diff --git a/autoload/SpaceVim/layers/autocomplete.vim b/autoload/SpaceVim/layers/autocomplete.vim index 9d26dd880..14bdcccef 100644 --- a/autoload/SpaceVim/layers/autocomplete.vim +++ b/autoload/SpaceVim/layers/autocomplete.vim @@ -126,7 +126,7 @@ endfunction function! SpaceVim#layers#autocomplete#config() abort if g:spacevim_autocomplete_parens - imap ( + imap ( \ pumvisible() ? \ has('patch-7.4.744') ? \ complete_parameter#pre_complete("()") : '(' : diff --git a/autoload/SpaceVim/layers/core.vim b/autoload/SpaceVim/layers/core.vim index c09c3a103..976a6a1f9 100644 --- a/autoload/SpaceVim/layers/core.vim +++ b/autoload/SpaceVim/layers/core.vim @@ -939,6 +939,18 @@ function! s:save_current_file() abort endif endfunction + +" the `SPC f a` key binding cause many erros: +" E212: Can't open file for writing: no such file or directory +" E216: No such group or event: FileExplorer +" +" Fix E216: No such group or event: FileExplorer +" which is called in bundle/nerdtree/plugin/NERD_tree.vim:184 +augroup FileExplorer + autocmd! +augroup END + + function! s:save_as_new_file() abort let current_fname = bufname() if !empty(current_fname) diff --git a/bundle/delimitMate/plugin/delimitMate.vim b/bundle/delimitMate/plugin/delimitMate.vim index cf16fe84c..20c614b68 100644 --- a/bundle/delimitMate/plugin/delimitMate.vim +++ b/bundle/delimitMate/plugin/delimitMate.vim @@ -275,7 +275,7 @@ function! s:NoAutoClose() "{{{ let delim = '' endif exec 'inoremap delimitMate' . delim . ' =TriggerAbb().delimitMate#SkipDelim("' . escape(delim,'"') . '")' - exec 'silent! imap '.delim.' delimitMate'.delim + exec 'silent! imap '.delim.' delimitMate'.delim endfor endfunction "}}} @@ -288,7 +288,7 @@ function! s:AutoClose() "{{{ let rd = s:get('right_delims')[i] == '|' ? '' : s:get('right_delims')[i] exec 'inoremap delimitMate' . ld \. ' TriggerAbb().delimitMate#ParenDelim("' . escape(rd, '|') . '")' - exec 'silent! imap '.ld + exec 'silent! imap '.ld \.' delimitMate'.ld let i += 1 endwhile @@ -298,7 +298,7 @@ function! s:AutoClose() "{{{ let delim = delim == '|' ? '' : delim exec 'inoremap delimitMate' . delim \. ' TriggerAbb().delimitMate#JumpOut("\' . delim . '")' - exec 'silent! imap ' . delim + exec 'silent! imap ' . delim \. ' delimitMate'. delim endfor @@ -310,7 +310,7 @@ function! s:AutoClose() "{{{ endif exec 'inoremap delimitMate' . delim \. ' TriggerAbb()."=delimitMate#QuoteDelim(\"\\\' . delim . '\")"' - exec 'silent! imap ' . delim + exec 'silent! imap ' . delim \. ' delimitMate' . delim endfor @@ -318,7 +318,7 @@ function! s:AutoClose() "{{{ " inoremap n't n't for map in s:get('apostrophes_list') exec "inoremap " . map . " " . map - exec 'silent! imap ' . map . ' delimitMate' . map + exec 'silent! imap ' . map . ' delimitMate' . map endfor endfunction "}}} @@ -327,31 +327,31 @@ function! s:ExtraMappings() "{{{ inoremap delimitMateBS =delimitMate#BS() if !hasmapto('delimitMateBS','i') if empty(maparg('', 'i')) - silent! imap delimitMateBS + silent! imap delimitMateBS endif if empty(maparg('', 'i')) - silent! imap delimitMateBS + silent! imap delimitMateBS endif endif " If pair is empty, delete closing delimiter: inoremap delimitMateS-BS delimitMate#WithinEmptyPair() ? "\" : "\" if !hasmapto('delimitMateS-BS','i') && maparg('', 'i') == '' - silent! imap delimitMateS-BS + silent! imap delimitMateS-BS endif " Expand return if inside an empty pair: inoremap delimitMateCR TriggerAbb()."\=delimitMate#ExpandReturn()\" if s:get('expand_cr') && !hasmapto('delimitMateCR', 'i') && maparg('', 'i') == '' - silent! imap delimitMateCR + silent! imap delimitMateCR endif " Expand space if inside an empty pair: inoremap delimitMateSpace TriggerAbb()."\=delimitMate#ExpandSpace()\" if s:get('expand_space') && !hasmapto('delimitMateSpace', 'i') && maparg('', 'i') == '' - silent! imap delimitMateSpace + silent! imap delimitMateSpace endif " Jump over any delimiter: inoremap delimitMateS-Tab TriggerAbb()."\=delimitMate#JumpAny()\" if s:get('tab2exit') && !hasmapto('delimitMateS-Tab', 'i') && maparg('', 'i') == '' - silent! imap delimitMateS-Tab + silent! imap delimitMateS-Tab endif " Jump over next delimiters inoremap delimitMateJumpMany TriggerAbb()."\=delimitMate#JumpMany()\"