Saturday, December 5. 2009You and Your Editor: Data from vim-logging (2 of N)Comments
Display comments as
(Linear | Threaded)
How do these commands change w.r.t. what you're editing? I'm guessing email != C != Python, but that's just guessing... Ah, interesting question Greg. In vim-logging version 2.0 I'll also keep track of the file type I'm editing. Any other metrics that might be worth keeping track of? A little Python script and some Vim macros (read: did it myself). Also, I cannot figure out what 'see discussion' is referring to... I was surprised to see 'h' (move left) that high up in the list, higher up than 'j' and 'k'. And am I reading it right that 'l' (move right) did not make it onto the list? Of course I just realized while writing this that they don't show up because you are remapping to 'gj' and 'gk', which I did not know about those but now that I do I'll probably add that to my vimrc. Yup - I think j and l are lower because I use f, w and b for moving around a lot more often. I don't know how your logging script works (so I don't know if the following is implementable), but it would be interesting to have multi-character commands turn up in the chart. Instead of a single 'g' entry, I'd like to see gg, gt, gj etc. show up individually, because as it is, the 'g' metric in itself isn't all that useful. Same with 'd', and maybe 'f' too (which character is sought the most?). I'd thought about that, but unfortunately it's kind of tricky. In the Vim source (normal.c, I think), there is a loop that looks something like:
(of course, it's actually much more complex than that… But that's the gist of it) So, to log compound commands, I'd have to tinker with each command's 'execute()' function… Which is a lot of work Ok, so clearly I'm an idiot. It was a simple matter of intercepting the calls to 'getchar' (or the Vim equivalent). I've updated http://wolever.net/~wolever/wiki/vim-logging with a new version that does this properly. |
QuicksearchArchivesLinksCategories |
In my last post, I showed off some normal-mode data from vim-logging. In this (and the next few) posts, I'll go though my most-used commands and describe how I use them. (Don't use Vim? This post won't be too interesting… Although you may pick up somethi
Tracked: Dec 05, 21:28