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

Re: highlighting tabbed text

Expand Messages
  • Gerald Lai
    ... Mark.vim allows you to enter regular expressions. After installing mark.vim, do this 1. Type r and you ll get a @ prompt. 2. Enter
    Message 1 of 6 , May 1, 2006
    • 0 Attachment
      On Mon, 1 May 2006, Michael Naumann wrote:

      > On Monday 01 May 2006 07:04, Gerald Lai wrote:
      >> On Mon, 1 May 2006, Michael Naumann wrote:
      >>
      >>> Is there a way to highlight a sequence of non-tabs followed by a sequence
      >>> of tabs (/^[^\t]\+\t\+/) differently from the next such sequence?
      >>>
      >>> For example in the line
      >>> a\tb\t\tc\td
      >>>
      >>> I want
      >>> "a\t" to be color1,
      >>> "b\t\t" to be color2 and
      >>> "c\t" to be color3 (or probably color1 again)
      >>>
      >>> Is this even possible?
      >>
      >> You could check out Mark.vim
      >>
      >> http://www.vim.org/scripts/script.php?script_id=1238
      >>
      >> HTH.
      >> --
      >> Gerald
      >>
      >>
      >
      > Nice script, indeed.
      > Still I do not see how it can help me with my problem.

      Mark.vim allows you to enter regular expressions.

      After installing mark.vim, do this

      1. Type "\r" and you'll get a "@" prompt.
      2. Enter "^\%([^\t]\+\t\+\)\{1}" without quotes.

      3. Type "\r" and you'll get a "@" prompt.
      4. Enter "^\%([^\t]\+\t\+\)\{2}" without quotes.

      5. Type "\r" and you'll get a "@" prompt.
      6. Enter "^\%([^\t]\+\t\+\)\{3}" without quotes.

      Repeat as necessary, with numbers in ascending order.
      Could be as easy as typing "\r", followed by the Up arrow key, and
      changing the number count.

      If you wish to get rid of the highlightings, position the Normal cursor
      _not_ on the highlight, and hit "\n".

      HTH :)
      --
      Gerald
    Your message has been successfully submitted and would be delivered to recipients shortly.