2013-03-28 05:25:24 -04:00
|
|
|
vim-signify
|
|
|
|
-----------
|
2013-03-05 14:07:37 -05:00
|
|
|
|
2013-07-09 01:04:25 -04:00
|
|
|
Or just: __Sy__.
|
2013-03-06 17:40:57 -05:00
|
|
|
|
2013-03-10 06:29:19 -04:00
|
|
|
Sy shows all added, deleted and modified lines since the last commit via Vim its
|
2013-03-15 08:52:57 -04:00
|
|
|
sign column. It __supports several version control systems__.
|
2013-03-05 18:30:30 -05:00
|
|
|
|
2013-03-15 08:52:57 -04:00
|
|
|
It's __fast__, __highly configurable__ and __well documented__.
|
2013-03-05 14:07:37 -05:00
|
|
|
|
|
|
|
Features:
|
|
|
|
|
2013-07-29 19:27:05 -04:00
|
|
|
- supports git, mercurial, darcs, bazaar, subversion, cvs, rcs, fossil, accurev,
|
|
|
|
perforce
|
2013-07-09 01:28:03 -04:00
|
|
|
- quick jumping between blocks of changed lines
|
2013-03-05 14:12:24 -05:00
|
|
|
- apart from signs there is also optional line highlighting
|
2013-03-12 10:05:09 -04:00
|
|
|
- fully configurable through global variables (options and mappings)
|
2013-03-07 06:56:25 -05:00
|
|
|
- optional preserving of signs from other plugins
|
|
|
|
- you can toggle the plugin per buffer
|
2013-03-26 05:34:29 -04:00
|
|
|
- skip certain filetypes and filenames
|
2013-03-05 14:07:37 -05:00
|
|
|
- good documentation
|
|
|
|
|
2013-03-05 14:12:24 -05:00
|
|
|
- quick developer response! :-)
|
2013-03-05 14:07:37 -05:00
|
|
|
|
2013-06-07 13:54:50 -04:00
|
|
|
![Example:signify in action](https://github.com/mhinz/vim-signify/raw/master/signify.gif)
|
2013-03-07 07:29:54 -05:00
|
|
|
|
2013-03-15 08:52:57 -04:00
|
|
|
Limits exist only in your mind!
|
|
|
|
|
2013-03-28 05:25:24 -04:00
|
|
|
Feedback, please!
|
|
|
|
-----------------
|
2013-03-15 08:52:57 -04:00
|
|
|
|
|
|
|
If you use any of my plugins, star it on github. This is a great way of getting
|
|
|
|
feedback! Same for issues or feature requests.
|
|
|
|
|
|
|
|
Thank you for flying mhi airlines. Get the Vim on!
|
2013-03-05 14:07:37 -05:00
|
|
|
|
2013-07-22 14:39:35 -04:00
|
|
|
You can also follow me on Twitter: [@_mhinz_](https://twitter.com/_mhinz_)
|
|
|
|
|
2013-03-28 05:25:24 -04:00
|
|
|
What about vim-gitgutter?
|
|
|
|
-------------------------
|
2013-03-14 07:51:19 -04:00
|
|
|
|
|
|
|
To be honest, I don't understand why people always compare plugins like Sy to
|
|
|
|
vim-gitgutter. I understand that it is by far the most known one, but primarily
|
|
|
|
because it was featured on the Hacker News frontpage.
|
|
|
|
|
|
|
|
Don't get me wrong, I don't intend to badmouth gitgutter, I even contributed to
|
|
|
|
it once. (Granted, it was only a small fix.) And I'm glad about everyone
|
|
|
|
contributing to the Vim community, but there are two important facts one should
|
|
|
|
consider:
|
|
|
|
|
|
|
|
1. There were other plugins providing the same functionality as gitgutter years
|
|
|
|
before its creation.
|
|
|
|
|
|
|
|
1. Sy provides a superset of gitgutter.
|
|
|
|
|
|
|
|
So here is the short answer: The main difference is Sy its support for version
|
|
|
|
control systems other than git. Moreover, two of its design goals are speed and
|
|
|
|
high configurability.
|
|
|
|
|
2013-03-28 05:25:24 -04:00
|
|
|
Sign explanation
|
|
|
|
----------------
|
2013-03-14 06:13:25 -04:00
|
|
|
|
2013-03-22 14:00:05 -04:00
|
|
|
`+`
|
2013-03-14 06:13:25 -04:00
|
|
|
|
2013-07-09 01:04:25 -04:00
|
|
|
This indicates a new line.
|
2013-03-14 06:13:25 -04:00
|
|
|
|
2013-06-07 05:37:21 -04:00
|
|
|
`_1`
|
2013-03-14 06:13:25 -04:00
|
|
|
|
2013-07-09 01:04:25 -04:00
|
|
|
This indicates the number of deleted lines. If the number is larger than 9, a
|
|
|
|
`>` will be shown instead.
|
2013-03-14 06:13:25 -04:00
|
|
|
|
2013-03-22 14:00:05 -04:00
|
|
|
`!`
|
2013-03-14 06:13:25 -04:00
|
|
|
|
2013-07-09 01:04:25 -04:00
|
|
|
This indicates a changed line.
|
2013-03-14 06:13:25 -04:00
|
|
|
|
2013-07-08 06:06:54 -04:00
|
|
|
`!1`
|
2013-03-14 06:13:25 -04:00
|
|
|
|
2013-07-09 01:04:25 -04:00
|
|
|
This indicates a changed line and a number of lines below that were deleted. It
|
|
|
|
is a combination of `!` and `_`. If the number is larger than 9, a `>` will be
|
|
|
|
shown instead.
|
2013-04-12 05:56:23 -04:00
|
|
|
|
|
|
|
`‾`
|
|
|
|
|
2013-07-09 01:04:25 -04:00
|
|
|
This is used instead of `_` in the special case of the first line being removed.
|
2013-04-12 05:56:23 -04:00
|
|
|
|
2013-03-28 05:25:24 -04:00
|
|
|
Longer introduction
|
|
|
|
-------------------
|
2013-03-12 10:05:09 -04:00
|
|
|
|
2013-03-15 08:08:56 -04:00
|
|
|
#### supports several version control systems
|
2013-03-12 10:05:09 -04:00
|
|
|
|
|
|
|
This plugin is based on the diffing features of the supported version control
|
|
|
|
systems. Since not all VCS support the same options, sometimes we have to fall
|
|
|
|
back to the 'diff' executable.
|
|
|
|
|
2013-04-19 17:18:26 -04:00
|
|
|
Currently the following VCS are supported:
|
2013-03-12 10:05:09 -04:00
|
|
|
|
|
|
|
- git
|
|
|
|
- mercurial (hg)
|
|
|
|
- bazaar (bzr)
|
|
|
|
- darcs
|
|
|
|
- subversion (svn)
|
|
|
|
- cvs
|
2013-03-15 08:08:56 -04:00
|
|
|
- rcs
|
2013-04-16 05:37:57 -04:00
|
|
|
- fossil
|
2013-07-10 17:12:13 -04:00
|
|
|
- accurev
|
2013-07-29 19:27:05 -04:00
|
|
|
- perforce
|
2013-03-12 10:05:09 -04:00
|
|
|
|
2013-03-12 10:08:27 -04:00
|
|
|
#### quick jumping between changed lines
|
2013-03-12 10:05:09 -04:00
|
|
|
|
2013-07-04 05:52:28 -04:00
|
|
|
There are mappings for jumping forth and back between blocks of changes
|
|
|
|
(so-called hunks). The following example shows the default mappings and how to
|
|
|
|
change them:
|
2013-03-12 10:05:09 -04:00
|
|
|
|
2013-03-21 10:04:08 -04:00
|
|
|
```vim
|
|
|
|
let g:signify_mapping_next_hunk = '<leader>gj'
|
|
|
|
let g:signify_mapping_prev_hunk = '<leader>gk'
|
|
|
|
```
|
2013-03-12 10:05:09 -04:00
|
|
|
|
|
|
|
Note: In case you don't know about the mapleader, have a look at `:h mapleader`.
|
|
|
|
The default is the '\' button.
|
|
|
|
|
2013-03-26 13:51:49 -04:00
|
|
|
Following Vim conventions you can also use __]c__ and __[c__.
|
2013-03-26 09:25:45 -04:00
|
|
|
|
2013-03-12 10:08:27 -04:00
|
|
|
#### apart from signs there is also optional line highlighting
|
2013-03-12 10:05:09 -04:00
|
|
|
|
|
|
|
Sy shows you signs for changed lines. Moveover, you can enable highlighting of
|
|
|
|
the concerned lines:
|
|
|
|
|
2013-03-21 10:04:08 -04:00
|
|
|
```vim
|
|
|
|
let g:signify_mapping_toggle_highlight = '<leader>gh'
|
|
|
|
```
|
2013-03-12 10:05:09 -04:00
|
|
|
|
2013-03-12 10:08:27 -04:00
|
|
|
#### you can toggle the plugin per buffer
|
2013-03-12 10:05:09 -04:00
|
|
|
|
|
|
|
In case you want to disable the plugin for the current buffer, you can toggle
|
|
|
|
it:
|
|
|
|
|
2013-03-21 10:04:08 -04:00
|
|
|
```vim
|
|
|
|
let g:signify_mapping_toggle = '<leader>gt'
|
|
|
|
```
|
2013-03-12 10:05:09 -04:00
|
|
|
|
2013-03-26 05:34:29 -04:00
|
|
|
#### skip certain filetypes and filenames
|
2013-03-12 10:05:09 -04:00
|
|
|
|
|
|
|
If you want to disable Sy for certain kinds of filename or file types,
|
2013-03-26 05:34:29 -04:00
|
|
|
you explicitely have to create "skip dicts":
|
2013-03-12 10:05:09 -04:00
|
|
|
|
|
|
|
Example:
|
|
|
|
|
2013-03-21 10:04:08 -04:00
|
|
|
```vim
|
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-03-21 10:04:08 -04:00
|
|
|
```
|
2013-03-12 10:05:09 -04:00
|
|
|
|
2013-03-29 08:31:23 -04:00
|
|
|
__NOTE__: Filenames have to be absolute paths!
|
|
|
|
|
2013-03-12 10:08:27 -04:00
|
|
|
#### good documentation
|
2013-03-12 10:05:09 -04:00
|
|
|
|
|
|
|
You should know by now!
|
|
|
|
|
2013-03-28 05:25:24 -04:00
|
|
|
Installation
|
|
|
|
------------
|
2013-03-05 14:07:37 -05:00
|
|
|
|
2013-03-29 08:23:49 -04:00
|
|
|
If you have no preferred installation method, I suggest using tpope's pathogen:
|
2013-03-06 07:51:23 -05:00
|
|
|
|
2013-03-29 08:23:49 -04:00
|
|
|
1. git clone https://github.com/tpope/vim-pathogen ~/.vim/bundle/vim-pathogen
|
|
|
|
1. mkdir -p ~/.vim/autoload && cd ~/.vim/autoload
|
|
|
|
1. ln -s ../bundle/vim-pathogen/autoload/pathogen.vim
|
2013-03-06 07:51:23 -05:00
|
|
|
|
2013-03-29 08:23:49 -04:00
|
|
|
Afterwards installing Sy is as easy as pie:
|
|
|
|
|
|
|
|
2. git clone https://github.com/mhinz/vim-signify ~/.vim/bundle/vim-signify
|
|
|
|
2. start Vim
|
|
|
|
2. :Helptags
|
|
|
|
2. :h signify
|
2013-03-05 14:07:37 -05:00
|
|
|
|
2013-03-28 05:25:24 -04:00
|
|
|
Documentation
|
|
|
|
-------------
|
2013-03-05 14:07:37 -05:00
|
|
|
|
|
|
|
`:h signify`
|
|
|
|
|
2013-03-28 05:25:24 -04:00
|
|
|
Configuration
|
|
|
|
-------------
|
2013-03-07 07:55:18 -05:00
|
|
|
|
2013-06-22 09:17:39 -04:00
|
|
|
__NOTE__: The shown assignments are only examples. You can find the default
|
|
|
|
values in the help.
|
|
|
|
|
2013-03-07 07:55:18 -05:00
|
|
|
For more info: `:h signify-options`
|
|
|
|
|
2013-03-25 10:46:12 -04:00
|
|
|
|
2013-03-21 10:04:08 -04:00
|
|
|
```vim
|
2013-03-25 11:12:31 -04:00
|
|
|
let g:signify_vcs_list = [ 'git', 'hg' ]
|
|
|
|
|
2013-06-07 02:56:47 -04:00
|
|
|
let g:signify_difftool = 'gnudiff'
|
|
|
|
|
2013-03-26 13:44:11 -04:00
|
|
|
let g:signify_mapping_next_hunk = '<leader>gj'
|
|
|
|
let g:signify_mapping_prev_hunk = '<leader>gk'
|
2013-03-07 07:55:18 -05:00
|
|
|
|
2013-03-21 10:04:08 -04:00
|
|
|
let g:signify_mapping_toggle_highlight = '<leader>gh'
|
|
|
|
let g:signify_mapping_toggle = '<leader>gt'
|
2013-03-07 07:55:18 -05: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-03-10 05:59:52 -04:00
|
|
|
|
2013-03-21 10:04:08 -04:00
|
|
|
let g:signify_sign_overwrite = 1
|
2013-03-10 05:59:52 -04:00
|
|
|
|
2013-04-03 04:38:32 -04:00
|
|
|
let g:signify_update_on_bufenter = 1
|
2013-08-13 02:09:02 -04:00
|
|
|
let g:signify_update_on_focusgained = 0
|
2013-04-03 04:38:32 -04:00
|
|
|
|
2013-04-04 05:14:07 -04:00
|
|
|
let g:signify_line_highlight = 1
|
|
|
|
|
2013-03-21 10:04:08 -04:00
|
|
|
let g:signify_sign_add = '+'
|
2013-07-08 06:19:34 -04:00
|
|
|
let g:signify_sign_change = '!'
|
|
|
|
let g:signify_sign_delete = '_'
|
2013-03-21 10:04:08 -04:00
|
|
|
let g:signify_sign_delete_first_line = '‾'
|
2013-03-07 07:55:18 -05:00
|
|
|
|
2013-03-21 10:04:08 -04:00
|
|
|
let g:signify_cursorhold_normal = 1
|
|
|
|
let g:signify_cursorhold_insert = 1
|
|
|
|
```
|
2013-03-12 07:25:22 -04:00
|
|
|
|
2013-03-28 05:25:24 -04:00
|
|
|
Author
|
|
|
|
------
|
2013-03-05 14:07:37 -05:00
|
|
|
|
|
|
|
Marco Hinz `<mh.codebro@gmail.com>`
|
|
|
|
|
2013-03-28 05:25:24 -04:00
|
|
|
License
|
|
|
|
-------
|
2013-03-05 14:07:37 -05:00
|
|
|
|
2013-08-02 06:43:22 -04:00
|
|
|
MIT license. Copyright (c) 2013 Marco Hinz.
|