Re: [Vim-latex-devel] [vim-latex - Help] A bug?
Brought to you by:
srinathava,
tmaas
From: Zhang Lin-bo <zl...@ls...> - 2003-06-16 07:57:34
|
Thanks for the quick response :-) In fact I was trying to figure out what happened precisely but since I'm not familiar with the Vim stuffs I have soon found out that it was out of my reach :-( Instead of seeking for a thorough solution which, as you stated, seems to be quite involving, there might be some simple workaround. For example, the '\usepackage' macros are generally placed in the preamble before all sectioning commands and they don't cause troubles. I ran into this problem because I was describing certain LaTeX packages, and in my document the \usepackage commands which come after a \section command are all between '\begin{verbatim}' and '\end{verbatim}'. I think when generating foldmarkers the verbatim environments (as well as the comment environment) should be skipped, and that will at least solve my problem. Of course I don't know whether it's complicated or not to skip the verbatim environments when scanning foldregions so this is just a suggestion. Best, LB On Sun, 15 Jun 2003, Srinath Avadhanula wrote: > > > https://sourceforge.net/forum/message.php?msg_id=2061707 > > By: zlb > > > > Unfortunately, it looks like a vim bug: > > do the following: open up a new file and type: > > bar > baz > foo > baz > > Set fdm=manual and fold up the whole file (using ggVGzf). Open the > fold, put yourself on the first baz line. now close fold again. with > fold closed, search for baz using /baz. You will still be on the first > baz line, not the second. > > This seems to be due to the default fold-behavior described at: > > -----------------------------------%<----------------------------------- > For Ex commands the range is adjusted to always start at the first line of a > fold and end at the last line of a fold. Thus this command: > > :s/foo/bar/g > when used with the cursor on a closed fold, will replace "foo" with "bar" in > all lines of the fold. > This does not happen for |:folddoopen| and |:folddoclosed|. > -----------------------------------%<----------------------------------- > > It will be kind of non-trivial to fix this! :( Basically, it will > involve opening up the whole file, doing the package scanning and > folding it back the way it was... > > Srinath > -- |