aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTeddy Wing2017-11-28 22:18:11 +0100
committerTeddy Wing2017-11-28 22:18:11 +0100
commit0f134e5812a937b7d93fe580774a4ab8d37ab2ff (patch)
tree51a96ee02e32c0b00b0372707f5c6c2c6082a7a9
parent7e6a89dc1378c02c581990adb53cfba07d3dacc5 (diff)
downloaddotvim-0f134e5812a937b7d93fe580774a4ab8d37ab2ff.tar.bz2
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.
-rw-r--r--vimrc11
1 files changed, 7 insertions, 4 deletions
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 <leader>z :call RunCurrentSpecFile()<cr>
-nnoremap <leader>Z :call RunNearestSpec()<cr>
-nnoremap 🕳 :call RunCurrentSpecFile()<cr>
-nnoremap ⛳ :call RunNearestSpec()<cr>
+nnoremap <leader>z :call RunCurrentSpecFile() \| call system("date '+%FT%T%z: z' >> ~/.vim/spec-stats.log")<cr>
+nnoremap <leader>Z :call RunNearestSpec() \| call system("date '+%FT%T%z: Z' >> ~/.vim/spec-stats.log")<cr>
+nnoremap 🕳 :call RunCurrentSpecFile() \| call system("date '+%FT%T%z: e' >> ~/.vim/spec-stats.log")<cr>
+nnoremap ⛳ :call RunNearestSpec() \| call system("date '+%FT%T%z: E' >> ~/.vim/spec-stats.log")<cr>
" Whitespace method chain