-
Notifications
You must be signed in to change notification settings - Fork 0
/
vcs-info.txt
82 lines (63 loc) · 2.15 KB
/
vcs-info.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
*vcs-info.txt* Retrieve VCS information
Author: Akinori Hattori <[email protected]>
Repository: https://github.com/hattya/vcs-info.vim
Last Change: 2022-11-06
License: MIT License
CONTENTS *vcs-info-contents*
Introduction |vcs-info-introduction|
Usage |vcs-info-usage|
Interface |vcs-info-interface|
Variables |vcs-info-variables|
Functions |vcs-info-functions|
==============================================================================
INTRODUCTION *vcs-info-introduction*
*vcs-info.vim* is a Vim plugin to retrieve VCS information of the working
directory where the currently edited file exists. It is inspired by Zsh's
vcs_info.
Supported VCS:~
Bazaar
Breezy
CVS
Darcs
Fossil
Git
Mercurial
Subversion
==============================================================================
USAGE *vcs-info-usage*
|vcs-info.vim| automatically detects a VCS when editing a file, so you can
retrieve VCS information by calling |vcs_info#get()| like:
>
let info = vcs_info#get()
if !empty(info)
let s = info.head
if info.action !=# ''
let s .= ':' . info.action
endif
endif
==============================================================================
INTERFACE *vcs-info-interface*
------------------------------------------------------------------------------
VARIABLES *vcs-info-variables*
g:vcs_info_abbr *g:vcs_info_abbr*
b:vcs_info_abbr *b:vcs_info_abbr*
The length of a revision number.
The default value is 7.
------------------------------------------------------------------------------
FUNCTIONS *vcs-info-functions*
vcs_info#get() *vcs_info#get()*
Returns VCS information as a |Dictionary| which contains the
following items. It is empty if no working directory found.
"vcs"
The VCS in use.
"root"
The root of the current working directory.
"dir"
The control directory of the VCS.
"head"
A branch name, tag name, or revision number.
"action"
An identifier which represents what is going on in the current
working directory; like an interactive rebase.
==============================================================================
vim:tw=78:ts=8:ft=help:norl:noet