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

Re: ownsyntax problem? [problem is with iskeyword leakage across ownsyntax'd buffer views]

Expand Messages
  • Charles Campbell
    ... I believe the reason for this problem is isk; LaTeX doesn t have _ as a keyword character, but C does. The leakage is due to LaTeX s removal of _ as
    Message 1 of 4 , Aug 30, 2010
    • 0 Attachment
      Charles Campbell wrote:
      > Hello,
      >
      > I was trying out ownsyntax; I may have found a problem. Using misc1.c
      > from vim's source code:
      >
      > vim -u NONE -N misc1.c
      > :syn on
      > :vsplit
      > :ownsyntax tex
      >
      > The underscores get highlighted with Error highlighting in the left
      > (ownsyntax tex) window; this is expected.
      >
      > However, look at the static char_u ... [char] is now highlighted
      > differently than before. Putting the cursor in that window and typing
      > ":ownsyntax c" doesn't fix things, either. Neither does quitting the
      > "ownsyntax tex" window.
      >
      > By the way, I know that viewing C source code as LaTeX source doesn't
      > make sense :)

      I believe the reason for this problem is isk; LaTeX doesn't have _ as a
      keyword character, but C does. The leakage is due to LaTeX's removal of
      "_" as part of the isk list; try looking at char_u after :setlocal
      isk-=_ and you'll see the same behavior.

      Vince: shouldn't isk be protected in ownsyntax views?

      Regards,
      Chip Campbell

      --
      You received this message from the "vim_dev" maillist.
      Do not top-post! Type your reply below the text you are replying to.
      For more information, visit http://www.vim.org/maillist.php
    Your message has been successfully submitted and would be delivered to recipients shortly.