Skip to content

Commit 4a7f4e8

Browse files
committed
Show total number of notes in [Tagged Notes] buffer
1 parent 0d5505e commit 4a7f4e8

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

autoload/xolox/notes.vim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
" Note: This file is encoded in UTF-8 including a byte order mark so
77
" that Vim loads the script using the right encoding transparently.
88

9-
let g:xolox#notes#version = '0.12.7'
9+
let g:xolox#notes#version = '0.12.8'
1010

1111
function! xolox#notes#shortcut() " {{{1
1212
" The "note:" pseudo protocol is just a shortcut for the :Note command.

autoload/xolox/notes/tags.vim

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,7 @@ function! xolox#notes#tags#show_tags(minsize) " {{{1
123123
for title in xolox#notes#get_titles(0)
124124
let unmatched[title] = 1
125125
endfor
126+
let totalnotes = len(unmatched)
126127
" Group matching notes and remove them from the dictionary.
127128
let grouped_notes = []
128129
let numtags = 0
@@ -158,8 +159,9 @@ function! xolox#notes#tags#show_tags(minsize) " {{{1
158159
endif
159160
endfor
160161
if a:minsize <= 1
161-
let message = printf("You've used %i %s in your notes",
162-
\ numtags, numtags == 1 ? "tag" : "tags")
162+
let message = printf("You've used %i %s in %i %s",
163+
\ numtags, numtags == 1 ? "tag" : "tags",
164+
\ totalnotes, totalnotes == 1 ? "note" : "notes")
163165
else
164166
let message = printf("There %s %i %s that %s been used at least %s times",
165167
\ numtags == 1 ? "is" : "are", numtags,

0 commit comments

Comments
 (0)