Gary,

Thanks for the info; I could perhaps put something together like this,
but my client that I'm embedding the program in is trying to drive
things, not vimdiff. And I'd like to be able to use any, generic
vimdiff out there that so happens to be in people's paths.

Hence, I'd like to have an automatic way of doing this, rather than
something that requires both setup on the user side, and possibly
extra install steps... IMO, in several ways vimdiff is really a
'second order citizen' in the vim world - you can say vim * to vi all
files in a directory - why can't you say vimdiff <list of file pairs>
and review a set of files, side by side? Or vimdiff <dir1> <dir2> to
do a recursive compare?

And vim -f <filelist> would come in very handy in general, ie: for
places where shell globbing is an issue (eg. shell expands to too many
files, or where spaces/special characters are troublesome)

Anyways, I figured out what was going on - vim spawns diff, which is
spawned by the underlying shell - which in turn is calling a bunch of
junk. Setting SHELL to '/usr/local/bin/tcsh -f' (to ignore dot files)
worked wonders for the startup time.

Ed


On Mon, Oct 6, 2008 at 6:55 PM, Gary Johnson <[EMAIL PROTECTED]> wrote:
>
> On 2008-10-06, Edward Peschko <[EMAIL PROTECTED]> wrote:
>> all,
>>
>> Instead of concentrating on vimdiff startup time, I was wondering,
>> maybe, if there was a way to view several 'pairs' of files, ie,
>> instead of:
>>
>> vimdiff file1.old file1.new
>> vimdiff file2.old file2.new
>>
>>
>> I could say:
>>
>> vimdiff -f 'filelist'
>>
>> and then have filelist contain the pairs of files that I want to view.
>>  Or of course if there was any other mechanism on the command line to
>> vimdiff multiple sets of files.
>>
>> As I see it, this combined with an internal diff (can you statically
>> link diff, anyways?) would save about 10 secs of startup time per
>> file, or over an hour if editing 360 files...
>
> Here's an approach I've taken.  I somehow select the set of new
> files I'm interested in and give that list as arguments to vim,
> e.g.,
>
>   vim $(find . -name \*.new)
>
> Then I define a command that diffs the current file against its
> predecessor, e.g.,
>
>   :command -bar Diff vert diffsplit %:r.old
>
> For the first file, I just execute
>
>   :Diff
>
> When I'm done with that one, I execute something like this:
>
>   :diffoff | wincmd l | only | n | Diff
>
> which terminates the first diff, closes the new window, goes to the
> next file in the argument list, and diffs it against its
> predecessor.  Rather than have to recall that command from the
> command history for each file, I may bind it to some easy-to-type
> key I'm not using at the moment, e.g.,
>
>   :nmap <C-N> :diffoff | wincmd l | only | n | Diff<CR>
>
> I don't do that very often, so an ad hoc approach like the above
> works well enough for me.  If you that regularly, you may want to
> define some commands and/or mappings that encapsulate those steps
> and put them in your ~/.vimrc.
>
> Regards,
> Gary
>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply via email to