From 0f134e5812a937b7d93fe580774a4ab8d37ab2ff Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Tue, 28 Nov 2017 22:18:11 +0100 Subject: vimrc: Log statistics of RSpec command usage When any of my RSpec commands are used, log a message to a file that says which one was just used. These statistics will be used for an experiment, gathering frequency data over time. That data will then be used to determine how often the lowercase variants are used, and how often the uppercase variants are used. If uppercase occurs more often than lowercase, the commands should be swapped, because lowercase takes less time to type. --- vimrc | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'vimrc') diff --git a/vimrc b/vimrc index 17121fb..7c0834d 100644 --- a/vimrc +++ b/vimrc @@ -385,6 +385,9 @@ " * Add mapping to run nearest RSpec spec with unicode U+26F3 "flag in " hole" character. " +" 2017.11.28: +" * Log statistics of RSpec commands to gather usage data. +" " Pathogen @@ -593,10 +596,10 @@ let g:slimv_swank_cmd = '! screen -d -m -t REPL-SBCL sbcl --load ~/.vim/bundle/s " RSpec -nnoremap z :call RunCurrentSpecFile() -nnoremap Z :call RunNearestSpec() -nnoremap 🕳 :call RunCurrentSpecFile() -nnoremap ⛳ :call RunNearestSpec() +nnoremap z :call RunCurrentSpecFile() \| call system("date '+%FT%T%z: z' >> ~/.vim/spec-stats.log") +nnoremap Z :call RunNearestSpec() \| call system("date '+%FT%T%z: Z' >> ~/.vim/spec-stats.log") +nnoremap 🕳 :call RunCurrentSpecFile() \| call system("date '+%FT%T%z: e' >> ~/.vim/spec-stats.log") +nnoremap ⛳ :call RunNearestSpec() \| call system("date '+%FT%T%z: E' >> ~/.vim/spec-stats.log") " Whitespace method chain -- cgit v1.2.3