title: Can I write a vim mapping that allows me to perform an edit repeat in a chainable way on the next [count] lines?
body: <p>Vim's dot <code>.</code> repeat feature is one of its most powerful, and the root of its power is not in how <strong>capable</strong> it is but rather in how <em>easy</em> and <em>fast</em> it is. </p>
  
  <p>It's actually somewhat limited. For example, something that I often wish it can do is "record" a little more. For instance I have a long line in a bash script that I want to shorten to clean up the script. </p>
  
  <p>Note: the square brackets I use to demonstrate the position of the Vim cursor</p>
  
  <pre><code>[y]um -y install autoconf automake binutils bison flex gcc gcc-c++ gettext libtool make patch ftp pkgconfig man ncurses-devel zlib-devel bzip2-devel openssl-devel sqlite-devel readline-devel wget git mercurial ruby ruby-devel libcurl curl-devel perl-devel perl-ExtUtils-Embed subversion swig bind-utils inotify-tools lsof nmap strace expect mc unzip
  </code></pre>
  
  <p>Suppose now that Vim will indeed wrap this in such a way that I have to append 5 backslashes in order to not break the script.</p>
  
  <p>I really want to be able to do this job by typing <kbd>Vgq</kbd><kbd>k</kbd><kbd>A</kbd><kbd>\</kbd><kbd>&uarr;</kbd><kbd>Esc</kbd><kbd>4</kbd><kbd>.</kbd></p>
  
  <p>But that doesn't work because <code>.</code> doesn't remember the movement from the arrow key, I have to type this: <kbd>Vgq</kbd><kbd>k</kbd><kbd>A</kbd><kbd>\</kbd><kbd>Esc</kbd><kbd>k</kbd><kbd>.</kbd><kbd>k</kbd><kbd>.</kbd><kbd>k</kbd><kbd>.</kbd><kbd>k</kbd><kbd>.</kbd></p>
  
  <p>Or, only practical if my task is somewhat complex and more voluminous, as this requires an order of magnitude more brainpower to execute... <kbd>Vgq</kbd><kbd>qq</kbd><kbd>k</kbd><kbd>A</kbd><kbd>\</kbd><kbd>Esc</kbd><kbd>4@q</kbd></p>
  
  <p>Now what I desire is perhaps binding another key, let's say <code>,</code>, to automatically advance the line while applying the last unit of change, in order to make the operation numerically chainable. Then I can quite naturally do my task this way: <kbd>Vgw</kbd><kbd>A</kbd><kbd>\</kbd><kbd>Esc</kbd><kbd>4,</kbd>. </p>
  
  <p>This would cover 90% of the cases where I feel like recording a macro, but can't justify actually doing it because it's <em>still</em> less painful to go spam out a movement key and <code>.</code> a few times.</p>
  
  <p>What would such a binding look like? </p>