Merge branch 'vimlint' into master
This commit is contained in:
commit
70ff22b9ab
@ -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: 19 Feb 2014.
|
" Last Change: 20 Feb 2014.
|
||||||
"=============================================================================
|
"=============================================================================
|
||||||
" Saving 'cpoptions' {{{
|
" Saving 'cpoptions' {{{
|
||||||
scriptencoding utf-8
|
scriptencoding utf-8
|
||||||
@ -291,10 +291,12 @@ function! EasyMotion#DotRepeat(visualmode) " {{{
|
|||||||
let s:flag.bd_t = s:dot_repeat.bd_t_flag
|
let s:flag.bd_t = s:dot_repeat.bd_t_flag
|
||||||
|
|
||||||
let s:current.is_operator = 1
|
let s:current.is_operator = 1
|
||||||
for cnt in range(v:count1)
|
let i = 0
|
||||||
|
while i < v:count1
|
||||||
let s:flag.dot_repeat = 1 " s:EasyMotion() always call reset
|
let s:flag.dot_repeat = 1 " s:EasyMotion() always call reset
|
||||||
silent call s:EasyMotion(re, direction, 0, is_inclusive)
|
silent call s:EasyMotion(re, direction, 0, is_inclusive)
|
||||||
endfor
|
let i += 1
|
||||||
|
endwhile
|
||||||
return s:EasyMotion_is_cancelled
|
return s:EasyMotion_is_cancelled
|
||||||
endfunction " }}}
|
endfunction " }}}
|
||||||
function! EasyMotion#NextPrevious(visualmode, direction) " {{{
|
function! EasyMotion#NextPrevious(visualmode, direction) " {{{
|
||||||
@ -754,7 +756,7 @@ endfunction "}}}
|
|||||||
function! s:GroupingAlgorithmOriginal(targets, keys)
|
function! s:GroupingAlgorithmOriginal(targets, keys)
|
||||||
" Split targets into groups (1 level)
|
" Split targets into groups (1 level)
|
||||||
let targets_len = len(a:targets)
|
let targets_len = len(a:targets)
|
||||||
let keys_len = len(a:keys)
|
" let keys_len = len(a:keys)
|
||||||
|
|
||||||
let groups = {}
|
let groups = {}
|
||||||
|
|
||||||
@ -880,9 +882,9 @@ function! s:PromptUser(groups) "{{{
|
|||||||
|
|
||||||
let target_line_byte_len = strlen(lines[line_num]['marker'])
|
let target_line_byte_len = strlen(lines[line_num]['marker'])
|
||||||
|
|
||||||
let target_char_byte_len = strlen(matchstr(
|
" let target_char_byte_len = strlen(matchstr(
|
||||||
\ lines[line_num]['marker'],
|
" \ lines[line_num]['marker'],
|
||||||
\ '\%' . col_num . 'c.'))
|
" \ '\%' . col_num . 'c.'))
|
||||||
|
|
||||||
if strlen(lines[line_num]['marker']) > 0
|
if strlen(lines[line_num]['marker']) > 0
|
||||||
" Substitute marker character if line length > 0
|
" Substitute marker character if line length > 0
|
||||||
@ -1232,7 +1234,7 @@ function! s:EasyMotion(regexp, direction, visualmode, is_inclusive) " {{{
|
|||||||
elseif a:direction == 0
|
elseif a:direction == 0
|
||||||
" Forward
|
" Forward
|
||||||
let shade_hl_re = '\%#\_.*\%'. win_last_line .'l'
|
let shade_hl_re = '\%#\_.*\%'. win_last_line .'l'
|
||||||
elseif a:direction == 2
|
else
|
||||||
" Both directions"
|
" Both directions"
|
||||||
let shade_hl_re = '\_.*'
|
let shade_hl_re = '\_.*'
|
||||||
endif
|
endif
|
||||||
|
@ -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: 18 Feb 2014.
|
" Last Change: 20 Feb 2014.
|
||||||
" == Script initialization {{{
|
" == Script initialization {{{
|
||||||
if expand("%:p") ==# expand("<sfile>:p")
|
if expand("%:p") ==# expand("<sfile>:p")
|
||||||
unlet! g:EasyMotion_loaded
|
unlet! g:EasyMotion_loaded
|
||||||
@ -299,7 +299,7 @@ if g:EasyMotion_do_mapping == 1
|
|||||||
"}}}
|
"}}}
|
||||||
|
|
||||||
function! s:default_mapping(motions, do_mapping) "{{{
|
function! s:default_mapping(motions, do_mapping) "{{{
|
||||||
for [motion, fn] in items(a:motions)
|
for motion in a:motions
|
||||||
" Mapping {{{
|
" Mapping {{{
|
||||||
if exists('g:EasyMotion_mapping_' . motion)
|
if exists('g:EasyMotion_mapping_' . motion)
|
||||||
" Backward compatible mapping [deprecated]
|
" Backward compatible mapping [deprecated]
|
||||||
@ -317,25 +317,10 @@ if g:EasyMotion_do_mapping == 1
|
|||||||
endfunction "}}}
|
endfunction "}}}
|
||||||
|
|
||||||
" Default Mapping:
|
" Default Mapping:
|
||||||
call s:default_mapping({
|
call s:default_mapping(
|
||||||
\ 'f' : { 'name': 'S' , 'dir': 0 }
|
\ ['f', 'F', 's', 't', 'T',
|
||||||
\ , 'F' : { 'name': 'S' , 'dir': 1 }
|
\ 'w', 'W', 'b', 'B', 'e', 'E', 'ge', 'gE',
|
||||||
\ , 's' : { 'name': 'S' , 'dir': 2 }
|
\ 'j', 'k', 'n', 'N'], g:EasyMotion_do_mapping)
|
||||||
\ , 't' : { 'name': 'T' , 'dir': 0 }
|
|
||||||
\ , 'T' : { 'name': 'T' , 'dir': 1 }
|
|
||||||
\ , 'w' : { 'name': 'WB' , 'dir': 0 }
|
|
||||||
\ , 'W' : { 'name': 'WBW' , 'dir': 0 }
|
|
||||||
\ , 'b' : { 'name': 'WB' , 'dir': 1 }
|
|
||||||
\ , 'B' : { 'name': 'WBW' , 'dir': 1 }
|
|
||||||
\ , 'e' : { 'name': 'E' , 'dir': 0 }
|
|
||||||
\ , 'E' : { 'name': 'EW' , 'dir': 0 }
|
|
||||||
\ , 'ge': { 'name': 'E' , 'dir': 1 }
|
|
||||||
\ , 'gE': { 'name': 'EW' , 'dir': 1 }
|
|
||||||
\ , 'j' : { 'name': 'JK' , 'dir': 0 }
|
|
||||||
\ , 'k' : { 'name': 'JK' , 'dir': 1 }
|
|
||||||
\ , 'n' : { 'name': 'Search' , 'dir': 0 }
|
|
||||||
\ , 'N' : { 'name': 'Search' , 'dir': 1 }
|
|
||||||
\ }, g:EasyMotion_do_mapping)
|
|
||||||
endif "}}}
|
endif "}}}
|
||||||
|
|
||||||
" == CommandLine Mapping {{{
|
" == CommandLine Mapping {{{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user