Commit Graph

23 Commits

Author SHA1 Message Date
Marco Hinz
a58fbe93df Useless use of :execute 2015-05-25 16:37:37 +02:00
James McCoy
c61dded98a Add the buffer number as an argument to sy#stop()
sy#stop() is called by the BufDelete autocmd so b: variables may not
correspond to the buffer actually being deleted.  Instead, we must use
<abuf> to determine which buffer is being deleted and pass that into
sy#stop().

There are some ripple effects, causing sy#sign#remove_all_signs to also
gain a buffer number argument.

Signed-off-by: James McCoy <vega.james@gmail.com>
2014-11-25 11:25:40 -05:00
Marco Hinz
c2f3b364d2 Introduce g:signify_sign_show_count
This option replaces g:signify_sign_delete_use_count and works for both,
delete and change/delete.

Referenes #125.
2014-10-07 23:02:17 +02:00
Benjamin Thomas
bdc0c5eb15 Add finer grained control over signs and highlights
I wanted to be able to customize signify in a way that wasn't possible
with the current set of options.  This commit adds 2 new options and 2
new highlight groups.

Specifically, we can now

1.  differentiate between changes, deletes AND signs that have both
    with the `signify_sign_changedelete` option.
2.  disable showing the number of deleted lines in the sign column with
    the `signify_sign_delete_use_count` option.
3.  highlight lines with changes and deletes specifically with the
    `SignifySignChangeDelete` highlight group.
4.  highlight the first line differently with the
    `SignifySignDeleteFirstLine` highlight group.

All of these default to existing settings/highlight groups, so
everything should continue working the way it does now.

--------------------------------------------------------------------------------

For those that are curious, I wanted to configure signify to show no
symbols in the sign column, and to just use the highlight groups to give
me all the information I needed.  I am able to achieve that now with the
following settings and the Solarized colorscheme:

let g:signify_sign_add = "\<Char-0xa0>\<Char-0xa0>"
let g:signify_sign_change = "\<Char-0xa0>\<Char-0xa0>"
let g:signify_sign_changedelete = "__"
let g:signify_sign_delete = "__"
let g:signify_sign_delete_first_line = "‾‾"
let g:signify_sign_delete_use_count = 0

hi SignifySignDelete term=bold,underline cterm=bold,underline ctermfg=1 ctermbg=12
hi SignifySignDeleteFirstLine ctermfg=1 ctermbg=12
hi SignifySignChangeDelete term=bold,underline cterm=bold,underline ctermfg=1 ctermbg=3

You can see it in action here:

https://twitter.com/_bentomas/status/486266117204090880
2014-10-07 23:02:17 +02:00
Marco Hinz
fe3bafce11 Introduce smarter sign management 2014-10-04 15:56:10 +02:00
blacksand
2b05c7fd04 Fix locale setting for Chinese Windows versions
On the Chinese version of Windows, v:lang is "zh_CN", but execute
":language zh_CN" will fail and ":language chinese_china" must be used
to change the locale instead.

Closes #116.
2014-02-05 22:07:27 +01:00
James McCoy
159b171e4a Use _> for more than 99 deletes lines (again)
Closes #110.
2014-01-04 09:40:10 +01:00
Marco Hinz
5db82c4d2a Let counter overflow if more than 100 lines deleted
If there are more than 99 deleted lines, the actual count isn't being
important anymore. Thus we just let it overflow and save another
conditional.

100 deleted lines -> "00"

Closes #109.
2014-01-01 22:54:49 +01:00
Marco Hinz
9e83f243e7 Fix unicode + subscripting bug
This bug happened when a unicode character was used for the delete sign.
Prior to this patch we used string subscripting which worked fine for
ASCII characters, but see yourself:

    :echo '«5'[-2:]
2013-12-29 19:18:54 +01:00
James McCoy
7f57ee5af6 Use two digit numbers for SignifyDelete signs
Defining the SignifyDelete set of signs on the fly provides the ability
to specify the exact line deletion count for up to 99 lines, rather than
the current limit of 9 lines.

This also has the benefit of reducing the number of signs defined when
there aren't many hunks of deleted lines.  On the flip side, if there
are other sign-placing plugins in use, then it also increases the chance
of nearing the ~120 sign definition limit if there are many hunks of
varying line deletions.
2013-12-11 10:04:52 +01:00
Marco Hinz
2f1def6b9d Don't remember the dummy sign
References #102.
2013-12-06 22:43:51 +01:00
Marco Hinz
6ecab1b621 Prevent potential regressions
References #95.
2013-11-22 16:44:06 +01:00
Marco Hinz
f7dc63e819 Remove 3-argument getbufvar() for better compatibility
References #95.
2013-11-22 16:14:28 +01:00
James McCoy
5211c19ee7 Move Sy's data from g:sy to b:sy 2013-11-22 13:48:49 +01:00
Denys Lózko
f4b2350458 Fix sign_overwrite for non-EN locales 2013-11-19 08:24:19 +01:00
Marco Hinz
50496311c5 Remove guards from autoload files 2013-09-30 10:22:20 +02:00
Marco Hinz
a9284f363c Move modelines to the top 2013-09-30 10:19:31 +02:00
Marco Hinz
be4d622bb9 Don't reset signs when another window gets updated
References #73.
2013-09-25 11:17:52 +02:00
Marco Hinz
da5eabe3c9 Relocate emptying of other signs dict
References #64.
2013-09-06 16:43:08 +02:00
Marco Hinz
4167fa0373 Fix sign overwrite issue
References #64.
2013-09-06 15:34:13 +02:00
Bailey Ling
a8f67e0f0f Reset stats when signs are cleared 2013-08-26 15:52:29 +00:00
Marco Hinz
b29cd71f6d Set encoding for plugin files
Closes #54.
2013-08-19 17:36:16 +02:00
Marco Hinz
ea331d6065 Populate autoload/ 2013-07-17 12:30:58 +02:00