title: Highlighting arbitrary lines in VIM
body: <p>During the implementation process of a program I generally insert many append code lines, mainly with print command, to help me understand and debug the implemented program. Unfortunately, it is common to me to forget which lines are from the code and with were appended and should be deleted some time after. This problem gets worst with large programs.</p>
  
  <p>Well, I found this <a href="http://vim.wikia.com/wiki/Highlight_current_line" rel="noreferrer">article</a> that teaches how to keep one arbitrary user selected line highlighted (see section: <strong>Highlighting that stays after cursor moves</strong>). The solution given by the article is to include in .vimrc the following code:</p>
  
  <pre><code>:nnoremap &lt;silent&gt; &lt;Leader&gt;l ml:execute 'match Search /\%'.line('.').'l/'&lt;CR&gt;
  </code></pre>
  
  <p>So, every time when I press <strong>\l</strong> the current line is highlighted and kept so, and the previous highlighted line, if there are one, is unhighlighted.</p>
  
  <p>This isn't the behavior that I would like. Instead, I would like to be able to highlight as many arbitrary lines as I want without unhighlighting the previous highlighted lines. And if it is possible, with a unique command like <strong>\l</strong>.</p>
  
  <p>Someone knows a solution for this?</p>
  
  <p>Thanks in advance.</p>
  
  <p><strong>EDITED</strong>:</p>
  
  <p>The command proposed by <a href="https://stackoverflow.com/users/3271687/yolenoyer">yolenoyer</a> solved the initial problem. But, now other problem raised. The following command:</p>
  
  <pre><code>:call clearmatches()
  </code></pre>
  
  <p>proposed to clean the highlighted lines cleans all lines and I would like to be able to clean specific highlighted lines, instead off all of them at once. Is it possible?</p>