From 7ab69a7dc2108e68d013920324c8e6a1d301c9bd Mon Sep 17 00:00:00 2001 From: haya14busa Date: Tue, 14 Jan 2014 06:29:36 +0900 Subject: [PATCH] Add prompt option --- autoload/EasyMotion.vim | 10 ++++++---- plugin/EasyMotion.vim | 2 ++ 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/autoload/EasyMotion.vim b/autoload/EasyMotion.vim index 1b8153e..9c5a331 100644 --- a/autoload/EasyMotion.vim +++ b/autoload/EasyMotion.vim @@ -411,15 +411,17 @@ function! s:GetChar() " {{{ endfunction " }}} function! s:InputPrompt(message, input) "{{{ redraw - echohl Question - echo a:message ': ' . a:input - echohl None + echohl Question | echon a:message | echohl None + echon a:input endfunction "}}} function! s:GetInput(num_strokes) "{{{ let input = '' " repeat a:num_strokes times while s:strchars(input) < a:num_strokes - call s:InputPrompt('Input', input) + " if a:num_strokes > 1 && g:EasyMotion_show_prompt + if g:EasyMotion_show_prompt + call s:InputPrompt(g:EasyMotion_prompt, input) + endif let c = getchar() let char = type(c) == type(0) ? nr2char(c) : c if char ==# "\" || char2nr(char) == 128 diff --git a/plugin/EasyMotion.vim b/plugin/EasyMotion.vim index b25433d..98e138d 100644 --- a/plugin/EasyMotion.vim +++ b/plugin/EasyMotion.vim @@ -31,6 +31,8 @@ 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_show_prompt = get(g: , 'EasyMotion_show_prompt' , 1) +let g:EasyMotion_prompt = get(g: , 'EasyMotion_prompt' , '> ') "}}} " -- Default highlighting ---------------- {{{