Loading ...
Sorry, an error occurred while loading the content.

[screenshot] RE: Multiple syntax views on one file

Expand Messages
  • Vince Negri
    Here s the latest update on my hacking activities: I ve put up a screenshot of an editing session which makes use of the three new features I ve been working
    Message 1 of 1 , Apr 2, 2003
      Here's the latest update on my hacking activities:

      I've put up a screenshot of an editing session which
      makes use of the three new features I've been working


      1) 'cursorbind'
      Both windows have 'cursorbind' set - ok, so you can't
      actually see this, but trust me ;) So in the screenshot,
      the cursor is on "however" in both windows. The
      use of 'cursorbind' works well for binding windows of
      different sizes; obviously in some other circumstances
      'scrollbind' is still the better choice.

      2) 'conceal'
      The conceal feature has been enhanced since my last
      posted patch; the screenshot demos these enhancements.

      The upper window has a 'conceallevel' of 2, which now
      means that concealed text is hidden unless a custom
      replacement char is specified. This has been used to
      render LaTeX codes thusly:
      \left( -> (
      \right) -> )
      \left[ -> [
      \right] -> ]
      \cdot -> .
      \gamma -> Y
      \theta -> T
      \circ ->o
      \begin{equation} -> >
      \end{equation} -> <

      Note that \label{eqn:tlin1} in the lower window has
      been rendered as just eqn:tlin1 in the upper. This
      is made simple by the new "concealends" flag for regions
      which causes just the matching endgroups to be hidden.
      "concealends" has also been used for the inline math
      ($...$) regions which cleans up the upper window

      3) :ownsyntax
      In the upper window, which is obviously a sort of
      "print preview" ;) I needed a slightly different
      syntax scheme. Firstly the maths is not highlighted
      in a separate colour, and secondly the matching
      of "\begin{equation}" had to be changed to make the
      character replacement work as desired.

      Therefore, a hacked tex.vim, named "tex2.vim", was loaded
      into the upper window with
      :ownsyntax tex2

      The two windows, although on the same file, now have
      independent syntax highlighting.

      Overall Status
      I'm now "eating my own dogfood" and using this build
      as my everyday editor to build confidence that I haven't
      broken anything. (In the meantime I also continue to work with
      the normal tree, e.g to check out Walter's DJGPP fix.)


      Legal Disclaimer: Any views expressed by the sender of this message are
      not necessarily those of Application Solutions Ltd. Information in this
      e-mail may be confidential and is for the use of the intended recipient
      only, no mistake in transmission is intended to waive or compromise such
      privilege. Please advise the sender if you receive this e-mail by mistake.
    Your message has been successfully submitted and would be delivered to recipients shortly.