[prev in list] [next in list] [prev in thread] [next in thread] 

List:       vim-dev
Subject:    RE: Inconsistent fold opening with vim -d
From:       "Keith Roberts" <kroberts () wpas-inc ! com>
Date:       2004-07-22 20:44:56
Message-ID: 5E0B52B0E0C5B24D9761DF5C949697A06C48B0 () misty ! wpas-inc ! com
[Download RAW message or body]

>-----Original Message-----
>From: Bram@moolenaar.net [mailto:Bram@moolenaar.net] 
>Sent: Sunday, July 11, 2004 2:30 AM
>To: Walter Briscoe
>Cc: vim-dev@vim.org
>Subject: Re: Inconsistent fold opening with vim -d
>
>
>Walter Briscoe wrote:
>
>> 1) If I do vim -d foo bar and then do /fubar, and fubar is 
>in a closed 
>> fold, the fold is opened - I like this!
>> If I do vim -d foo bar +/fubar, the fold is not opened. ;(
>
>Only typed commands cause a fold to be opened.  The search 
>argument isn't seen as a typed command.  If you do type it, 
>it's easy to do that after starting Vim instead.  If it comes 
>from a script then it's appropriate the fold remains closed.
>
>> 2) P.S. I had some problems getting a view of a file which had diff 
>> applied without that diff. I found :sp % created a new window which 
>> inherited the diff options.
>> Should this happen?
>> If so, is a :nodiffthis reasonable?
>> It is quite tedious to unwind the following done by :diffthis -
>>         'diff'          on
>>         'scrollbind'    on
>>         'scrollopt'     includes "hor"
>>         'wrap'          off
>>         'foldmethod'    "diff"
>>         'foldcolumn'    2
>
>Problem with restoring these options is that Vim would have to 
>remember the old values.  Especially 'wrap', it could have 
>been on or off before diff mode.  Still, I suppose it's better 
>to simply reset them to the default value than to have the 
>user set the right values one by one.

I use this:

	" un-diff the current buffer/window
	map	,nd  :set nodiff fdc=0 \| norm zR<CR>


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic