Commit Graph

430 Commits

Author SHA1 Message Date
Marco Hinz
883f3a1cd3 system() -> s:run() 2015-05-19 14:06:52 +02:00
Marco Hinz
330dffd2dd Refactoring + %d and %f modifiers for commands
%d gets replaced by the difftool
%f gets replaced by the actual file
2015-05-19 14:01:29 +02:00
Marco Hinz
2b2f1b6e86 Bump license years 2015-04-28 15:59:08 +02:00
Stephan Steinbach
5cdf72acd1 Escape 2>&1 in the p4 detection
References #157.
2015-04-16 00:44:48 +02:00
James McCoy
06c51319c0 Detect valid Perforce configurations with “p4 info”
“p4 monitor info” isn't always available and can impose a heavy runtime
cost when it is if the server isn't responsive.

Closes mhinz/vim-signify#153

Signed-off-by: James McCoy <vega.james@gmail.com>
2015-02-23 22:26:39 -05:00
Marco Hinz
ee918b9562 Calling sy#stop() on BufDelete is obsolete
Since we switched from global variables to buffer-local ones, there is no
clean up needed anymore.
2015-02-04 16:05:16 +01:00
James McCoy
04653e5e36 Merge pull request #150 from epage/master
Fix Perforce support on Windows
2015-01-01 09:40:37 -05:00
Ed Page
9c94652917 Making the cross-platform /dev/null reusable 2014-12-30 15:10:43 -06:00
Ed Page
3cade031b6 Fix Perforce support on Windows 2014-12-30 14:45:15 -06:00
Marco Hinz
ae0efffba3 README: update
References #113.
2014-12-11 17:28:57 +01: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
52cb36801d get_diff_hg: Disable color extension
This handles the case where a user forces colors from the color extension via
hgrc:

    [extensions]
    color =

    [defaults]
    diff = --colors=always

Sy disables these for its 'hg diff' call, otherwise the output would be
riddled with color escape sequences and couldn't be parsed properly which
would result in no signs shown.

References #146.
2014-11-23 07:34:20 +01:00
James McCoy
6d45797393 get_diff_hg: Run diff from the file's parent directory
Mercurial's detection for where a file's containing repo is doesn't work
well when the working directory is a different Mercurial repo (c.f.,
mhinz/vim-signify#146).  Run "hg diff" from the target file's parent
directory to work around this.

Signed-off-by: James McCoy <vega.james@gmail.com>
2014-11-23 00:03:26 -05:00
James McCoy
babf2fd975 Remove extraneous :call in FocusGained autocmd
Closes mhinz/vim-signify#143
Signed-off-by: James McCoy <vega.james@gmail.com>
2014-11-06 14:02:00 -05:00
Marco Hinz
bd0956eee6 Remove all default mappings except for ]c / [c
References #142.
2014-11-05 14:16:44 +01:00
Alex Rodionov
de297820bc Expose sy#util#refresh_windows()
References #141.
2014-11-05 13:07:59 +01:00
Alex Rodionov
4c3c10d1cb Update signs both on FocusGained and FocusLost 2014-11-02 19:47:49 +06:00
Marco Hinz
a03bee658f Add support for lazy loading 2014-11-02 09:28:54 +01:00
killphi
e4a428c0d7 Make hunk text object mappable
References #138.
2014-11-02 09:11:28 +01:00
James McCoy
75c8b4d54a Preserve user's order in vcs_list
Signed-off-by: James McCoy <vega.james@gmail.com>
2014-10-23 17:44:32 -04:00
Marco Hinz
64c3b60a98 Revert "Use 'git -C'"
This reverts commit 8fa7aea4b3.

Although -C was introduced in git 1.8.5, over a year ago, it still might be
too new for some of us.
2014-10-09 22:35:17 +02:00
Marco Hinz
8fa7aea4b3 Use 'git -C' 2014-10-09 18:58:23 +02:00
Benjamin Thomas
8128ea2c9c Make use of SignifySignDeleteFirstLine
Closes #137.
2014-10-08 08:47:01 +02:00
Marco Hinz
94d6050010 Doc: add g:signify_sign_show_count
References #125.
2014-10-07 23:04:13 +02: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
2723b1e86e Execute FocusGained action for all windows
References #113.
2014-10-06 14:09:22 +02:00
Marco Hinz
9186a58ca7 Doc: add remark about ]c and [c 2014-10-06 01:32:10 +02:00
Marco Hinz
ecd0bb0dbc Introduce hunk text object 2014-10-06 01:17:57 +02:00
Marco Hinz
8cef26186e Make sure b:sy_path is always set
References #136.
2014-10-04 19:48:10 +02:00
Marco Hinz
a149ad9510 README: update 2014-10-04 16:20:17 +02:00
Marco Hinz
fe3bafce11 Introduce smarter sign management 2014-10-04 15:56:10 +02:00
Marco Hinz
5baf161ae4 Skip help files by default 2014-09-18 15:39:50 +02:00
Marco Hinz
0725f93014 Fix help filetype skipping 2014-09-18 15:34:26 +02:00
Marco Hinz
0261a6af2c Improve :SyDebug 2014-09-18 13:11:33 +02:00
Marco Hinz
732de1f8f2 Doc: change tags to common conventions 2014-09-11 16:49:16 +02:00
Marco Hinz
706512025c Doc: add possible values for g:signify_vcs_list
References #132.
2014-09-11 16:35:35 +02:00
Marco Hinz
4d3674d431 Perforce: check for server availability before requesting a diff
References #131.
2014-09-07 16:11:07 +02:00
Kevin
9ca274d792 Fix error when toggling on a new file
Toggling on a new file lead to an error since b:sy wouldn't exist at
that time.

Closes #124.
2014-06-13 16:36:08 +02:00
James McCoy
96ed0cca85 doc/signify.txt: Add perforce to supported VCS 2014-06-03 11:40:21 -04:00
James McCoy
7586fa56c0 Merge pull request #123 from sahands/master
Minor grammar changes in README.md
2014-05-04 19:09:52 -04:00
Sahand Saba
9fdaf59dbb Minor grammar changes in README.md 2014-05-04 13:16:07 -07: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
c5d7c2b4e8 Merge branch 'UNC-paths'
Closes #114
2014-02-02 11:44:19 -05:00
James McCoy
e270560349 Replace all uses of "cd … && do_something" with sy#util#run_in_dir
Signed-off-by: James McCoy <vega.james@gmail.com>
2014-01-30 23:04:39 -05:00
James McCoy
f38cebd791 Add sy#util#run_in_dir to run system() within a specific directory
Signed-off-by: James McCoy <vega.james@gmail.com>
2014-01-30 23:03:55 -05:00
Marco Hinz
1789155bf3 Doc: "update on focusgained" doesn't write to disk
References #113.
2014-01-20 14:50:09 +01:00
Marco Hinz
0e66e0963f Fix matching of the "first line deleted" sign
Closes #112.
2014-01-15 09:48:43 +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
3ac59ab594 Doc: correct delete signs explanation 2014-01-01 23:40:57 +01:00