Doc: add remark about ]c and [c

This commit is contained in:
Marco Hinz 2014-10-06 01:32:10 +02:00
parent ecd0bb0dbc
commit 9186a58ca7
2 changed files with 18 additions and 14 deletions

View File

@ -167,6 +167,9 @@ Alternatively, you can also map it yourself:
< <
There is no difference between both variants. There is no difference between both variants.
NOTE: Analog to Vim's diff mode, you can also use |]c| and |[c| for jumping
between hunks.
------------------------------------------------------------------------------ ------------------------------------------------------------------------------
*g:signify_mapping_toggle_highlight* *g:signify_mapping_toggle_highlight*
> >

View File

@ -46,10 +46,23 @@ com! -nargs=0 -bar SignifyToggleHighlight call sy#highlight#line_toggle()
com! -nargs=0 -bar SyDebug call sy#debug#list_active_buffers() com! -nargs=0 -bar SyDebug call sy#debug#list_active_buffers()
" Init: mappings {{{1 " Init: mappings {{{1
nnoremap <silent> <plug>(signify-toggle) :<c-u>call sy#toggle()<cr>
nnoremap <silent> <plug>(signify-toggle-highlight) :<c-u>call sy#highlight#line_toggle()<cr>
nnoremap <silent> <expr> <plug>(signify-next-hunk) &diff ? ']c' : ":\<c-u>call sy#jump#next_hunk(v:count1)\<cr>" nnoremap <silent> <expr> <plug>(signify-next-hunk) &diff ? ']c' : ":\<c-u>call sy#jump#next_hunk(v:count1)\<cr>"
nnoremap <silent> <expr> <plug>(signify-prev-hunk) &diff ? '[c' : ":\<c-u>call sy#jump#prev_hunk(v:count1)\<cr>" nnoremap <silent> <expr> <plug>(signify-prev-hunk) &diff ? '[c' : ":\<c-u>call sy#jump#prev_hunk(v:count1)\<cr>"
nnoremap <silent> <plug>(signify-toggle-highlight) :<c-u>call sy#highlight#line_toggle()<cr>
nnoremap <silent> <plug>(signify-toggle) :<c-u>call sy#toggle()<cr> if exists('g:signify_mapping_toggle')
execute 'nmap '. g:signify_mapping_toggle .' <plug>(signify-toggle)'
elseif !hasmapto('<plug>(signify-toggle)') && empty(maparg('<leader>gt', 'n'))
nmap <leader>gt <plug>(signify-toggle)
endif
if exists('g:signify_mapping_toggle_highlight')
execute 'nmap '. g:signify_mapping_toggle_highlight .' <plug>(signify-toggle-highlight)'
elseif !hasmapto('<plug>(signify-toggle-highlight)') && empty(maparg('<leader>gh', 'n'))
nmap <leader>gh <plug>(signify-toggle-highlight)
endif
if exists('g:signify_mapping_next_hunk') if exists('g:signify_mapping_next_hunk')
execute 'nmap '. g:signify_mapping_next_hunk .' <plug>(signify-next-hunk)' execute 'nmap '. g:signify_mapping_next_hunk .' <plug>(signify-next-hunk)'
@ -63,18 +76,6 @@ elseif !hasmapto('<plug>(signify-prev-hunk)') && empty(maparg('<leader>gk', 'n')
nmap <leader>gk <plug>(signify-prev-hunk) nmap <leader>gk <plug>(signify-prev-hunk)
endif endif
if exists('g:signify_mapping_toggle_highlight')
execute 'nmap '. g:signify_mapping_toggle_highlight .' <plug>(signify-toggle-highlight)'
elseif !hasmapto('<plug>(signify-toggle-highlight)') && empty(maparg('<leader>gh', 'n'))
nmap <leader>gh <plug>(signify-toggle-highlight)
endif
if exists('g:signify_mapping_toggle')
execute 'nmap '. g:signify_mapping_toggle .' <plug>(signify-toggle)'
elseif !hasmapto('<plug>(signify-toggle)') && empty(maparg('<leader>gt', 'n'))
nmap <leader>gt <plug>(signify-toggle)
endif
if empty(maparg(']c', 'n')) if empty(maparg(']c', 'n'))
nmap ]c <plug>(signify-next-hunk) nmap ]c <plug>(signify-next-hunk)
endif endif