Merge branch 'improve/search-sn' into master
This commit is contained in:
commit
0f1ac79503
@ -3,7 +3,7 @@
|
|||||||
" Author: Kim Silkebækken <kim.silkebaekken+vim@gmail.com>
|
" Author: Kim Silkebækken <kim.silkebaekken+vim@gmail.com>
|
||||||
" haya14busa <hayabusa1419@gmail.com>
|
" haya14busa <hayabusa1419@gmail.com>
|
||||||
" Source: https://github.com/Lokaltog/vim-easymotion
|
" Source: https://github.com/Lokaltog/vim-easymotion
|
||||||
" Last Change: 11 Feb 2014.
|
" Last Change: 13 Feb 2014.
|
||||||
"=============================================================================
|
"=============================================================================
|
||||||
" Saving 'cpoptions' {{{
|
" Saving 'cpoptions' {{{
|
||||||
scriptencoding utf-8
|
scriptencoding utf-8
|
||||||
@ -1368,6 +1368,17 @@ function! s:EasyMotion(regexp, direction, visualmode, is_inclusive) " {{{
|
|||||||
silent! call repeat#set("\<Plug>(easymotion-dotrepeat)")
|
silent! call repeat#set("\<Plug>(easymotion-dotrepeat)")
|
||||||
endif "}}}
|
endif "}}}
|
||||||
|
|
||||||
|
" Highlight all the matches by n-key find motions {{{
|
||||||
|
if s:current.is_search == 1 && mode(1) !=# 'ce'
|
||||||
|
" FIXME: mode(1) !=# 'ce' exists only for the test
|
||||||
|
" It seems let &hlsearch=&hlsearch doesn't work when called
|
||||||
|
" in script.
|
||||||
|
call EasyMotion#helper#silent_feedkeys(
|
||||||
|
\ ":let &hlsearch=&hlsearch\<CR>",
|
||||||
|
\ 'hlsearch', 'n')
|
||||||
|
" Ref: :h v:hlsearch
|
||||||
|
endif "}}}
|
||||||
|
|
||||||
call s:Message('Jumping to [' . coords[0] . ', ' . coords[1] . ']')
|
call s:Message('Jumping to [' . coords[0] . ', ' . coords[1] . ']')
|
||||||
let s:EasyMotion_is_cancelled = 0 " Success
|
let s:EasyMotion_is_cancelled = 0 " Success
|
||||||
"}}}
|
"}}}
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
"=============================================================================
|
"=============================================================================
|
||||||
" FILE: autoload/EasyMotion/helper.vim
|
" FILE: autoload/EasyMotion/helper.vim
|
||||||
" AUTHOR: haya14busa
|
" AUTHOR: haya14busa
|
||||||
" Last Change: 06 Feb 2014.
|
" Last Change: 13 Feb 2014.
|
||||||
" License: MIT license {{{
|
" License: MIT license {{{
|
||||||
" Permission is hereby granted, free of charge, to any person obtaining
|
" Permission is hereby granted, free of charge, to any person obtaining
|
||||||
" a copy of this software and associated documentation files (the
|
" a copy of this software and associated documentation files (the
|
||||||
@ -79,6 +79,20 @@ function! EasyMotion#helper#should_case_sensitive(input, is_search) "{{{
|
|||||||
endif
|
endif
|
||||||
return 0
|
return 0
|
||||||
endfunction "}}}
|
endfunction "}}}
|
||||||
|
function! EasyMotion#helper#silent_feedkeys(expr, name, ...) "{{{
|
||||||
|
" Ref:
|
||||||
|
" https://github.com/osyo-manga/vim-over/blob/d51b028c29661d4a5f5b79438ad6d69266753711/autoload/over.vim#L6
|
||||||
|
let mode = get(a:, 1, "m")
|
||||||
|
let name = "easymotion-" . a:name
|
||||||
|
let map = printf("<Plug>(%s)", name)
|
||||||
|
if mode == "n"
|
||||||
|
let command = "nnoremap"
|
||||||
|
else
|
||||||
|
let command = "nmap"
|
||||||
|
endif
|
||||||
|
execute command "<silent>" map printf("%s:nunmap %s<CR>", a:expr, map)
|
||||||
|
call feedkeys(printf("\<Plug>(%s)", name))
|
||||||
|
endfunction "}}}
|
||||||
|
|
||||||
" Migemo {{{
|
" Migemo {{{
|
||||||
function! EasyMotion#helper#load_migemo_dict() "{{{
|
function! EasyMotion#helper#load_migemo_dict() "{{{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user