Skip to content

Commit 8ca3243

Browse files
committed
Remove helper functions, set lower default timeoutlen
1 parent a6fa9c4 commit 8ca3243

File tree

2 files changed

+2
-59
lines changed

2 files changed

+2
-59
lines changed

autoload/spacevim.vim

Lines changed: 0 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -78,62 +78,3 @@ function! spacevim#bootstrap() abort
7878
" }}}
7979

8080
endfunction
81-
82-
" Helper functions {{{
83-
function! spacevim#add_plugin(name, config)
84-
" Add a plugin to the list of plugins
85-
if exists('g:spacevim_plugins')
86-
call add(g:spacevim_plugins, {'name': a:name, 'config': a:config})
87-
return 1
88-
endif
89-
return 0
90-
endfunction
91-
92-
function! spacevim#is_layer_enabled(name)
93-
" Check if a layer is enabled
94-
if !exists('g:spacevim_enabled_layers')
95-
return 1
96-
endif
97-
return index(g:spacevim_enabled_layers, a:name) != -1
98-
endfunction
99-
100-
function! spacevim#bind(map, binding, name, value, isCmd)
101-
if a:isCmd
102-
let l:value = ':' . a:value . '<cr>'
103-
else
104-
let l:value = a:value
105-
endif
106-
if a:map ==# 'map' && maparg('<Leader>' . a:binding, '') ==# ''
107-
let l:noremap = 'noremap'
108-
elseif a:map ==# 'nmap' && maparg('<Leader>' . a:binding, 'n') ==# ''
109-
let l:noremap = 'nnoremap'
110-
elseif a:map ==# 'vmap' && maparg('<Leader>' . a:binding, 'v') ==# ''
111-
let l:noremap = 'vnoremap'
112-
else
113-
let l:noremap = ''
114-
endif
115-
116-
if l:noremap !=# ''
117-
execute l:noremap . ' <silent> <SID>' . a:name . '# ' . l:value
118-
execute a:map . ' <Leader>' . a:binding . ' <SID>' . a:name . '#'
119-
endif
120-
endfunction
121-
122-
function! spacevim#bind_plug(map, binding, name, value)
123-
if a:map ==# 'map' && maparg('<Leader>' . a:binding, '') ==# ''
124-
let l:map = 'map'
125-
elseif a:map ==# 'nmap' && maparg('<Leader>' . a:binding, 'n') ==# ''
126-
let l:map = 'nmap'
127-
elseif a:map ==# 'vmap' && maparg('<Leader>' . a:binding, 'v') ==# ''
128-
let l:map = 'vmap'
129-
else
130-
let l:map = ''
131-
endif
132-
133-
if l:map !=# ''
134-
execute l:map . ' <silent> <SID>' . a:name . '# <Plug>' . a:value
135-
execute a:map . ' <Leader>' . a:binding . ' <SID>' . a:name . '#'
136-
endif
137-
endfunction
138-
139-
" }}}

vimrc.sample

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@ endif
5050
" them in `dotspacevim/user-config' first."
5151
let mapleader = ' '
5252
let g:leaderGuide_vertical = 0
53+
" Shorten the time before the guide buffer appears
54+
set timeoutlen=100
5355

5456
" Load external user-init if found
5557
if filereadable(config_dir . '/user-init.vim')

0 commit comments

Comments
 (0)