Permalink
Browse files

Show total number of notes in [Tagged Notes] buffer

  • Loading branch information...
1 parent 0d5505e commit 4a7f4e823e14417bb01568bd94358f45da39ea33 @xolox committed Nov 3, 2011
Showing with 5 additions and 3 deletions.
  1. +1 −1 autoload/xolox/notes.vim
  2. +4 −2 autoload/xolox/notes/tags.vim
View
@@ -6,7 +6,7 @@
" Note: This file is encoded in UTF-8 including a byte order mark so
" that Vim loads the script using the right encoding transparently.
-let g:xolox#notes#version = '0.12.7'
+let g:xolox#notes#version = '0.12.8'
function! xolox#notes#shortcut() " {{{1
" The "note:" pseudo protocol is just a shortcut for the :Note command.
@@ -123,6 +123,7 @@ function! xolox#notes#tags#show_tags(minsize) " {{{1
for title in xolox#notes#get_titles(0)
let unmatched[title] = 1
endfor
+ let totalnotes = len(unmatched)
" Group matching notes and remove them from the dictionary.
let grouped_notes = []
let numtags = 0
@@ -158,8 +159,9 @@ function! xolox#notes#tags#show_tags(minsize) " {{{1
endif
endfor
if a:minsize <= 1
- let message = printf("You've used %i %s in your notes",
- \ numtags, numtags == 1 ? "tag" : "tags")
+ let message = printf("You've used %i %s in %i %s",
+ \ numtags, numtags == 1 ? "tag" : "tags",
+ \ totalnotes, totalnotes == 1 ? "note" : "notes")
else
let message = printf("There %s %i %s that %s been used at least %s times",
\ numtags == 1 ? "is" : "are", numtags,

0 comments on commit 4a7f4e8

Please sign in to comment.