Thread: [Vim-latex-devel] PATCH: Fold all %%fake, not just %%fakesection
Brought to you by:
srinathava,
tmaas
From: Ted P. <te...@te...> - 2010-03-24 17:53:53
Attachments:
folding.fake.patch
|
vim-latex documents the use of %%fakesection to create new folds at the same level as \section folds. To organize my preamble and backmatter, I use similar sections like %%fakepart, %%fakechapter, %%fakesubsection, etc. The attached one-line patch modifies the section of folding.vim so that it looks for %%fake and not just %%fakesection. That lets me update g:Tex_FoldedSections to include all of my other %%fake... sections. --Ted -- Ted Pavlic <te...@te...> Please visit my 2009 d'Feet ALS walk page: http://web.alsa.org/goto/tedp My family appreciates your support in the fight to defeat ALS. |
From: Gerd W. <ger...@ma...> - 2010-08-10 09:21:32
Attachments:
folding_all_fake.patch
test.tex
|
Hi, at least for me, there is one problem with the folding of %%fakesection: They are nested in sections (see attached test.tex). Imho they should be at the same level as section. The attached patch automatically adds %%fakepart, %%fakechapter,... as folded sections and they are folded at the same level as their non-fake counterparts. Regards Gerd On Wed, 24 Mar 2010, Ted Pavlic wrote: > vim-latex documents the use of %%fakesection to create new folds at the same > level as \section folds. To organize my preamble and backmatter, I use > similar sections like %%fakepart, %%fakechapter, %%fakesubsection, etc. > > The attached one-line patch modifies the section of folding.vim so that it > looks for %%fake and not just %%fakesection. That lets me update > g:Tex_FoldedSections to include all of my other %%fake... sections. > > --Ted |
From: Ted P. <te...@te...> - 2010-08-10 18:26:01
|
Gerd -- That's an excellent point. However, in your patch... > =================================================================== > --- ftplugin/latex-suite/folding.vim (revision 1106) > +++ ftplugin/latex-suite/folding.vim (working copy) > @@ -54,7 +54,7 @@ > if s =~ '%%fakesection' > let s = '^\s*' . s > else > - let s = '^\s*\\' . s . '\W' > + let s = '^\s*\\' . s . '\W\|^\s*%%fake' . s ...why do you leave the first part of the branch there? Doesn't your addition mitigate the need for special "fake" cases? Can't we just use your addition exclusively? Thanks -- Ted On 08/10/2010 04:50 AM, Gerd Wachsmuth wrote: > Hi, > > at least for me, there is one problem with the folding of %%fakesection: > They are nested in sections (see attached test.tex). Imho they should be > at the same level as section. > > The attached patch automatically adds %%fakepart, %%fakechapter,... as > folded sections and they are folded at the same level as their non-fake > counterparts. > > Regards > Gerd > > On Wed, 24 Mar 2010, Ted Pavlic wrote: > >> vim-latex documents the use of %%fakesection to create new folds at >> the same level as \section folds. To organize my preamble and >> backmatter, I use similar sections like %%fakepart, %%fakechapter, >> %%fakesubsection, etc. >> >> The attached one-line patch modifies the section of folding.vim so >> that it looks for %%fake and not just %%fakesection. That lets me >> update g:Tex_FoldedSections to include all of my other %%fake... >> sections. >> >> --Ted -- Ted Pavlic <te...@te...> Please visit my 2009 d'Feet ALS walk page: http://web.alsa.org/goto/tedp My family appreciates your support in the fight to defeat ALS. |
From: Gerd W. <ger...@ma...> - 2010-08-11 06:00:53
|
Hi, maybe for compatibility reasons? If someone has added some %%fake.. already to the FoldedSections, the latex-suite will not look for %%fake%%fake... But maybe the first branch should simply ignore the %%fake..s contained in the FoldedSections... Regards Gerd On Tue, 10 Aug 2010, Ted Pavlic wrote: > Gerd -- > > That's an excellent point. However, in your patch... > >> =================================================================== >> --- ftplugin/latex-suite/folding.vim (revision 1106) >> +++ ftplugin/latex-suite/folding.vim (working copy) >> @@ -54,7 +54,7 @@ >> if s =~ '%%fakesection' >> let s = '^\s*' . s >> else >> - let s = '^\s*\\' . s . '\W' >> + let s = '^\s*\\' . s . '\W\|^\s*%%fake' . s > > ...why do you leave the first part of the branch there? Doesn't your addition > mitigate the need for special "fake" cases? Can't we just use your addition > exclusively? > > Thanks -- > Ted > > On 08/10/2010 04:50 AM, Gerd Wachsmuth wrote: >> Hi, >> >> at least for me, there is one problem with the folding of %%fakesection: >> They are nested in sections (see attached test.tex). Imho they should be >> at the same level as section. >> >> The attached patch automatically adds %%fakepart, %%fakechapter,... as >> folded sections and they are folded at the same level as their non-fake >> counterparts. >> >> Regards >> Gerd >> >> On Wed, 24 Mar 2010, Ted Pavlic wrote: >> >>> vim-latex documents the use of %%fakesection to create new folds at >>> the same level as \section folds. To organize my preamble and >>> backmatter, I use similar sections like %%fakepart, %%fakechapter, >>> %%fakesubsection, etc. >>> >>> The attached one-line patch modifies the section of folding.vim so >>> that it looks for %%fake and not just %%fakesection. That lets me >>> update g:Tex_FoldedSections to include all of my other %%fake... >>> sections. >>> >>> --Ted > > |
From: Ted P. <te...@te...> - 2010-08-11 14:52:20
|
Okay. I'll buy that. Either way, I'd be excited to see this merged into the devel branch ASAP. I currently have my old version (which deferred to the nested behavior that I do agree is annoying) mocked up in my ~/.vim directory. I'll be very happy when the %%fake... support is built into the devel version. Thanks -- Ted On Wed, Aug 11, 2010 at 2:00 AM, Gerd Wachsmuth <ger...@ma...> wrote: > Hi, > > maybe for compatibility reasons? If someone has added some %%fake.. already > to the FoldedSections, the latex-suite will not look for %%fake%%fake... But > maybe the first branch should simply ignore the %%fake..s contained in the > FoldedSections... > > Regards > Gerd > > > On Tue, 10 Aug 2010, Ted Pavlic wrote: > >> Gerd -- >> >> That's an excellent point. However, in your patch... >> >>> =================================================================== >>> --- ftplugin/latex-suite/folding.vim (revision 1106) >>> +++ ftplugin/latex-suite/folding.vim (working copy) >>> @@ -54,7 +54,7 @@ >>> if s =~ '%%fakesection' >>> let s = '^\s*' . s >>> else >>> - let s = '^\s*\\' . s . '\W' >>> + let s = '^\s*\\' . s . '\W\|^\s*%%fake' . s >> >> ...why do you leave the first part of the branch there? Doesn't your >> addition mitigate the need for special "fake" cases? Can't we just use your >> addition exclusively? >> >> Thanks -- >> Ted >> >> On 08/10/2010 04:50 AM, Gerd Wachsmuth wrote: >>> >>> Hi, >>> >>> at least for me, there is one problem with the folding of %%fakesection: >>> They are nested in sections (see attached test.tex). Imho they should be >>> at the same level as section. >>> >>> The attached patch automatically adds %%fakepart, %%fakechapter,... as >>> folded sections and they are folded at the same level as their non-fake >>> counterparts. >>> >>> Regards >>> Gerd >>> >>> On Wed, 24 Mar 2010, Ted Pavlic wrote: >>> >>>> vim-latex documents the use of %%fakesection to create new folds at >>>> the same level as \section folds. To organize my preamble and >>>> backmatter, I use similar sections like %%fakepart, %%fakechapter, >>>> %%fakesubsection, etc. >>>> >>>> The attached one-line patch modifies the section of folding.vim so >>>> that it looks for %%fake and not just %%fakesection. That lets me >>>> update g:Tex_FoldedSections to include all of my other %%fake... >>>> sections. >>>> >>>> --Ted >> >> > > -- Ted Pavlic <te...@te...> |
From: Till M. <ope...@ti...> - 2010-08-18 18:52:14
|
Hi, On Wed, Aug 11, 2010 at 10:51:58AM -0400, Ted Pavlic wrote: > Either way, I'd be excited to see this merged into the devel branch > ASAP. I currently have my old version (which deferred to the nested you should now have commit access to the SVN repo on sourceforge, so you can commit the patch. Maybe you could also commit other patches, if there is a consensus for them here on the mailing list. Otherwise I hope to spend some time again on vim-latex within a month. Regards Till |
From: Ted P. <te...@te...> - 2010-09-07 03:07:05
|
Great. I checked in the patch from Gerd Wachsmuth (as is). It's revision 1107. --Ted On 08/18/2010 02:52 PM, Till Maas wrote: > Hi, > > On Wed, Aug 11, 2010 at 10:51:58AM -0400, Ted Pavlic wrote: > >> Either way, I'd be excited to see this merged into the devel branch >> ASAP. I currently have my old version (which deferred to the nested > > you should now have commit access to the SVN repo on sourceforge, so you can > commit the patch. Maybe you could also commit other patches, if there is a > consensus for them here on the mailing list. Otherwise I hope to spend some time > again on vim-latex within a month. > > Regards > Till > > > > ------------------------------------------------------------------------------ > This SF.net email is sponsored by > > Make an app they can't live without > Enter the BlackBerry Developer Challenge > http://p.sf.net/sfu/RIM-dev2dev > > > > _______________________________________________ > Vim-latex-devel mailing list > Vim...@li... > https://lists.sourceforge.net/lists/listinfo/vim-latex-devel -- Ted Pavlic <te...@te...> |