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

Reply via email to