Patches item #3551589, was opened at 2012-07-29 14:20
Message generated for change (Comment added) made by tpavlic
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=466458&aid=3551589&group_id=52322
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Benoît Legat (blegat8)
Assigned to: Nobody/Anonymous (nobody)
Summary: Improves indentation for 'begin'/'end' while several ones
Initial Comment:
When several \end and/or \begin of environments lies on the same line, the indentation is not always relevant.
This patch tries to fix it with a little bit of refactoring too (the code for \begin and \end is refactored to one function).
I did some tests and it should normally work now for even the most extreme cases.
----------------------------------------------------------------------
Comment By: Ted Pavlic (tpavlic)
Date: 2012-08-09 11:19
Message:
Looks OK to me. I'll commit it after a couple of minor changes.
1. Correct spelling of "Exemples" to "Examples" (do a search and replace in
the comments).
2. Correct spelling of "occurence" to "occurrence" (again, in the
comments).
3. Correct spelling of "substraction" to "subtraction" (comments).
4. (not that big of a deal; just for consideration) Change "parameters" to
"arguments" throughout comments.
5. (not that important, but just to consider) I don't really like using
"->" to mean "returns" as it already has a loaded meaning in CS as "gets."
Really, "HasEnv" is a predicate that is either asserted or not. So I'd
almost like to see something like...
"For example, both of the following are asserted (or you could say "true",
I suppose):
HasEnv( ..., ... )
! HasEnv( ..., ...)"
You could do something similar with BeginEnd using double equals in the
comments. Like:
"For example, all of the following are asserted (or, again, true, I
suppose):
BeginEnd( ..., ..., ...) == 1
BeginEnd( ..., ..., ...) == 1
BeginEnd( ..., ..., ...) == 2
BeginEnd( ..., ..., ...) == 0"
Make at least changes 1 through 3, and I'll commit your patch and push it.
----------------------------------------------------------------------
Comment By: Gerd Wachsmuth (gerw)
Date: 2012-08-01 04:54
Message:
I've also tried to improve the indentation of multiple \begin and \end on
one line. See
https://github.com/gerw/vim-latex-suite/blob/master/indent/tex.vim
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=466458&aid=3551589&group_id=52322
|