2013-10-02 07:47:05 -04:00
|
|
|
*signify.txt* Indicate changed lines within a file using a VCS.
|
2013-03-05 17:07:54 -05:00
|
|
|
*signify*
|
|
|
|
___
|
|
|
|
__ __ /'___\
|
|
|
|
____/\_\ __ ___ /\_\/\ \__/ __ __
|
|
|
|
/',__\/\ \ /'_ `\ /' _ `\/\ \ \ ,__\/\ \/\ \
|
|
|
|
/\__, `\ \ \/\ \L\ \/\ \/\ \ \ \ \ \_/\ \ \_\ \
|
|
|
|
\/\____/\ \_\ \____ \ \_\ \_\ \_\ \_\ \/`____ \
|
|
|
|
\/___/ \/_/\/___L\ \/_/\/_/\/_/\/_/ `/___/> \
|
|
|
|
/\____/ /\___/
|
|
|
|
\_/__/ \/__/
|
|
|
|
|
2013-10-02 07:47:05 -04:00
|
|
|
by Marco Hinz~
|
2013-03-05 17:07:54 -05:00
|
|
|
|
2013-10-02 07:47:05 -04:00
|
|
|
Twitter: https://twitter.com/_mhinz_
|
|
|
|
Github: http://github.com/mhinz
|
|
|
|
IRC: mhi^ (Freenode)
|
|
|
|
>
|
|
|
|
If you use any of my plugins, please star them on github. It's a great way
|
|
|
|
of getting feedback and gives me the kick to put more time into their
|
|
|
|
development.
|
2013-03-05 17:07:54 -05:00
|
|
|
|
2013-10-02 07:47:05 -04:00
|
|
|
If you encounter any bugs or have feature requests, just open an issue
|
|
|
|
report on Github.
|
2013-03-05 17:07:54 -05:00
|
|
|
|
2013-10-02 07:47:05 -04:00
|
|
|
Thank you for flying mhi^ airlines. Get the Vim on!
|
|
|
|
<
|
2013-03-05 17:07:54 -05:00
|
|
|
==============================================================================
|
2014-09-11 10:48:22 -04:00
|
|
|
TOC *signify-contents*
|
2013-03-05 17:07:54 -05:00
|
|
|
|
2014-09-11 10:48:22 -04:00
|
|
|
INTRO .......................... |signify-intro|
|
|
|
|
USAGE .......................... |signify-usage|
|
|
|
|
OPTIONS ........................ |signify-options|
|
|
|
|
COMMANDS ....................... |signify-commands|
|
|
|
|
MAPPINGS ....................... |signify-mappings|
|
2014-10-05 17:58:59 -04:00
|
|
|
OBJECTS ........................ |signify-objects|
|
2014-09-11 10:48:22 -04:00
|
|
|
COLORS ......................... |signify-colors|
|
2013-03-05 17:07:54 -05:00
|
|
|
|
|
|
|
==============================================================================
|
2014-09-11 10:48:22 -04:00
|
|
|
INTRO *signify-intro*
|
2013-03-05 17:07:54 -05:00
|
|
|
|
2013-10-02 07:47:05 -04:00
|
|
|
Signify (or just Sy) is a quite unobtrusive plugin. It uses signs to indicate
|
|
|
|
added, modified and removed lines based on data of an underlying version
|
|
|
|
control system.
|
2013-03-05 17:07:54 -05:00
|
|
|
|
|
|
|
==============================================================================
|
2014-09-11 10:48:22 -04:00
|
|
|
USAGE *signify-usage*
|
2013-03-05 17:07:54 -05:00
|
|
|
|
|
|
|
The usage is pretty straight-forward. By default you should only notice a
|
|
|
|
difference, if you're working in a directory that is managed by a supported
|
2013-10-02 07:47:05 -04:00
|
|
|
version control system and the current file was changed since the last commit.
|
|
|
|
|
2013-10-02 08:08:34 -04:00
|
|
|
Supported VCS:~
|
2013-10-02 07:47:05 -04:00
|
|
|
>
|
|
|
|
git
|
|
|
|
mercurial
|
|
|
|
darcs
|
|
|
|
bzr
|
|
|
|
subversion
|
|
|
|
cvs
|
|
|
|
rcs
|
|
|
|
fossil
|
|
|
|
accurev
|
2014-06-03 11:40:21 -04:00
|
|
|
perforce
|
2013-10-02 07:47:05 -04:00
|
|
|
<
|
2013-10-02 08:08:34 -04:00
|
|
|
Sign explanation:~
|
2013-03-14 06:22:36 -04:00
|
|
|
|
2013-10-02 07:47:05 -04:00
|
|
|
`+` This line was added.
|
2013-03-14 06:22:36 -04:00
|
|
|
|
2013-10-02 07:47:05 -04:00
|
|
|
`!` This line was modified.
|
2013-03-14 06:22:36 -04:00
|
|
|
|
2013-10-02 07:47:05 -04:00
|
|
|
`_1` The number of deleted lines below this sign. If the number is larger
|
2014-01-03 20:06:25 -05:00
|
|
|
`99` than 9, the `_` will be omitted. For numbers larger than 99, `_>`
|
|
|
|
`_>` will be shown instead.
|
2013-03-14 06:22:36 -04:00
|
|
|
|
2013-10-02 07:47:05 -04:00
|
|
|
`!1` This line was modified and a number of lines below were deleted.
|
2014-01-01 17:40:57 -05:00
|
|
|
`!>` It is a combination of `!` and `_`. If the number is larger than 9,
|
|
|
|
`!>` will be shown instead.
|
2013-04-12 05:56:23 -04:00
|
|
|
|
2013-10-02 07:47:05 -04:00
|
|
|
`‾` The first line was removed. It's a special case of the `_` sign.
|
2013-03-05 17:07:54 -05:00
|
|
|
|
|
|
|
==============================================================================
|
2014-09-11 10:48:22 -04:00
|
|
|
OPTIONS *signify-options*
|
2013-03-05 17:07:54 -05:00
|
|
|
|
2013-06-22 09:11:25 -04:00
|
|
|
Put these variables into your vimrc. The provided examples also indicate the
|
|
|
|
default values, as long as no "Default:" section is given.
|
2013-03-07 06:56:25 -05:00
|
|
|
|
2013-10-02 08:08:34 -04:00
|
|
|
All available options:~
|
2013-10-02 07:47:05 -04:00
|
|
|
|
2014-09-11 10:48:22 -04:00
|
|
|
|g:signify_vcs_list|
|
|
|
|
|g:signify_disable_by_default|
|
|
|
|
|g:signify_mapping_next_hunk|
|
|
|
|
|g:signify_mapping_prev_hunk|
|
|
|
|
|g:signify_mapping_toggle_highlight|
|
|
|
|
|g:signify_mapping_toggle|
|
|
|
|
|g:signify_skip_filetype|
|
|
|
|
|g:signify_skip_filename|
|
|
|
|
|g:signify_update_on_bufenter|
|
|
|
|
|g:signify_update_on_focusgained|
|
|
|
|
|g:signify_line_highlight|
|
|
|
|
|g:signify_sign_delete_first_line|
|
|
|
|
|g:signify_sign_delete|
|
|
|
|
|g:signify_sign_change|
|
|
|
|
|g:signify_sign_add|
|
|
|
|
|g:signify_cursorhold_normal|
|
|
|
|
|g:signify_cursorhold_insert|
|
|
|
|
|g:signify_difftool|
|
|
|
|
|g:signify_diffoptions|
|
2013-10-02 07:47:05 -04:00
|
|
|
|
|
|
|
------------------------------------------------------------------------------
|
2014-09-11 10:48:22 -04:00
|
|
|
*g:signify_vcs_list*
|
2013-10-02 07:47:05 -04:00
|
|
|
>
|
2013-03-25 11:12:31 -04:00
|
|
|
let g:signify_vcs_list = [ 'git', 'hg' ]
|
2013-10-02 07:47:05 -04:00
|
|
|
<
|
|
|
|
Default: empty
|
2014-09-11 10:35:35 -04:00
|
|
|
Possible values: 'accurev'
|
|
|
|
'bzr'
|
|
|
|
'cvs'
|
|
|
|
'darcs'
|
|
|
|
'fossil'
|
|
|
|
'git'
|
|
|
|
'hg'
|
|
|
|
'perforce'
|
|
|
|
'rcs'
|
|
|
|
'svn'
|
2013-03-25 11:12:31 -04:00
|
|
|
|
2013-12-19 06:05:32 -05:00
|
|
|
NOTE: This is the most important option, so read closely.
|
2013-03-25 11:12:31 -04:00
|
|
|
|
2013-10-02 07:47:05 -04:00
|
|
|
It determines the VCS to check for and in what order. If you only use git and
|
|
|
|
mercurial, you can shorten the list to the shown example. If you use mostly
|
|
|
|
mercurial and only sometimes git, put 'hg' in the front of the list. It's
|
|
|
|
basically a priority list.
|
2013-04-16 03:26:59 -04:00
|
|
|
|
2013-09-11 18:31:09 -04:00
|
|
|
This can improve buffer loading time since by default all supported and
|
2014-09-11 10:35:35 -04:00
|
|
|
installed VCS will be checked for, so you are advised to change this option to
|
|
|
|
your needs. (This only happens once at the first time the signs get updated.
|
|
|
|
Afterwards, the VCS will be remembered anyway.)
|
2013-04-16 03:26:59 -04:00
|
|
|
|
2014-09-11 10:35:35 -04:00
|
|
|
NOTE: Some VCS rely on a an external diff tool to work properly (svn, darcs,
|
|
|
|
bzr, fossil), thus you have to make sure that Vim can find a valid diff tool.
|
2014-09-11 10:48:22 -04:00
|
|
|
So either the one you set through |g:signify_difftool| or "diff" by default.
|
2013-11-03 10:08:17 -05:00
|
|
|
|
2014-09-11 10:35:35 -04:00
|
|
|
NOTE: If you don't set this option and Sy is activated, updating signs for a
|
2013-10-02 07:47:05 -04:00
|
|
|
non-VCS file can lead to significant delay since all supported and installed
|
|
|
|
VCS will be tested for.
|
2013-07-04 06:28:18 -04:00
|
|
|
|
2013-10-02 07:47:05 -04:00
|
|
|
------------------------------------------------------------------------------
|
2014-09-11 10:48:22 -04:00
|
|
|
*g:signify_disable_by_default*
|
2013-10-02 07:47:05 -04:00
|
|
|
>
|
2013-07-04 06:28:18 -04:00
|
|
|
let g:signify_disable_by_default = 0
|
2013-10-02 07:47:05 -04:00
|
|
|
<
|
2013-07-04 06:28:18 -04:00
|
|
|
Don't run Sy by default. You can toggle it anytime via :SignifyToggle.
|
|
|
|
|
2013-10-02 07:47:05 -04:00
|
|
|
------------------------------------------------------------------------------
|
2014-09-11 10:48:22 -04:00
|
|
|
*g:signify_mapping_next_hunk*
|
|
|
|
*g:signify_mapping_prev_hunk*
|
2013-10-02 07:47:05 -04:00
|
|
|
>
|
2013-03-13 12:08:41 -04:00
|
|
|
let g:signify_mapping_next_hunk = '<leader>gj'
|
|
|
|
let g:signify_mapping_prev_hunk = '<leader>gk'
|
2013-10-02 07:47:05 -04:00
|
|
|
<
|
2013-07-04 05:52:28 -04:00
|
|
|
Mapping for jumping to the start of the next or previous hunk.
|
2013-03-05 17:07:54 -05:00
|
|
|
|
2013-07-21 18:21:34 -04:00
|
|
|
Alternatively, you can also map it yourself:
|
2013-10-02 07:47:05 -04:00
|
|
|
>
|
2013-12-03 11:10:00 -05:00
|
|
|
nmap <leader>gj <plug>(signify-next-hunk)
|
|
|
|
nmap <leader>gk <plug>(signify-prev-hunk)
|
2013-10-02 07:47:05 -04:00
|
|
|
<
|
2013-07-21 18:21:34 -04:00
|
|
|
There is no difference between both variants.
|
|
|
|
|
2013-10-02 07:47:05 -04:00
|
|
|
------------------------------------------------------------------------------
|
2014-09-11 10:48:22 -04:00
|
|
|
*g:signify_mapping_toggle_highlight*
|
2013-10-02 07:47:05 -04:00
|
|
|
>
|
2013-03-05 17:07:54 -05:00
|
|
|
let g:signify_mapping_toggle_highlight = '<leader>gh'
|
2013-10-02 07:47:05 -04:00
|
|
|
<
|
2013-03-05 17:07:54 -05:00
|
|
|
Mapping for toggling line highlighting for lines containing changes.
|
|
|
|
|
2013-10-02 07:47:05 -04:00
|
|
|
------------------------------------------------------------------------------
|
2014-09-11 10:48:22 -04:00
|
|
|
*g:signify_mapping_toggle*
|
2013-10-02 07:47:05 -04:00
|
|
|
>
|
2013-03-05 17:07:54 -05:00
|
|
|
let g:signify_mapping_toggle = '<leader>gt'
|
2013-10-02 07:47:05 -04:00
|
|
|
<
|
2013-03-05 17:07:54 -05:00
|
|
|
Mapping for toggling the plugin for the current buffer only.
|
|
|
|
|
2013-10-02 07:47:05 -04:00
|
|
|
------------------------------------------------------------------------------
|
2014-09-11 10:48:22 -04:00
|
|
|
*g:signify_skip_filetype*
|
|
|
|
*g:signify_skip_filename*
|
2013-10-02 07:47:05 -04:00
|
|
|
>
|
2013-03-26 05:34:29 -04:00
|
|
|
let g:signify_skip_filetype = { 'vim': 1, 'c': 1 }
|
|
|
|
let g:signify_skip_filename = { '/home/user/.vimrc': 1 }
|
2013-10-02 07:47:05 -04:00
|
|
|
<
|
2013-03-10 05:17:53 -04:00
|
|
|
Don't activate the plugin for these filetypes and/or filenames.
|
2013-04-03 04:38:32 -04:00
|
|
|
|
2013-03-29 08:31:23 -04:00
|
|
|
NOTE: Filenames have to be absolute paths.
|
2013-03-10 05:17:53 -04:00
|
|
|
|
2013-06-22 09:11:25 -04:00
|
|
|
Default: Both are empty.
|
|
|
|
|
2013-10-02 07:47:05 -04:00
|
|
|
------------------------------------------------------------------------------
|
2014-09-11 10:48:22 -04:00
|
|
|
*g:signify_update_on_bufenter*
|
2013-10-02 07:47:05 -04:00
|
|
|
>
|
2013-06-06 06:39:24 -04:00
|
|
|
let g:signify_update_on_bufenter = 0
|
2013-10-02 07:47:05 -04:00
|
|
|
<
|
2013-06-06 06:39:24 -04:00
|
|
|
Update signs when entering a buffer that was modified.
|
2013-04-03 04:38:32 -04:00
|
|
|
|
2013-06-06 12:02:57 -04:00
|
|
|
NOTE: This also saves the buffer to disk!
|
|
|
|
|
2013-10-02 07:47:05 -04:00
|
|
|
------------------------------------------------------------------------------
|
2014-09-11 10:48:22 -04:00
|
|
|
*g:signify_update_on_focusgained*
|
2013-10-02 07:47:05 -04:00
|
|
|
>
|
2013-08-13 02:09:02 -04:00
|
|
|
let g:signify_update_on_focusgained = 0
|
2013-10-02 07:47:05 -04:00
|
|
|
<
|
2013-08-13 02:09:02 -04:00
|
|
|
Update signs when Vim gains focus.
|
|
|
|
|
2013-10-02 07:47:05 -04:00
|
|
|
------------------------------------------------------------------------------
|
2014-09-11 10:48:22 -04:00
|
|
|
*g:signify_line_highlight*
|
2013-10-02 07:47:05 -04:00
|
|
|
>
|
2013-06-22 09:11:25 -04:00
|
|
|
let g:signify_line_highlight = 0
|
2013-10-02 07:47:05 -04:00
|
|
|
<
|
2013-07-03 10:59:28 -04:00
|
|
|
Enable line highlighting in addition to using signs by default.
|
2013-04-18 00:55:53 -04:00
|
|
|
|
2013-10-02 07:47:05 -04:00
|
|
|
------------------------------------------------------------------------------
|
2014-09-11 10:48:22 -04:00
|
|
|
*g:signify_sign_delete_first_line*
|
|
|
|
*g:signify_sign_delete*
|
|
|
|
*g:signify_sign_change*
|
|
|
|
*g:signify_sign_add*
|
2013-10-02 07:47:05 -04:00
|
|
|
>
|
2013-03-11 20:14:48 -04:00
|
|
|
let g:signify_sign_add = '+'
|
2013-06-22 09:11:25 -04:00
|
|
|
let g:signify_sign_change = '!'
|
|
|
|
let g:signify_sign_delete = '_'
|
2013-03-11 20:14:48 -04:00
|
|
|
let g:signify_sign_delete_first_line = '‾'
|
2013-10-02 07:47:05 -04:00
|
|
|
<
|
2013-03-11 20:14:48 -04:00
|
|
|
The sign to use if a line was added, deleted or changed or a combination of
|
|
|
|
these.
|
2013-03-05 17:07:54 -05:00
|
|
|
|
2013-10-02 07:47:05 -04:00
|
|
|
------------------------------------------------------------------------------
|
2014-09-11 10:48:22 -04:00
|
|
|
*g:signify_cursorhold_normal*
|
|
|
|
*g:signify_cursorhold_insert*
|
2013-10-02 07:47:05 -04:00
|
|
|
>
|
2013-06-22 09:11:25 -04:00
|
|
|
let g:signify_cursorhold_normal = 0
|
|
|
|
let g:signify_cursorhold_insert = 0
|
2013-10-02 07:47:05 -04:00
|
|
|
<
|
2013-03-12 07:25:22 -04:00
|
|
|
Additionally trigger sign updates in normal or insert mode after 'updatetime'
|
|
|
|
miliseconds without any keypresses. This fires only once between keypresses,
|
|
|
|
thus not every 'updatetime' miliseconds.
|
|
|
|
|
2013-04-04 05:27:28 -04:00
|
|
|
NOTE: This also saves the buffer to disk!
|
2013-03-12 07:43:23 -04:00
|
|
|
|
2013-10-02 07:47:05 -04:00
|
|
|
------------------------------------------------------------------------------
|
2014-09-11 10:48:22 -04:00
|
|
|
*g:signify_difftool*
|
2013-10-02 07:47:05 -04:00
|
|
|
>
|
2013-06-06 19:01:30 -04:00
|
|
|
let g:signify_difftool = 'gnudiff'
|
2013-10-02 07:47:05 -04:00
|
|
|
<
|
2013-06-06 19:01:30 -04:00
|
|
|
This will avoid the attempt to find the proper diff tool for version control
|
|
|
|
systems that rely on an external diff tool that supports the -U0 flag. These
|
|
|
|
are: svn, bzr, darcs, fossil.
|
|
|
|
|
2013-10-02 07:47:05 -04:00
|
|
|
Default: "diff"
|
2013-08-07 06:57:02 -04:00
|
|
|
|
2013-10-02 07:47:05 -04:00
|
|
|
------------------------------------------------------------------------------
|
2014-09-11 10:48:22 -04:00
|
|
|
*g:signify_diffoptions*
|
2013-10-02 07:47:05 -04:00
|
|
|
>
|
2013-08-07 06:57:02 -04:00
|
|
|
let g:signify_diffoptions = { 'git': '-w', 'hg': '-w' }
|
2013-10-02 07:47:05 -04:00
|
|
|
<
|
2013-08-07 06:57:02 -04:00
|
|
|
This will pass the given additional options to the selected VCS diff command.
|
|
|
|
|
2013-08-07 09:46:37 -04:00
|
|
|
Default: Does not exist.
|
|
|
|
|
2013-03-05 17:07:54 -05:00
|
|
|
==============================================================================
|
2014-09-11 10:48:22 -04:00
|
|
|
COMMAND *signify-commands*
|
|
|
|
MAPPINGS *signify-mappings*
|
2013-10-02 07:47:05 -04:00
|
|
|
>
|
2013-03-05 17:07:54 -05:00
|
|
|
:SignifyToggle
|
2013-10-02 07:47:05 -04:00
|
|
|
<
|
2013-03-05 17:07:54 -05:00
|
|
|
Toggle the plugin for the current buffer only.
|
|
|
|
Default mapping: <leader>gt
|
|
|
|
|
2013-10-02 07:47:05 -04:00
|
|
|
------------------------------------------------------------------------------
|
|
|
|
>
|
2013-03-05 17:07:54 -05:00
|
|
|
:SignifyToggleHighlight
|
2013-10-02 07:47:05 -04:00
|
|
|
<
|
2013-03-05 17:07:54 -05:00
|
|
|
Toggle line highlighting for lines containing changes.
|
|
|
|
Default mapping: <leader>gh
|
|
|
|
|
2014-10-05 17:58:59 -04:00
|
|
|
==============================================================================
|
|
|
|
OBJECTS *signify-objects*
|
|
|
|
|
|
|
|
Sy also provides text objects that operate on the current hunk:
|
|
|
|
>
|
|
|
|
ic
|
|
|
|
>
|
|
|
|
Operate on all the lines of the current hunk.
|
|
|
|
>
|
|
|
|
ac
|
|
|
|
<
|
|
|
|
Does the same as ic and also removes all trailing empty lines.
|
|
|
|
|
|
|
|
NOTE: Don't be surprised that this also works with "deleted lines".
|
|
|
|
|
2013-03-05 17:07:54 -05:00
|
|
|
==============================================================================
|
2014-09-11 10:48:22 -04:00
|
|
|
COLORS *signify-colors*
|
2013-07-03 10:59:28 -04:00
|
|
|
|
|
|
|
This plugin defines highlighting groups for two different places: for lines
|
|
|
|
and signs. Per default these don't really exist but are linked to the standard
|
|
|
|
highlighting groups: DiffAdd, DiffChange, DiffDelete:
|
2013-10-02 07:47:05 -04:00
|
|
|
>
|
2013-07-03 10:59:28 -04:00
|
|
|
highlight link SignifyLineAdd DiffAdd
|
|
|
|
highlight link SignifyLineChange DiffChange
|
|
|
|
highlight link SignifyLineDelete DiffDelete
|
|
|
|
|
|
|
|
highlight link SignifySignAdd DiffAdd
|
|
|
|
highlight link SignifySignChange DiffChange
|
|
|
|
highlight link SignifySignDelete DiffDelete
|
2013-10-02 07:47:05 -04:00
|
|
|
<
|
2013-07-03 10:59:28 -04:00
|
|
|
Thus if you do not want to change the standard highlighting groups, but want
|
|
|
|
different colors for either your signs or lines, you can define one of these 6
|
|
|
|
Signify groups yourself in your vimrc.
|
|
|
|
|
|
|
|
Personally I use (256 colors terminal):
|
2013-10-02 07:47:05 -04:00
|
|
|
>
|
2013-07-03 10:59:28 -04:00
|
|
|
" highlight lines in Sy and vimdiff etc.)
|
|
|
|
|
|
|
|
highlight DiffAdd cterm=bold ctermbg=none ctermfg=119
|
|
|
|
highlight DiffDelete cterm=bold ctermbg=none ctermfg=167
|
|
|
|
highlight DiffChange cterm=bold ctermbg=none ctermfg=227
|
|
|
|
|
|
|
|
" highlight signs in Sy
|
|
|
|
|
|
|
|
highlight SignifySignAdd cterm=bold ctermbg=237 ctermfg=119
|
|
|
|
highlight SignifySignDelete cterm=bold ctermbg=237 ctermfg=167
|
|
|
|
highlight SignifySignChange cterm=bold ctermbg=237 ctermfg=227
|
2013-10-02 07:47:05 -04:00
|
|
|
<
|
2013-07-03 11:23:38 -04:00
|
|
|
For Unix people there is a small script, showcolors.bash, in the repo that
|
|
|
|
shows all 256 colors available to the terminal. That makes picking the right
|
|
|
|
numbers much easier.
|
2013-07-03 10:59:28 -04:00
|
|
|
|
2013-03-05 17:07:54 -05:00
|
|
|
==============================================================================
|
|
|
|
vim: tw=78
|