Add g:EasyMotion_disable_two_key_combo
Set this value 1 if you want to disable two key combo close #106
This commit is contained in:
parent
59c3556b0d
commit
93de27f7bd
@ -887,7 +887,9 @@ function! s:PromptUser(groups) "{{{
|
||||
if strlen(lines[line_num]['marker']) > 0
|
||||
" Substitute marker character if line length > 0
|
||||
let c = 0
|
||||
while c < target_key_len && c < 2
|
||||
let marker_max_length = g:EasyMotion_disable_two_key_combo == 1
|
||||
\ ? 1 : 2
|
||||
while c < target_key_len && c < marker_max_length
|
||||
if strlen(lines[line_num]['marker']) >= col_num + c
|
||||
" Substitute marker character if line length > 0
|
||||
if c == 0
|
||||
@ -922,10 +924,12 @@ function! s:PromptUser(groups) "{{{
|
||||
call EasyMotion#highlight#add_highlight(
|
||||
\ '\%' . line_num . 'l\%' . col_num . 'c',
|
||||
\ g:EasyMotion_hl2_first_group_target)
|
||||
if g:EasyMotion_disable_two_key_combo == 1
|
||||
call EasyMotion#highlight#add_highlight(
|
||||
\ '\%' . line_num . 'l\%' . (col_num + 1) . 'c',
|
||||
\ g:EasyMotion_hl2_second_group_target)
|
||||
endif
|
||||
endif
|
||||
"}}}
|
||||
|
||||
" Add marker/target length difference for multibyte
|
||||
|
@ -3,7 +3,7 @@
|
||||
" Author: Kim Silkebækken <kim.silkebaekken+vim@gmail.com>
|
||||
" haya14busa <hayabusa1419@gmail.com>
|
||||
" Source: https://github.com/Lokaltog/vim-easymotion
|
||||
" Last Change: 13 Feb 2014.
|
||||
" Last Change: 18 Feb 2014.
|
||||
" == Script initialization {{{
|
||||
if expand("%:p") ==# expand("<sfile>:p")
|
||||
unlet! g:EasyMotion_loaded
|
||||
@ -48,6 +48,8 @@ let g:EasyMotion_prompt =
|
||||
\ get(g: , 'EasyMotion_prompt' , 'Search for {n} character(s): ')
|
||||
let g:EasyMotion_command_line_key_mappings =
|
||||
\ get(g: , 'EasyMotion_command_line_key_mappings' , {})
|
||||
let g:EasyMotion_disable_two_key_combo =
|
||||
\ get(g: , 'EasyMotion_disable_two_key_combo' , 0)
|
||||
|
||||
"}}}
|
||||
|
||||
|
@ -487,6 +487,7 @@ describe 'Default settings'
|
||||
Expect g:EasyMotion_prompt ==# 'Search for {n} character(s): '
|
||||
Expect g:EasyMotion_command_line_key_mappings ==# {}
|
||||
Expect g:EasyMotion_force_csapprox ==# 0
|
||||
Expect g:EasyMotion_disable_two_key_combo ==# 0
|
||||
" }}}
|
||||
|
||||
" highlight {{{
|
||||
|
Loading…
Reference in New Issue
Block a user