File tree Expand file tree Collapse file tree 2 files changed +11
-2
lines changed
vital/_easymotion/HitAHint Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -9,6 +9,9 @@ function! EasyMotion#overwin#move(pattern) abort
99 \ ' shade' : g: EasyMotion_hl_group_shade ,
1010 \ ' target' : g: EasyMotion_hl_group_target ,
1111 \ },
12+ \ ' jump_first_target_keys' :
13+ \ (g: EasyMotion_enter_jump_first ? [" \<CR> " ] : []) +
14+ \ (g: EasyMotion_space_jump_first ? [" \<Space> " ] : [])
1215 \ })
1316endfunction
1417
Original file line number Diff line number Diff line change @@ -53,12 +53,13 @@ let s:overwin = {
5353\ ' shade' : ' HitAHintShade' ,
5454\ ' target' : ' HitAHintTarget' ,
5555\ },
56+ \ ' jump_first_target_keys' : [],
5657\ }
5758\ }
5859
5960function ! s: _init_hl () abort
60- highlight HitAHintShade ctermfg= 242 guifg= #777777
61- highlight HitAHintTarget ctermfg= 81 guifg= #66 D9EF
61+ highlight default HitAHintShade ctermfg= 242 guifg= #777777
62+ highlight default HitAHintTarget ctermfg= 81 guifg= #66 D9EF
6263endfunction
6364
6465call s: _init_hl ()
@@ -181,6 +182,11 @@ function! s:overwin.choose_prompt(hint_dict) abort
181182 call hinter.after ()
182183 endtry
183184
185+ " Jump to first target if target key is in config.jump_first_target_keys.
186+ if index (self .config.jump_first_target_keys, c ) isnot # -1
187+ let c = split (self .config.keys , ' \zs' )[0 ]
188+ endif
189+
184190 if has_key (a: hint_dict , c )
185191 let target = a: hint_dict [c ]
186192 return type (target) is # type ({}) ? self .choose_prompt (target) : target
You can’t perform that action at this time.
0 commit comments