rename 'change' to 'hunk' in the appropriate places

This commit is contained in:
Marco Hinz 2013-03-06 12:32:02 +01:00
parent 2f615f3067
commit c2b11e4711
2 changed files with 35 additions and 34 deletions

View File

@ -31,8 +31,9 @@ CONTENTS *signify-contents*
==============================================================================
1. Intro *signify-intro*
Signify is quite unobtrusive. If there is information about changes since the
last commit, they will be shown on the left side in Vim's sign column.
Signify is quite unobtrusive. If there is information about changes (in form
of patch hunks) since the last commit, they will be shown on the left side in
Vim's sign column.
Easy-peasy!
@ -57,18 +58,18 @@ Just put these variables into your vimrc. The shown assignments are only
examples.
*signify-var-mapping_next_change*
*signify-var-mapping_next_hunk*
let g:signify_mapping_next_change = '<leader>gn'
let g:signify_mapping_next_hunk = '<leader>gn'
Mapping for jumping to the next change.
Mapping for jumping to the next hunk.
*signify-var-mapping_prev_change*
*signify-var-mapping_prev_hunk*
let g:signify_mapping_prev_change = '<leader>gp'
let g:signify_mapping_prev_hunk = '<leader>gp'
mapping for jumping to the previous change.
mapping for jumping to the previous hunk.
*signify-var-mapping_toggle_highlight*
@ -127,20 +128,20 @@ Toggle line highlighting for lines containing changes.
Default mapping: <leader>gh
*signify-func-jump_to_next_change*
*signify-func-jump_to_next_hunk*
:SignifyJumpToNextChange
:SignifyJumpToNextHunk
Jump to the next change.
Jump to the next hunk.
Default mapping: <leader>gn
*signify-func-jump_to_prev_change*
*signify-func-jump_to_prev_hunk*
:SignifyJumpToPrevChange
:SignifyJumpToPrevHunk
Jump to the previous change.
Jump to the previous hunk.
Default mapping: <leader>gp

View File

@ -14,16 +14,16 @@ let s:id_top = s:id_start
let s:id_jump = s:id_start
" Default mappings {{{1
if exists('g:signify_mapping_next_change')
exe 'nnoremap '. g:signify_mapping_next_change .' :SignifyJumpToNextChange<cr>'
if exists('g:signify_mapping_next_hunk')
exe 'nnoremap '. g:signify_mapping_next_hunk .' :SignifyJumpToNextHunk<cr>'
else
nnoremap <leader>gn :SignifyJumpToNextChange<cr>
nnoremap <leader>gn :SignifyJumpToNextHunk<cr>
endif
if exists('g:signify_mapping_prev_change')
exe 'nnoremap '. g:signify_mapping_prev_change .' :SignifyJumpToPrevChange<cr>'
if exists('g:signify_mapping_prev_hunk')
exe 'nnoremap '. g:signify_mapping_prev_hunk .' :SignifyJumpToPrevHunk<cr>'
else
nnoremap <leader>gp :SignifyJumpToPrevChange<cr>
nnoremap <leader>gp :SignifyJumpToPrevHunk<cr>
endif
if exists('g:signify_mapping_toggle_highlight')
@ -66,10 +66,10 @@ aug signify
au BufDelete * call s:stop() | call remove(s:active_buffers, expand('%:p'))
aug END
com! -nargs=0 -bar SignifyToggle call s:toggle_signify()
com! -nargs=0 -bar SignifyToggleHighlight call s:toggle_line_highlighting()
com! -nargs=0 -bar SignifyJumpToNextChange call s:jump_to_next_change()
com! -nargs=0 -bar SignifyJumpToPrevChange call s:jump_to_prev_change()
com! -nargs=0 -bar SignifyToggle call s:toggle_signify()
com! -nargs=0 -bar SignifyToggleHighlight call s:toggle_line_highlighting()
com! -nargs=0 -bar SignifyJumpToNextHunk call s:jump_to_next_hunk()
com! -nargs=0 -bar SignifyJumpToPrevHunk call s:jump_to_prev_hunk()
" Internal functions {{{1
" Functions -> s:start() {{{2
@ -194,21 +194,21 @@ endfunction
" Functions -> s:toggle_line_highlighting() {{{2
function! s:toggle_line_highlighting() abort
if s:line_highlight_b
sign define SignifyAdd text=+ texthl=SignifyAdd linehl=none
sign define SignifyChange text=* texthl=SignifyChange linehl=none
sign define SignifyDelete text=- texthl=SignifyDelete linehl=none
sign define SignifyAdd text=>> texthl=SignifyAdd linehl=none
sign define SignifyChange text=!! texthl=SignifyChange linehl=none
sign define SignifyDelete text=<< texthl=SignifyDelete linehl=none
let s:line_highlight_b = 0
else
sign define SignifyAdd text=+ texthl=SignifyAdd linehl=DiffAdd
sign define SignifyChange text=* texthl=SignifyChange linehl=DiffChange
sign define SignifyDelete text=- texthl=SignifyRemove linehl=DiffDelete
sign define SignifyAdd text=>> texthl=SignifyAdd linehl=DiffAdd
sign define SignifyDelete text=<< texthl=SignifyRemove linehl=DiffDelete
sign define SignifyChange text=!! texthl=SignifyChange linehl=DiffChange
let s:line_highlight_b = 1
endif
call s:start()
endfunction
" Functions -> s:jump_to_next_change() {{{2
function! s:jump_to_next_change()
" Functions -> s:jump_to_next_hunk() {{{2
function! s:jump_to_next_hunk()
if s:last_jump_was_next == 0
let s:id_jump += 2
endif
@ -217,8 +217,8 @@ function! s:jump_to_next_change()
let s:last_jump_was_next = 1
endfunction
" Functions -> s:jump_to_prev_change() {{{2
function! s:jump_to_prev_change()
" Functions -> s:jump_to_prev_hunk() {{{2
function! s:jump_to_prev_hunk()
if s:last_jump_was_next == 1
let s:id_jump -= 2
endif