0

Using Vim for Log analysis with the inbuilt VIM search functionality and hlsearch, I'd like to assign a different colour for each search result I get.

For e.g entries of my log would be.

  1. CHECKPOINT 1
  2. CHECKPOINT 2
  3. CHECKPOINT 3
  4. CHECKPOINT 4
  5. CHECKPOINT ..
  6. CHECKPOINT ..
  7. .....
  8. CHECKPOINT N

My requirement is to search all these checpoints, and have Checkpoint in a different colour. But visible at same time in the screen.

  1. CHECKPOINT 1 - Highlighted as orange
  2. CHECKPOINT 2 - Highlighted as Green
  3. CHECKPOINT 3 - Highlighted as Red and so on
  4. CHECKPOINT 4
  5. CHECKPOINT ..
  6. CHECKPOINT ..
  7. .....
  8. CHECKPOINT N

Do you know if it's possible to achieve this on vim?? or could you suggest some other tools that would be useful for this.

Thank you :)

used /CHECKPOINT to search for all checkpoints and hlsearch to highlight each match.

raving_sage
  • 13
  • 1
  • 5

0 Answers0