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

53959Re: Using internal-variables in regexp

Expand Messages
  • Mikolaj Machowski
    Oct 3, 2004
    • 0 Attachment
      Dnia niedziela, 3 października 2004 05:11, V.Chandrasekaran napisał:
      > Hi Dave,
      > Here is what I am trying to do. This basically came to my mind after
      > reading
      > tip#769 http://www.vim.org/tips/tip.php?tip_id=769 . I wanted to
      > highlight a line and keep it highlighted for reference till I
      > voluntarily turn it off or choose
      > some other line for highlighting. That tip suggests usage of \%# which
      > changes
      > with every cursor movement and so doesn't serve this purpose (If I had
      > understood
      > that tip correctly). So I was thinking if we fixed the syntax match
      > pattern to the output

      Look one item lower in docs.

      Get number of line and highlight line with \%<number>l
      It should be faster and NULL problems with escaping special characters.

      :let thisline=line(".")
      :exe 'match MyLine /\%'.thisline.'l.*/'

      m.

      --
      LaTeX + Vim = http://vim-latex.sourceforge.net/
      Vim-list(s) Users Map: (last change 17 Sep)
      http://skawina.eu.org/mikolaj/vimlist
      CLEWN - http://clewn.sf.net
    • Show all 19 messages in this topic