← Back to Upcase

Track your Vim usuage

(David Pedersen) #1

I’m like Ben Orenstein in the sense that I also have a ton of leader commands that I use all the time and I’ve had this idea for a plugin for some time now

I think it would really interesting to be able to somehow track which of the leader commands are being used, when they were used, how often etc.

I started hacking together a small plugin a while ago but its still very buggy and I don’t really have time or energy to improve it at the moment.

The plugin works by wrapping all your leader commands in a function that updates a data structure kept in memory, and then executes the command. When you quit vim this data structure is then appended to a CSV file. You can parse the CSV file and run some statistics on the data.

You can find the repo here: https://github.com/davidpdrsn/vim-leaderboard

I’m posting this here to hopefully spark someone’s interest and headhunt contributers :smile:

3 Likes

(Ben Orenstein) #2

Thanks for the link!

@christoomey Weren’t you working on something similar?

0 Likes

(Chris Toomey) #3

Hey @davidpdrsn, that looks pretty cool. My work was a simple function that would help you determine if there were any conflicted or shadowed leader maps (ie mapping both <leader>r and <leader>ra means that <leader>r is shadowed and would wait ~300ms before firing).

You can see my function here: https://github.com/christoomey/dotfiles/blob/master/vim/rcfiles/leaders.

Interested to see where you get to with your plugin!

0 Likes