Skip to content

Commit f109c3d

Browse files
committed
Update content in README
1 parent bdbe113 commit f109c3d

File tree

1 file changed

+88
-0
lines changed

1 file changed

+88
-0
lines changed

README.md

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
![GTM Logo](https://raw.githubusercontent.com/git-time-metric/gtm-atom-plugin/master/lib/GTMLogo-128.png)
12
# Vim Git Time Metrics (GTM) plug-in
23
### Simple, seamless, lightweight time tracking for all your git projects
34

@@ -13,3 +14,90 @@ Installing GTM is a two step process. First, it's recommended you install the G
1314
- **NeoBundle** `NeoBundle 'git-time-metric/gtm-vim-plugin'`
1415
- **Vundle** `Plugin 'git-time-metric/gtm-vim-plugin'`
1516
- **Pathogen** `git clone https://github.com/git-time-metric/gtm ~/.vim/bundle/gtm`
17+
18+
# Features
19+
20+
### Status Bar
21+
22+
In the status bar see your total time spent for in-process work (uncommitted).
23+
24+
![](https://cloud.githubusercontent.com/assets/630550/16716726/7d8f60c6-46ca-11e6-957b-cdd987466d9d.png)
25+
26+
By default this feature is off, to enable set `g:gtm_plugin_status_enabled` in your `.vimrc`.
27+
28+
```
29+
let g:gtm_plugin_status_enabled = 1
30+
```
31+
32+
Here's an example of diplaying time spent within Vim's status line.
33+
34+
```
35+
set statusline=%{exists('*GTMStatusline')?'['.GTMStatusline().']':''}\ %<%f\ %h%m%r%=%-14.(%l,%c%V%)\ %P
36+
```
37+
38+
If you have the [Vim Airline plug-in](https://github.com/vim-airline/vim-airline) loaded, here's an example for adding it to the status line.
39+
```
40+
function! AirlineInit()
41+
if exists('*GTMStatusline')
42+
call airline#parts#define_function('gtmstatus', 'GTMStatusline')
43+
let g:airline_section_b = airline#section#create([g:airline_section_b, ' ', '[', 'gtmstatus', ']'])
44+
endif
45+
endfunction
46+
autocmd User AirlineAfterInit call AirlineInit()
47+
```
48+
49+
*Note* - the time shown is based on the file's path and the Git repository it belongs to. You can have several files open that belong to different Git repositories. The status bar will display the time for the current file's Git repository. Also keep in mind, a Git repository must be initialized for time tracking in order to track time.
50+
51+
Consult the [README](https://github.com/git-time-metric/gtm/blob/master/README.md) and [Wiki](https://github.com/git-time-metric/gtm/wiki) for more information.
52+
53+
### Command Line Inteface
54+
55+
Use the command line to report on time logged for your commits.
56+
57+
Here are some examples of insights GTM can provide you.
58+
59+
**Git commits with time spent**
60+
```
61+
> gtm report -total-only -n 3
62+
63+
9361c18 Rename packages
64+
Sun Jun 19 09:56:40 2016 -0500 Michael Schenk 34m 30s
65+
66+
341bd77 Vagrant file for testing on Linux
67+
Sun Jun 19 09:43:47 2016 -0500 Michael Schenk 1h 16m 0s
68+
69+
792ba19 Require a 40 char SHA commit hash
70+
Thu Jun 16 22:28:45 2016 -0500 Michael Schenk 1h 1m 0s
71+
```
72+
73+
**Git commits with detailed time spent by file**
74+
```
75+
> gtm report
76+
77+
b2d16c8 Refactor discovering of paths when recording events
78+
Thu Jun 16 11:08:47 2016 -0500 Michael Schenk
79+
80+
30m 18s [m] event/event.go
81+
12m 31s [m] event/manager.go
82+
3m 14s [m] project/project.go
83+
1m 12s [r] .git/COMMIT_EDITMSG
84+
1m 0s [r] .git/index
85+
25s [r] event/manager_test.go
86+
20s [r] metric/manager.go
87+
49m 0s
88+
```
89+
90+
**Timeline of time spent by day**
91+
```
92+
> gtm report --format timeline -n 3
93+
94+
0123456789012345678901234
95+
Fri Jun 24 * 22m 0s
96+
Sat Jun 25 ** 1h 28m 0s
97+
Sun Jun 26 **** 3h 28m 0s
98+
Mon Jun 27 * 4m 0s
99+
Tue Jun 28 ** 1h 36m 0s
100+
6h 58m 0s
101+
```
102+
103+
Consult the [README](https://github.com/git-time-metric/gtm/blob/master/README.md) and [Wiki](https://github.com/git-time-metric/gtm/wiki) for more information.

0 commit comments

Comments
 (0)