I noticed that sometimes the 'foldmethod' tends to be set to 'diff'
even though I'm no longer in diff mode (turned off with a ':diffoff'),
is there any way to make sure it just goes back to 'manual'
automatically?
Also, some windows seem to think that they should be in diff mode - if
I ':vs file1' a file in some windows, they automatically go into diff
mode - did I just not turn that mode off properly?
thanks!
-lev
Most options carry over from the parent window to the child window when
you split. When you have finished with diff mode, I recommend closing
(e.g. with ":q") all the windows taking part in the diff. Usually I
start diff mode by invoking "gvimdiff file1 file2" at the shell prompt,
and I end it with ":qa". This way I get no bad surprises.
Notice that ":diffoff" applies only to the current window. To apply it
to all windows in the current tab page, use ":diffoff!" with a bang.
Best regards,
Tony.
--
hundred-and-one symptoms of being an internet addict:
158. You get a tuner card so you can watch TV while surfing.
I believe that to fight some folding troubles, when they are out of
sync in diffsplit mode i have used :diffupdate, zr zm or something
like this. And IIRC, I have long time no troubles of that kind (less
frequent or may be no at all). The reason may be that I use gvim less
intensive, but use cygwin vim more often instead, and cygwin vim in
turn uses different diff program than w32 gvim. Or may be the reason
for more stable diff behaviour is just recent vim binary were it is
fixed somehow. What vim version do you use BTW ?
VIM - Vi IMproved 7.1 (2007 May 12, compiled Apr 30 2008 10:23:22)
I've tried diffupdate as well as the fold commands, and nothing seems
to work. Checking the foldcolumn count shows that both files are not
folded at all. The colors of the two documents show that something
diff-related is going on, as both are the same color (background is
blue) up to the first difference, and then they turn pink.
thanks!
-lev
So you can even reproduce this ? Very good. First of all, you must
update to 7.2 (your 7.1 has relative recent patchlevel, according
compilation date, but still).
If that not helps, may be it is possible that you describe your
case in details, may be putting some example files and sequence of
actions which is causing observed effect.
What is your OS ? What kind of vim do you use - console or GUI
version?
--
Mit freundlichen Grüßen
Anton Sharonov
mailto:anton.s...@gmail.com
On Sep 2, 2008, at 11:22 PM, Anton Sharonov wrote:
>
>> I've tried diffupdate as well as the fold commands, and nothing seems
>> to work. Checking the foldcolumn count shows that both files are not
>> folded at all. The colors of the two documents show that something
>> diff-related is going on, as both are the same color (background is
>> blue) up to the first difference, and then they turn pink.
>
> So you can even reproduce this ? Very good. First of all, you must
> update to 7.2 (your 7.1 has relative recent patchlevel, according
> compilation date, but still).
I realize that this would be the best thing to do just to make sure
there are no bugs etc, but I'd rather see if I can debug from where
I'm at, given that it works if I launch into a fresh vim instance.
here's my ':set' output - does anything seem out of the ordinary for
why diffsplit doesn't work? (BTW, this is with the two files already
split, and failing to fold):
autoindent commentstring=#%s define=[^A-Za-z_]
expandtab foldmethod=diff hidden
ignorecase ruler shiftwidth=2
softtabstop=2 textwidth=80 window=1
backspace=2 completeopt= diff
filetype=perl formatoptions=crq history=1000
incsearch scroll=24 smartcase
syntax=perl ttyfast nowrap
comments=:# cpoptions=BceFs noequalalways
foldcolumn=2 helplang=en hlsearch
readonly scrollbind smarttab
tabstop=2 ttymouse=xterm
thanks!
-lev
foldmethod=diff
This I have after I start diff mode. I can simulate your :set output
with missing foldmethod option by executing :set foldmethod=manual -
this command sets option value to default and it isn't shown than in
the :set output. After changing foldmethod to 'manual' diff-related
folding is immediately disapeared for that window.
Hope that helps,
Anton.
2008/9/8, Lev Lvovsky <lis...@sonous.com>:
>
> I have no other idea excepting that following is missing in settings
> you listed:
>
> foldmethod=diff
>
> This I have after I start diff mode. I can simulate your :set output
> with missing foldmethod option by executing :set foldmethod=manual -
> this command sets option value to default and it isn't shown than in
> the :set output. After changing foldmethod to 'manual' diff-related
> folding is immediately disapeared for that window.
>
> Hope that helps,
> Anton.
for some reason, ":bufdo :diffoff" did the trick. Maybe vim thought I
wanted to diff something other than what was being displayed?
thanks!
-lev