Merge branch 'nostartofline' into combined
This commit is contained in:
commit
412abbe14a
@ -98,7 +98,12 @@
|
|||||||
call s:EasyMotion('\(\S\(\s\|$\)\|^$\)', a:direction, a:visualmode ? visualmode() : '', mode(1))
|
call s:EasyMotion('\(\S\(\s\|$\)\|^$\)', a:direction, a:visualmode ? visualmode() : '', mode(1))
|
||||||
endfunction " }}}
|
endfunction " }}}
|
||||||
function! EasyMotion#JK(visualmode, direction) " {{{
|
function! EasyMotion#JK(visualmode, direction) " {{{
|
||||||
|
if g:EasyMotion_startofline
|
||||||
call s:EasyMotion('^\(\w\|\s*\zs\|$\)', a:direction, a:visualmode ? visualmode() : '', '')
|
call s:EasyMotion('^\(\w\|\s*\zs\|$\)', a:direction, a:visualmode ? visualmode() : '', '')
|
||||||
|
else
|
||||||
|
let prev_column = getpos('.')[2] - 1
|
||||||
|
call s:EasyMotion('^.\{,' . prev_column . '}\zs\(.\|$\)', a:direction, a:visualmode ? visualmode() : '', '')
|
||||||
|
endif
|
||||||
endfunction " }}}
|
endfunction " }}}
|
||||||
function! EasyMotion#Search(visualmode, direction) " {{{
|
function! EasyMotion#Search(visualmode, direction) " {{{
|
||||||
call s:EasyMotion(@/, a:direction, a:visualmode ? visualmode() : '', '')
|
call s:EasyMotion(@/, a:direction, a:visualmode ? visualmode() : '', '')
|
||||||
|
@ -22,10 +22,11 @@ CONTENTS *easymotion-contents*
|
|||||||
4.2 EasyMotion_do_shade ............ |EasyMotion_do_shade|
|
4.2 EasyMotion_do_shade ............ |EasyMotion_do_shade|
|
||||||
4.3 EasyMotion_do_mapping .......... |EasyMotion_do_mapping|
|
4.3 EasyMotion_do_mapping .......... |EasyMotion_do_mapping|
|
||||||
4.4 EasyMotion_grouping ............ |EasyMotion_grouping|
|
4.4 EasyMotion_grouping ............ |EasyMotion_grouping|
|
||||||
4.5 Custom highlighting ............ |easymotion-custom-hl|
|
4.5 EasyMotion_startofline ......... |EasyMotion_startofline|
|
||||||
4.6 Custom mappings ................ |easymotion-custom-mappings|
|
4.6 Custom highlighting ............ |easymotion-custom-hl|
|
||||||
4.6.1 Leader key ............... |easymotion-leader-key|
|
4.7 Custom mappings ................ |easymotion-custom-mappings|
|
||||||
4.6.2 Custom keys .............. |easymotion-custom-keys|
|
4.7.1 Leader key ............... |easymotion-leader-key|
|
||||||
|
4.7.2 Custom keys .............. |easymotion-custom-keys|
|
||||||
5. License ............................ |easymotion-license|
|
5. License ............................ |easymotion-license|
|
||||||
6. Known bugs ......................... |easymotion-known-bugs|
|
6. Known bugs ......................... |easymotion-known-bugs|
|
||||||
7. Contributing ....................... |easymotion-contributing|
|
7. Contributing ....................... |easymotion-contributing|
|
||||||
@ -196,7 +197,16 @@ you want to use. There are two grouping algorithms available:
|
|||||||
Default: 1
|
Default: 1
|
||||||
|
|
||||||
------------------------------------------------------------------------------
|
------------------------------------------------------------------------------
|
||||||
4.5 Custom highlighting *easymotion-custom-hl*
|
4.5 Start of Line *EasyMotion_startofline*
|
||||||
|
|
||||||
|
When using the |j| or |k| motion, the cursor can be configured to stay in the
|
||||||
|
current column (by setting this option to 0) or to move along the first column
|
||||||
|
(by setting this option to 1).
|
||||||
|
|
||||||
|
Default: 1
|
||||||
|
|
||||||
|
------------------------------------------------------------------------------
|
||||||
|
4.6 Custom highlighting *easymotion-custom-hl*
|
||||||
|
|
||||||
The default EasyMotion configuration uses two highlighting groups that link
|
The default EasyMotion configuration uses two highlighting groups that link
|
||||||
to groups with default values. The highlighting groups are:
|
to groups with default values. The highlighting groups are:
|
||||||
@ -236,14 +246,14 @@ There are two ways to override the default colors:
|
|||||||
hi link EasyMotionShade Comment
|
hi link EasyMotionShade Comment
|
||||||
<
|
<
|
||||||
------------------------------------------------------------------------------
|
------------------------------------------------------------------------------
|
||||||
4.6 Custom mappings *easymotion-custom-mappings*
|
4.7 Custom mappings *easymotion-custom-mappings*
|
||||||
|
|
||||||
EasyMotion allows you to customize all default mappings to avoid conflicts
|
EasyMotion allows you to customize all default mappings to avoid conflicts
|
||||||
with existing mappings. It is possible to change the default leader key
|
with existing mappings. It is possible to change the default leader key
|
||||||
of all mappings to another key or sequence. It is also possible to fine
|
of all mappings to another key or sequence. It is also possible to fine
|
||||||
tune the plugin to your need by changing every single sequence.
|
tune the plugin to your need by changing every single sequence.
|
||||||
|
|
||||||
4.6.1 Leader key *EasyMotion_leader_key* *easymotion-leader-key*
|
4.7.1 Leader key *EasyMotion_leader_key* *easymotion-leader-key*
|
||||||
|
|
||||||
The default leader key can be changed with the configuration option
|
The default leader key can be changed with the configuration option
|
||||||
|EasyMotion_leader_key|.
|
|EasyMotion_leader_key|.
|
||||||
@ -259,7 +269,7 @@ leader by setting this option in your vimrc: >
|
|||||||
<
|
<
|
||||||
Default: '<Leader><Leader>'
|
Default: '<Leader><Leader>'
|
||||||
|
|
||||||
4.6.2 Custom Keys *easymotion-custom-keys*
|
4.7.2 Custom Keys *easymotion-custom-keys*
|
||||||
|
|
||||||
All custom mappings follow the same variable format: >
|
All custom mappings follow the same variable format: >
|
||||||
|
|
||||||
|
@ -18,6 +18,7 @@
|
|||||||
\ , 'do_shade' : 1
|
\ , 'do_shade' : 1
|
||||||
\ , 'do_mapping' : 1
|
\ , 'do_mapping' : 1
|
||||||
\ , 'grouping' : 1
|
\ , 'grouping' : 1
|
||||||
|
\ , 'startofline' : 1
|
||||||
\
|
\
|
||||||
\ , 'hl_group_target' : 'EasyMotionTarget'
|
\ , 'hl_group_target' : 'EasyMotionTarget'
|
||||||
\ , 'hl_group_shade' : 'EasyMotionShade'
|
\ , 'hl_group_shade' : 'EasyMotionShade'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user