• Stars
    star
    106
  • Rank 325,871 (Top 7 %)
  • Language
    Vim Script
  • Created over 14 years ago
  • Updated over 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A Vim Plugin for indicating changes as colored bars using signs.

Changes plugin Say Thanks!

A Vim plugin for displaying changes in a buffer

This plugin was written to help visualize which lines have been changed since editing started for a file. The plugin was inspired by so called changed-bars, available in other editors, such as Embarcadero C++ Builder (there it is called Change Bars or Visual Studio where it is called indicator margin.

ChangesPlugin.vim uses the diff feature of vim and compares the actual buffer with its saved state (or possibly against a state in a VCS repository). It displays signs in the signcolumn to indicate any changes, with optional line highlighting.

See also the following screencast showing several of the features available: screencast of the plugin

Note, that a '-' indicates that at least one line was deleted between that particular line and the following line.

Features:

  • Shows signs for added, modified, and deleted lines
  • Quick jumping between changed blocks ("hunks")
  • Tries to update signs as fast as possible
  • Optional line highlighting
  • Customisable
  • Many different Commands (fold all non changed lines, show changed lines in Quickfix window, opens a diff split...)
  • Preserves signs from other plugins
  • Built-in integration with vim-airline
  • Good documentation
  • Quick response
  • Nice icons for gvim
  • Uses Vim 8's async feature for parsing the diff

Why another git-gutter/vim-signify clone?

To be fair, there were a lot of other vim plugins that offered the same functionality as those two. They just didn't get the same attention as those two. ChangesPlugin was one of those plugins.

Installation

Vim 8 comes with package support. Simply clone it into your packpath like this:

cd ~/.vim/pack/custom/start/
git clone https://github.com/chrisbra/changesPlugin.git

(Remember to run :helptags ALL after restarting Vim to regenerate the help files)

Other installation methods:

Plugin Manager Install with...
Pathogen git clone https://github.com/chrisbra/changesPlugin ~/.vim/bundle/changesPlugin
Remember to run :Helptags to generate help tags
NeoBundle NeoBundle 'chrisbra/changesPlugin'
Vundle Plugin 'chrisbra/changesPlugin'
Plug Plug 'chrisbra/changesPlugin'
VAM call vam#ActivateAddons([ 'changesPlugin' ])
Dein call dein#add('chrisbra/changesPlugin')
minpac call minpac#add('chrisbra/changesPlugin')
manual copy all of the directories into your ~/.vim directory (preserve existing directories)

Other package managers work similarly, please refer to their documentation.

Usage

Once installed, take a look at the help at :h ChangesPlugin

Here is a short overview of the functionality provided by the plugin:

Ex commands:

:EC  - Activate the plugin (display indicators of changes for the current buffer)
:DC  - Disable the plugin
:TCV - Toggle the plugin
:CC  - Show a small help window
:CL  - Open the Quickfix window with all changes for the current buffer
:CD  - Open a diff view for the current buffer
:CF  - Fold away all non-changed lines
:CT  - Toggle how the highlighting is displayed

Mappings

]h   - Moves forward to the next changed line
[h   - Moves backwards to the previous changed line
ah   - Selects the current hunk (TextObject)
<Leader>h - Stage the hunk that the cursor is on (works only for git)

Configuration

g:changes_autocmd (default: 1) - update the signs automatically using InsertLeave and TextChanged autocommands.

g:changes_vcs_check (default: 0)

g:changes_vcs_system (default: '') - Check against a version in a repository (e.g. git/mercurial) and specify VCS to use (if not specified, will try to autodetect).

g:changes_diff_preview (default: 0) - Display diff in the preview window

g:changes_respect_SignColumn (default 0) - If set, will use the SignColumn Highlighting group, else uses the Normal Highlighting group

g:changes_sign_text_utf8 (default 1) - If set, will display nice little utf-8 signs.

g:changes_linehi_diff (default: 0) - If set, will overlay the text with highlighting for the difference in the line.

g:changes_use_icons (default: 1) - If set, will display graphical icons if support is available.

g:changes_add_sign (default: '+') - If set, will display custom sign

g:changes_delete_sign (default: '-') - If set, will display custom sign

g:changes_modified_sign (default: '*') - If set, will display custom sign

g:changes_utf8_add_sign (default 'โž•') - If set, will display nice little utf-8 plus signs.

g:changes_utf8_delete_sign (default 'โž–') - If set, will display nice little utf-8 minus signs.

g:changes_utf8_modifed_sign (default 'โ˜…') - If set, will display nice little utf-8 star signs.

Similar Work

vim-gitgutter Only works for git.

vim-signify Supports several VCS, only updates the sign on write.

License & Copyright

ยฉ 2009-2014 by Christian Brabandt. The Vim License applies. See :h license

NO WARRANTY, EXPRESS OR IMPLIED. USE AT-YOUR-OWN-RISK

More Repositories

1

csv.vim

A Filetype plugin for csv files
Vim Script
1,266
star
2

NrrwRgn

A Narrow Region Plugin for vim (like Emacs Narrow Region)
Vim Script
673
star
3

Colorizer

color hex codes and color names
Vim Script
544
star
4

unicode.vim

A Vim plugin that provides a completion function for Unicode glyphs
Vim Script
451
star
5

vim-diff-enhanced

Better Diff options for Vim
Vim Script
357
star
6

Recover.vim

A Plugin to show a diff, whenever recovering a buffer
Vim Script
246
star
7

vim_faq

The Vim FAQ from http://vimdoc.sourceforge.net/ (outdated), updates available at:
HTML
144
star
8

SudoEdit.vim

Edit Files using sudo or su or any other tool
Vim Script
64
star
9

matchit

The matchit plugin from Vim
Vim Script
61
star
10

vim-zsh

Official Vim Runtime Files for Zsh
Vim Script
41
star
11

improvedft

An improved ft command for Vim
Vim Script
39
star
12

vim-autosave

autosave your work
Vim Script
38
star
13

histwin.vim

A Vim Plugin for browsing the undo tree
Visual Basic
38
star
14

vim-autoread

Use tail -f on a buffer and append new content
Vim Script
36
star
15

wikipedia2text

A commandline tool for querying the Wikipedia
Shell
32
star
16

Replay

A plugin for vim that enables you to replay your editing Session
Vim Script
32
star
17

DynamicSigns

Using Signs for displaying various things
Vim Script
31
star
18

CheckAttach

Check for attachments when writing mails with mutt
Vim Script
28
star
19

vpager

Pipe input from Vims terminal directly back into Vim
Shell
25
star
20

vim-mq-patches

private MQ Patches for Vim
C
23
star
21

vim_dotfiles

my personal vim config
Vim Script
18
star
22

DistractFree

DistractFree
Vim Script
17
star
23

vim-sh-indent

Vim Shell Indent Repository
Shell
15
star
24

vim-show-char

Vim Plugin for displaying whitespace
Vim Script
14
star
25

vim-xml-runtime

Vim filetype plugin for XML files
Vim Script
11
star
26

BufTimer

Time your editing duration
Vim Script
10
star
27

youtube2audio

A downloader that converts youtube videos into music using mplayer and clive/youtube-dl
Shell
6
star
28

mutt

official Mutt Mirror from gitlab https://gitlab.com/muttmua/mutt/
C
6
star
29

vim-commentary

Comment some stuff
Vim Script
4
star
30

vim-appimage

Appimage builds for GVim
Shell
4
star
31

vim-history

C
4
star
32

BackgroundColor.vim

A Simple Plugin for Defining A Background Color for your Vim using Signs
Vim Script
4
star
33

SaveSigns.vim

A Vim Plugin to Save and Restore your Signs
Vim Script
4
star
34

vim-sqloracle-syntax

Oracle SQL Syntax files for Vim
Vim Script
3
star
35

Join

Improved algorithm for joining large files
Vim Script
3
star
36

chrisbra

3
star
37

vim-rc-syntax

Vim RC Syntax files
Vim Script
2
star
38

zugferd

a sample repository on how to create ZUGFeRD pdf files
XSLT
2
star
39

vim-kconfig

kconfig runtime files for Vim
Vim Script
2
star
40

chrisbra.github.com

Personal Webpage
2
star
41

vim-misc

miscellaneous Vim functions
Vim Script
2
star
42

ftpbackup

A simple backup for your ftp-share
Perl
2
star
43

Calendar_CSV_DACH

Create a Calendar in CSV format for Germany, Austria, Switzerland
Perl
2
star
44

xmlformat

A Vim plugin for formatting XML files
Vim Script
2
star
45

vim-PowerCenter-syntax

syntax file for Informatica PowerCenter Logfiles
Vim Script
1
star
46

vim-ci

1
star
47

vim-tex-indent

official Vim indent file for tex
Vim Script
1
star
48

git-omni-deployment

A tool for a slightly better deployment experience when using IBIs Omni-Gen
Shell
1
star
49

vimcrypt

Encode/Decode Vims Sodium encryption
C
1
star
50

Terraform_Test

HCL
1
star
51

vim-screencasts

Some Screencasts
1
star
52

CleverPut

pasting easily (and adjust Whitespace)
Vim Script
1
star
53

ci_configuration

testing some boring ci config stuff. Nothing to see here.
1
star
54

ism_ci

Make iSM/iIT demo for CI
Shell
1
star
55

putty

PuTTY SSH and Telnet client with TrueColor patch
C
1
star
56

vim-search_escape

Convert regexp patterns
Vim Script
1
star