diff --git a/autoload/EasyMotion.vim b/autoload/EasyMotion.vim index e2cfd61..a032b4d 100644 --- a/autoload/EasyMotion.vim +++ b/autoload/EasyMotion.vim @@ -3,7 +3,7 @@ " Author: Kim Silkebækken " haya14busa " Source: https://github.com/Lokaltog/vim-easymotion -" Last Change: 05 Feb 2014. +" Last Change: 06 Feb 2014. "============================================================================= " Saving 'cpoptions' {{{ scriptencoding utf-8 @@ -918,8 +918,9 @@ function! s:PromptUser(groups) "{{{ let char = toupper(char) endif "}}} - " Jump first target when Enter key is pressed "{{{ - if char ==# "\" && g:EasyMotion_enter_jump_first == 1 + " Jump first target when Enter or Space key is pressed "{{{ + if (char ==# "\" && g:EasyMotion_enter_jump_first == 1) || + \ (char ==# " " && g:EasyMotion_space_jump_first == 1) let char = g:EasyMotion_keys[0] endif "}}} diff --git a/doc/easymotion.txt b/doc/easymotion.txt index 230a28d..1dc0470 100644 --- a/doc/easymotion.txt +++ b/doc/easymotion.txt @@ -793,16 +793,20 @@ This feature is inspired by t9md's vim-smalls, which can be downloaded here: https://github.com/t9md/vim-smalls ------------------------------------------------------------------------------ - Jump to first match by Enter *EasyMotion_enter_jump_first* + Jump to first match by Enter or Space *EasyMotion_enter_jump_first* *g:EasyMotion_enter_jump_first* + *EasyMotion_space_jump_first* + *g:EasyMotion_space_jump_first* -Type Enter key and jump to first match (first letter of |g:EasyMotion_keys| ). +Type Enter or Space key and jump to first match (first letter of +|g:EasyMotion_keys| ). Set this option to 1 if you want to enable this feature. Example: > let g:EasyMotion_enter_jump_first = 1 + let g:EasyMotion_space_jump_first = 1 < Default: 0 diff --git a/plugin/EasyMotion.vim b/plugin/EasyMotion.vim index 1da25e2..df842db 100644 --- a/plugin/EasyMotion.vim +++ b/plugin/EasyMotion.vim @@ -34,6 +34,7 @@ let g:EasyMotion_skipfoldedline = get(g: , 'EasyMotion_skipfoldedline' , let g:EasyMotion_use_migemo = get(g: , 'EasyMotion_use_migemo' , 0) let g:EasyMotion_use_upper = get(g: , 'EasyMotion_use_upper' , 0) let g:EasyMotion_enter_jump_first = get(g: , 'EasyMotion_enter_jump_first' , 0) +let g:EasyMotion_space_jump_first = get(g: , 'EasyMotion_space_jump_first' , 0) let g:EasyMotion_inc_highlight = get(g: , 'EasyMotion_inc_highlight' , 1) let g:EasyMotion_move_highlight = get(g: , 'EasyMotion_move_highlight' , 1) let g:EasyMotion_landing_highlight = get(g: , 'EasyMotion_landing_highlight' , 0) diff --git a/t/easymotion_spec.vim b/t/easymotion_spec.vim index 51d02c0..eb0aa9f 100644 --- a/t/easymotion_spec.vim +++ b/t/easymotion_spec.vim @@ -451,6 +451,7 @@ describe 'Default settings' Expect g:EasyMotion_use_migemo ==# 0 Expect g:EasyMotion_use_upper ==# 0 Expect g:EasyMotion_enter_jump_first ==# 0 + Expect g:EasyMotion_space_jump_first ==# 0 Expect g:EasyMotion_show_prompt ==# 1 Expect g:EasyMotion_inc_highlight ==# 1 Expect g:EasyMotion_move_highlight ==# 1