Loading ...
Sorry, an error occurred while loading the content.
 

Re: Is there a tool that can compute how many keystrokes are need to modify a file to another?

Expand Messages
  • Paul
    ... -- . -- You received this message from the vim_use maillist. For more information, visit http://www.vim.org/maillist.php
    Message 1 of 8 , Jan 1, 2010
      On Tue, Dec 22, 2009 at 03:23:20PM -0800, Peng Yu wrote:
      >I'm wondering if there is a tool that can roughly estimate how many
      >keystrokes (in vim) are needed to modify a file to another.

      At the risk of sounding obvious, it would be however many keystrokes it takes to do this:

      :!cp <file1> <file2>

      --

      .

      --
      You received this message from the "vim_use" maillist.
      For more information, visit http://www.vim.org/maillist.php
    • Tony Mechelynck
      ... I suppose you aren t going to accept my solution, but if the model file is there for comparison (and if it isn t, you can t estimate the keystrokes),
      Message 2 of 8 , Feb 19, 2010
        On 23/12/09 00:23, Peng Yu wrote:
        > I'm wondering if there is a tool that can roughly estimate how many
        > keystrokes (in vim) are needed to modify a file to another.
        >

        I suppose you aren't going to accept my solution, but if the "model
        file" is there for comparison (and if it isn't, you can't estimate the
        keystrokes), then copying it over the other file is a trivial solution
        to the problem; and on Windows that solution is O(1) on [i.e.
        proportional to] directory tree depth, because on that OS every file or
        directory has a "short name" no longer than 12 characters (plus one for
        the \ separator; and the X: drive letter at the start is itself O(0),
        thus negligible). In Vim, if both files are already open, that O(1) part
        is already taken care of, and what remains is O(0), namely, something like

        :n
        :sav! #
        :up

        (where the last command should be :up! if the file you are trying to
        change may be a read-only file).

        Best regards :-P
        Tony.
        --
        Pecor's Health-Food Principle:
        Never eat rutabaga on any day of the week that has a "y" in
        it.

        --
        You received this message from the "vim_use" maillist.
        For more information, visit http://www.vim.org/maillist.php
      Your message has been successfully submitted and would be delivered to recipients shortly.