change of exception list handling

"Exception" is quite an overloaded term, thus exception lists were
renamed to skip lists; even 'skip dicts', since their type changed, too.
This commit is contained in:
Marco Hinz 2013-03-26 10:34:29 +01:00
parent 8eb00a2d08
commit a885a536bd
3 changed files with 13 additions and 22 deletions

View File

@ -15,7 +15,7 @@ Features:
- fully configurable through global variables (options and mappings)
- optional preserving of signs from other plugins
- you can toggle the plugin per buffer
- exception lists for filetypes and filenames
- skip certain filetypes and filenames
- good documentation
- quick developer response! :-)
@ -126,16 +126,16 @@ it:
let g:signify_mapping_toggle = '<leader>gt'
```
#### exception lists for filetypes and filenames
#### skip certain filetypes and filenames
If you want to disable Sy for certain kinds of filename or file types,
you explicitely have to create exception lists:
you explicitely have to create "skip dicts":
Example:
```vim
let g:signify_exceptions_filetype = [ 'vim', 'c' ]
let g:signify_exceptions_filename = [ '.vimrc' ]
let g:signify_skip_filetype = { 'vim': 1, 'c': 1 }
let g:signify_skip_filename = { '/home/user/.vimrc': 1 }
```
#### good documentation
@ -169,8 +169,8 @@ let g:signify_mapping_prev_hunk = '<leader>gp'
let g:signify_mapping_toggle_highlight = '<leader>gh'
let g:signify_mapping_toggle = '<leader>gt'
let g:signify_exceptions_filetype = [ 'vim', 'c' ]
let g:signify_exceptions_filename = [ '.vimrc' ]
let g:signify_skip_filetype = { 'vim': 1, 'c': 1 }
let g:signify_skip_filename = { '/home/user/.vimrc': 1 }
let g:signify_sign_overwrite = 1

View File

@ -114,8 +114,8 @@ Mapping for toggling line highlighting for lines containing changes.
Mapping for toggling the plugin for the current buffer only.
let g:signify_exceptions_filetype = [ 'vim', 'c' ]
let g:signify_exceptions_filename = [ '.vimrc' ]
let g:signify_skip_filetype = { 'vim': 1, 'c': 1 }
let g:signify_skip_filename = { '/home/user/.vimrc': 1 }
Don't activate the plugin for these filetypes and/or filenames.

View File

@ -139,20 +139,11 @@ function! s:start(path) abort
execute 'sign place 99999 line=1 name=SignifyPlaceholder file='. a:path
endif
" Check for exceptions.
if exists('g:signify_exceptions_filetype')
for i in g:signify_exceptions_filetype
if i == &ft
return
endif
endfor
if exists('g:signify_skip_filetype') && has_key(g:signify_skip_filetype, &ft)
return
endif
if exists('g:signify_exceptions_filename')
for i in g:signify_exceptions_filename
if i == a:path
return
endif
endfor
if exists('g:signify_skip_filename') && has_key(g:signify_skip_filename, a:path)
return
endif
" New buffer.. add to list.