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

53961RE: Using internal-variables in regexp

Expand Messages
  • Dave Silvia
    Oct 3 4:42 AM
      My apologies! I see what you mean. Yes, this works as wanted. Best
      description I found was

      :h CursorHold-example

      However, you still have to be mindful of special characters

      :h :match

      I appreciate the info!;)

      thx,
      Dave S.

      *** -----Original Message-----
      *** From: Mikolaj Machowski [mailto:mikmach@...]
      *** Sent: Sunday, October 03, 2004 5:04 AM
      *** To: vim@...
      *** Subject: Re: Using internal-variables in regexp
      ***
      ***
      *** 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