mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-01-23 10:30:05 +08:00
Fix leader wait time
This commit is contained in:
parent
d9f822a496
commit
12addf862e
@ -259,77 +259,69 @@ let g:spacevim_wildignore
|
||||
\.git,.svn,.hg,.DS_Store,*.svg'
|
||||
" privite options
|
||||
let g:_spacevim_mappings = {}
|
||||
"====
|
||||
|
||||
if exists('loaded_leaderGuide_vim') || &cp
|
||||
finish
|
||||
endif
|
||||
let loaded_leaderGuide_vim = 1
|
||||
|
||||
let s:save_cpo = &cpo
|
||||
set cpo&vim
|
||||
" TODO merge leader guide
|
||||
|
||||
if !exists('g:leaderGuide_vertical')
|
||||
let g:leaderGuide_vertical = 0
|
||||
endif
|
||||
|
||||
let g:spacevim_leader_guide_vertical = 0
|
||||
|
||||
if !exists('g:leaderGuide_sort_horizontal')
|
||||
let g:leaderGuide_sort_horizontal = 0
|
||||
endif
|
||||
|
||||
let g:spacevim_leader_guide_sort_horizontal = 0
|
||||
|
||||
if !exists('g:leaderGuide_position')
|
||||
let g:leaderGuide_position = 'botright'
|
||||
endif
|
||||
|
||||
let g:spacevim_leader_guide_position = 'botright'
|
||||
|
||||
if !exists('g:leaderGuide_run_map_on_popup')
|
||||
let g:leaderGuide_run_map_on_popup = 1
|
||||
endif
|
||||
|
||||
let g:spacevim_leader_guide_run_map_on_popup = 1
|
||||
|
||||
if !exists("g:leaderGuide_hspace")
|
||||
let g:leaderGuide_hspace = 5
|
||||
endif
|
||||
|
||||
let g:spacevim_leader_guide_hspace = 5
|
||||
|
||||
if !exists("g:leaderGuide_flatten")
|
||||
let g:leaderGuide_flatten = 1
|
||||
endif
|
||||
|
||||
let g:spacevim_leader_guide_flatten = 1
|
||||
|
||||
if !exists("g:leaderGuide_default_group_name")
|
||||
let g:leaderGuide_default_group_name = ""
|
||||
endif
|
||||
|
||||
let g:spacevim_leader_guide_default_group_name = ""
|
||||
|
||||
if !exists("g:leaderGuide_max_size")
|
||||
let g:leaderGuide_max_size = 0
|
||||
endif
|
||||
|
||||
let g:spacevim_leader_guide_max_size = 0
|
||||
|
||||
if !exists("g:leaderGuide_submode_mappings")
|
||||
let g:leaderGuide_submode_mappings = {'<C-C>': "win_close"}
|
||||
endif
|
||||
|
||||
if !exists("g:leaderGuide_displayfunc")
|
||||
function! s:leaderGuide_display()
|
||||
let g:leaderGuide#displayname = substitute(g:leaderGuide#displayname, '\c<cr>$', '', '')
|
||||
endfunction
|
||||
let g:leaderGuide_displayfunc = [function("s:leaderGuide_display")]
|
||||
endif
|
||||
let g:spacevim_leader_guide_submode_mappings = {'<C-C>': "win_close"}
|
||||
|
||||
if !SpaceVim#mapping#guide#has_configuration()
|
||||
let g:leaderGuide_map = {}
|
||||
call SpaceVim#mapping#guide#register_prefix_descriptions('', 'g:leaderGuide_map')
|
||||
endif
|
||||
|
||||
command -nargs=1 LeaderGuideD call SpaceVim#mapping#guide#start('0', <args>)
|
||||
command -range -nargs=1 LeaderGuideVisualD call SpaceVim#mapping#guide#start('1', <args>)
|
||||
|
||||
command -nargs=1 LeaderGuide call SpaceVim#mapping#guide#start_by_prefix('0', <args>)
|
||||
command -range -nargs=1 LeaderGuideVisual call SpaceVim#mapping#guide#start_by_prefix('1', <args>)
|
||||
|
||||
nnoremap <silent> <Plug>leaderguide-buffer :<C-U>call leaderGuide#start_by_prefix('0', '<buffer>')<CR>
|
||||
vnoremap <silent> <Plug>leaderguide-buffer :<C-U>call leaderGuide#start_by_prefix('1', '<buffer>')<CR>
|
||||
nnoremap <silent> <Plug>leaderguide-global :<C-U>call leaderGuide#start_by_prefix('0', ' ')<CR>
|
||||
vnoremap <silent> <Plug>leaderguide-global :<C-U>call leaderGuide#start_by_prefix('1', ' ')<CR>
|
||||
|
||||
let &cpo = s:save_cpo
|
||||
unlet s:save_cpo
|
||||
"====
|
||||
|
||||
function! SpaceVim#loadCustomConfig() abort
|
||||
|
@ -12,9 +12,6 @@ function! SpaceVim#layers#lang#plugins() abort
|
||||
\ ['leafgarland/typescript-vim', { 'on_ft' : ['typescript']}],
|
||||
\ ['kchmck/vim-coffee-script', { 'on_ft' : ['coffee']}],
|
||||
\ ['leshill/vim-json', { 'on_ft' : ['javascript','json']}],
|
||||
\ ['syngan/vim-vimlint', { 'on_ft' : 'vim'}],
|
||||
\ ['ynkdir/vim-vimlparser', { 'on_ft' : 'vim'}],
|
||||
\ ['todesking/vint-syntastic', { 'on_ft' : 'vim'}],
|
||||
\ ['elixir-lang/vim-elixir', { 'on_ft' : 'elixir'}],
|
||||
\ ['PotatoesMaster/i3-vim-syntax', { 'on_ft' : 'i3'}],
|
||||
\ ['isundil/vim-irssi-syntax', { 'on_ft' : 'irssi'}],
|
||||
|
@ -1,5 +1,9 @@
|
||||
function! SpaceVim#layers#lang#vim#plugins() abort
|
||||
let plugins = []
|
||||
let plugins = [
|
||||
\ ['syngan/vim-vimlint', { 'on_ft' : 'vim'}],
|
||||
\ ['ynkdir/vim-vimlparser', { 'on_ft' : 'vim'}],
|
||||
\ ['todesking/vint-syntastic', { 'on_ft' : 'vim'}],
|
||||
\ ]
|
||||
call add(plugins,['tweekmonster/exception.vim'])
|
||||
call add(plugins,['mhinz/vim-lookup'])
|
||||
call add(plugins,['Shougo/neco-vim', { 'on_i' : 1, 'loadconf_before' : 1}])
|
||||
|
@ -21,12 +21,20 @@ endfunction
|
||||
" a:3 guide desc
|
||||
" example call SpaceVim#mapping#def('nnoremap <silent>', 'gf', ':call zvim#gf()<CR>', 'Jump to a file under cursor', '')
|
||||
function! SpaceVim#mapping#def(type, key, value, ...) abort
|
||||
let feedkeys_mode = 'm'
|
||||
let map = split(a:type)[0]
|
||||
if map =~# 'nore'
|
||||
let feedkeys_mode = 'n'
|
||||
endif
|
||||
let lhs = a:key
|
||||
let rhs = a:value
|
||||
let gexe = a:value
|
||||
if a:value =~? '^<plug>'
|
||||
let gexe = '\' . a:value
|
||||
elseif a:value =~? ':.\+<cr>$'
|
||||
let gexe = substitute(gexe, '<cr>', "\<cr>", 'g')
|
||||
let gexe = substitute(gexe, '<CR>', "\<CR>", 'g')
|
||||
let gexe = substitute(gexe, '<Esc>', "\<Esc>", 'g')
|
||||
else
|
||||
endif
|
||||
exec a:type . ' ' . a:key . ' ' . a:value
|
||||
@ -47,11 +55,13 @@ function! SpaceVim#mapping#def(type, key, value, ...) abort
|
||||
let g:_spacevim_mappings[group] = {'name': 'new group'}
|
||||
endif
|
||||
call extend(g:_spacevim_mappings[group], {
|
||||
\ a:key[8:] : ['call feedkeys(' . gexe . ')', a:3]
|
||||
\ a:key[9:] : ['call feedkeys("' . gexe . '", "'
|
||||
\ . feedkeys_mode . '")', a:3]
|
||||
\ })
|
||||
elseif len(a:key) == 9
|
||||
call extend(g:_spacevim_mappings, {
|
||||
\ a:key[8:] : ['call feedkeys("' . gexe . '")', a:3]
|
||||
\ a:key[8:] : ['call feedkeys("' . gexe . '", "'
|
||||
\ . feedkeys_mode . '")', a:3]
|
||||
\ })
|
||||
|
||||
endif
|
||||
|
@ -217,12 +217,6 @@ noremap <silent><leader>vf :Unite -auto-preview -no-split grep:%::<C-r><C-w><CR>
|
||||
noremap <silent><leader>va :Unite -auto-preview -no-split grep:$buffers::<C-r><C-w><CR>
|
||||
nnoremap <silent><Leader>bl :<C-u>Unite -start-insert -buffer-name=buffer buffer<cr>
|
||||
nnoremap <silent><Leader>ta :<C-u>Unite -start-insert -buffer-name=tag tag<cr>
|
||||
"" outline
|
||||
nnoremap <silent><leader>o :<C-u>Unite -buffer-name=outline -start-insert -auto-preview -no-split outline<cr>
|
||||
"" Line search
|
||||
nnoremap <silent><leader>l :Unite line -start-insert -auto-preview -no-split<CR>
|
||||
"" Yank history
|
||||
nnoremap <silent><leader>y :<C-u>Unite -no-split -buffer-name=yank history/yank<cr>
|
||||
" search plugin
|
||||
" :Unite neobundle/search
|
||||
"for Unite menu{
|
||||
|
@ -32,7 +32,6 @@ try
|
||||
\ 'auto_expand': 1,
|
||||
\ 'direction' : 'rightbelow',
|
||||
\ 'parent': 0,
|
||||
\ 'explorer_columns' : 'gitstatus',
|
||||
\ 'status' : 1,
|
||||
\ 'safe' : 0,
|
||||
\ 'split' : 1,
|
||||
|
Loading…
Reference in New Issue
Block a user